2015-08-02 18:59:11 +00:00
{% extends "layout.html" %}
{% block body %}
< div class = "discover" >
< h1 > {{title}}< / h1 >
2016-06-17 18:01:44 +00:00
< form role = "form" method = "POST" autocomplete = "off" >
2021-10-04 15:50:32 +00:00
< input type = "hidden" name = "csrf_token" value = "{{ csrf_token() }}" >
2020-05-03 08:55:33 +00:00
< div class = "col-md-10 col-lg-8" >
2023-02-04 10:18:43 +00:00
{% if new_user or ( current_user and content.name != "Guest" and current_user.role_admin() ) %}
2015-10-13 16:07:17 +00:00
< div class = "form-group required" >
2021-03-21 17:55:02 +00:00
< label for = "name" > {{_('Username')}}< / label >
< input type = "text" class = "form-control" name = "name" id = "name" value = "{{ content.name if content.name != None }}" autocomplete = "off" >
2015-10-13 16:07:17 +00:00
< / div >
{% endif %}
2015-08-02 18:59:11 +00:00
< div class = "form-group" >
2023-01-04 02:30:13 +00:00
< label for = "email" > {{_('Email')}}< / label >
2017-11-12 12:40:56 +00:00
< input type = "email" class = "form-control" name = "email" id = "email" value = "{{ content.email if content.email != None }}" autocomplete = "off" >
2015-08-02 18:59:11 +00:00
< / div >
2023-02-04 10:18:43 +00:00
{% if ( current_user and current_user.role_passwd() or current_user.role_admin() ) and not content.role_anonymous() %}
{% if current_user and current_user.role_admin() and not new_user and not profile and ( mail_configured and content.email if content.email != None ) %}
2021-12-25 20:39:58 +00:00
< a class = "btn btn-default postAction" id = "resend_password" role = "button" data-action = "{{url_for('admin.reset_user_password', user_id = content.id) }}" > {{_('Reset user Password')}}< / a >
2019-12-30 14:15:07 +00:00
{% endif %}
2018-08-24 13:48:09 +00:00
< div class = "form-group" >
< label for = "password" > {{_('Password')}}< / label >
2024-02-29 07:23:18 +00:00
< input type = "password" class = "form-control" name = "password" id = "password" data-lang = "{{ current_user.locale }}" data-verify = "{{ config.config_password_policy }}" { % if config . config_password_policy % } data-min = {{ config . config_password_min_length } } data-word = {{ config . config_password_character } } data-special = {{ config . config_password_special } } data-upper = {{ config . config_password_upper } } data-lower = {{ config . config_password_lower } } data-number = {{ config . config_password_number } } { % endif % } value = "" autocomplete = "off" >
2018-08-24 13:48:09 +00:00
< / div >
{% endif %}
2015-08-02 18:59:11 +00:00
< div class = "form-group" >
2024-08-13 18:10:03 +00:00
< label for = "kindle_mail" > {{_('Send to eReader Email Address. Use comma to separate emails for multiple eReaders')}}< / label >
2016-08-08 19:01:38 +00:00
< input type = "email" class = "form-control" name = "kindle_mail" id = "kindle_mail" value = "{{ content.kindle_mail if content.kindle_mail != None }}" >
2015-08-02 18:59:11 +00:00
< / div >
2020-01-14 17:21:31 +00:00
{% if not content.role_anonymous() %}
2016-11-09 18:24:33 +00:00
< div class = "form-group" >
< label for = "locale" > {{_('Language')}}< / label >
< select name = "locale" id = "locale" class = "form-control" >
{% for translation in translations %}
2021-10-07 17:53:32 +00:00
< option value = "{{translation}}" { % if translation | string = = content . locale % } selected { % endif % } > {{ translation.display_name|capitalize }}< / option >
2016-11-09 18:24:33 +00:00
{% endfor %}
< / select >
< / div >
2020-01-14 17:21:31 +00:00
{% endif %}
2019-07-13 18:45:48 +00:00
2016-11-09 18:24:33 +00:00
< div class = "form-group" >
2020-02-03 03:22:00 +00:00
< label for = "default_language" > {{_('Language of Books')}}< / label >
2016-11-09 18:24:33 +00:00
< select name = "default_language" id = "default_language" class = "form-control" >
2021-10-07 17:53:32 +00:00
< option value = "all" { % if content . default_language = = " all " % } selected { % endif % } > {{ _('Show All') }}< / option >
2016-11-09 18:24:33 +00:00
{% for language in languages %}
< option value = "{{ language.lang_code }}" { % if content . default_language = = language . lang_code % } selected { % endif % } > {{ language.name }}< / option >
{% endfor %}
< / select >
< / div >
2021-05-28 12:23:30 +00:00
{% if registered_oauth.keys()| length > 0 and not new_user and profile %}
2019-07-21 06:10:23 +00:00
{% for id, name in registered_oauth.items() %}
2019-07-13 18:45:48 +00:00
< div class = "form-group" >
< label > {{ name }} {{_('OAuth Settings')}}< / label >
2019-07-21 06:10:23 +00:00
{% if id not in oauth_status %}
2021-03-23 00:25:38 +00:00
< a href = "{{ url_for('oauth.'+ name +'_login') }}" id = "config_{{ id }}_oauth" class = "btn btn-primary" > {{_('Link')}}< / a >
2019-07-13 18:45:48 +00:00
{% else %}
2021-03-23 00:25:38 +00:00
< a href = "{{ url_for('oauth.'+ name +'_login_unlink') }}" id = "config_{{ id }}_oauth" class = "btn btn-primary" > {{_('Unlink')}}< / a >
2019-07-13 18:45:48 +00:00
{% endif %}
{% endfor %}
< / div >
{% endif %}
2020-01-27 19:32:37 +00:00
{% if kobo_support and not new_user %}
2020-01-11 18:10:39 +00:00
< label > {{ _('Kobo Sync Token')}}< / label >
< div class = "form-group col" >
< a class = "btn btn-default" id = "config_create_kobo_token" data-toggle = "modal" data-target = "#modal_kobo_token" data-remote = "false" href = "{{ url_for('kobo_auth.generate_auth_token', user_id=content.id) }}" > {{_('Create/View')}}< / a >
2020-12-20 18:17:29 +00:00
< div class = "btn btn-danger" id = "config_delete_kobo_token" data-value = "{{ content.id }}" data-remote = "false" { % if not content . remote_auth_token . first ( ) % } style = "display: none;" { % endif % } > {{_('Delete')}}< / div >
2020-01-11 18:10:39 +00:00
< / div >
2021-12-06 20:02:06 +00:00
< div class = "form-group col" >
2024-02-25 19:03:38 +00:00
< div class = "btn btn-default" id = "kobo_full_sync" data-value = "{% if current_user.role_admin() %}{{ content.id }}{% else %}0{% endif %}" { % if not content . remote_auth_token . first ( ) % } style = "display: none;" { % endif % } > {{_('Force full kobo sync')}}< / div >
2021-12-06 20:02:06 +00:00
< / div >
2020-01-11 18:10:39 +00:00
{% endif %}
2017-08-08 16:52:00 +00:00
< div class = "col-sm-6" >
2021-07-23 17:34:46 +00:00
{% for element in sidebar %}
{% if element['config_show'] %}
< div class = "form-group" >
< input type = "checkbox" name = "show_{{element['visibility']}}" id = "show_{{element['visibility']}}" { % if content . check_visibility ( element [ ' visibility ' ] ) % } checked { % endif % } >
< label for = "show_{{element['visibility']}}" > {{element['show_text']}}< / label >
< / div >
{% endif %}
{% endfor %}
2017-08-08 16:52:00 +00:00
< div class = "form-group" >
2019-07-13 18:45:48 +00:00
< input type = "checkbox" name = "Show_detail_random" id = "Show_detail_random" { % if content . show_detail_random ( ) % } checked { % endif % } >
2020-04-18 19:30:28 +00:00
< label for = "Show_detail_random" > {{_('Show Random Books in Detail View')}}< / label >
2017-08-08 16:52:00 +00:00
< / div >
2023-02-04 10:18:43 +00:00
{% if ( current_user and current_user.role_admin() and not new_user ) and not simple %}
2020-12-31 14:08:56 +00:00
< a href = "#" id = "get_user_tags" class = "btn btn-default" data-id = "{{content.id}}" data-toggle = "modal" data-target = "#restrictModal" > {{_('Add Allowed/Denied Tags')}}< / a >
< a href = "#" id = "get_user_column_values" data-id = "{{content.id}}" class = "btn btn-default" data-toggle = "modal" data-target = "#restrictModal" > {{_('Add allowed/Denied Custom Column Values')}}< / a >
2020-01-05 15:43:48 +00:00
{% endif %}
2017-01-28 19:16:40 +00:00
< / div >
2017-02-25 12:28:57 +00:00
< div class = "col-sm-6" >
2023-02-04 10:18:43 +00:00
{% if current_user and current_user.role_admin() and not profile %}
2017-01-12 19:43:36 +00:00
{% if not content.role_anonymous() %}
2016-11-09 18:24:33 +00:00
< div class = "form-group" >
2016-04-27 08:35:23 +00:00
< input type = "checkbox" name = "admin_role" id = "admin_role" { % if content . role_admin ( ) % } checked { % endif % } >
2020-02-03 03:22:00 +00:00
< label for = "admin_role" > {{_('Admin User')}}< / label >
2018-02-04 06:21:08 +00:00
< / div >
{% endif %}
2016-04-27 08:35:23 +00:00
< div class = "form-group" >
< input type = "checkbox" name = "download_role" id = "download_role" { % if content . role_download ( ) % } checked { % endif % } >
2016-11-09 18:24:33 +00:00
< label for = "download_role" > {{_('Allow Downloads')}}< / label >
2016-04-27 08:35:23 +00:00
< / div >
2019-07-13 18:45:48 +00:00
< div class = "form-group" >
< input type = "checkbox" name = "viewer_role" id = "viewer_role" { % if content . role_viewer ( ) % } checked { % endif % } >
2020-02-03 03:22:00 +00:00
< label for = "viewer_role" > {{_('Allow eBook Viewer')}}< / label >
2019-07-13 18:45:48 +00:00
< / div >
2021-11-20 11:44:34 +00:00
{% if config.config_uploading %}
2016-04-27 08:35:23 +00:00
< div class = "form-group" >
< input type = "checkbox" name = "upload_role" id = "upload_role" { % if content . role_upload ( ) % } checked { % endif % } >
2016-11-09 18:24:33 +00:00
< label for = "upload_role" > {{_('Allow Uploads')}}< / label >
2016-04-27 08:35:23 +00:00
< / div >
2021-11-03 15:05:24 +00:00
{% endif %}
2016-04-27 08:35:23 +00:00
< div class = "form-group" >
2021-11-03 16:32:17 +00:00
< input type = "checkbox" name = "edit_role" data-control = "edit_settings" id = "edit_role" { % if content . role_edit ( ) % } checked { % endif % } >
2016-11-09 18:24:33 +00:00
< label for = "edit_role" > {{_('Allow Edit')}}< / label >
2017-04-14 18:29:11 +00:00
< / div >
2021-11-03 16:32:17 +00:00
< div data-related = "edit_settings" >
< div class = "form-group" >
< input type = "checkbox" name = "delete_role" id = "delete_role" { % if content . role_delete_books ( ) % } checked { % endif % } >
< label for = "delete_role" > {{_('Allow Delete Books')}}< / label >
< / div >
2015-08-02 18:59:11 +00:00
< / div >
2021-11-03 16:32:17 +00:00
{% if not content.role_anonymous() %}
< div class = "form-group" >
< input type = "checkbox" name = "passwd_role" id = "passwd_role" { % if content . role_passwd ( ) % } checked { % endif % } >
< label for = "passwd_role" > {{_('Allow Changing Password')}}< / label >
< / div >
< div class = "form-group" >
< input type = "checkbox" name = "edit_shelf_role" id = "edit_shelf_role" { % if content . role_edit_shelfs ( ) % } checked { % endif % } >
< label for = "edit_shelf_role" > {{_('Allow Editing Public Shelves')}}< / label >
< / div >
2015-10-13 16:07:17 +00:00
{% endif %}
2021-11-03 16:32:17 +00:00
{% endif %}
2022-03-25 17:30:12 +00:00
{% if kobo_support and not content.role_anonymous() and not simple%}
2021-05-15 08:45:51 +00:00
< div class = "form-group" >
< input type = "checkbox" name = "kobo_only_shelves_sync" id = "kobo_only_shelves_sync" { % if content . kobo_only_shelves_sync % } checked { % endif % } >
< label for = "kobo_only_shelves_sync" > {{_('Sync only books in selected shelves with Kobo')}}< / label >
< / div >
{% endif %}
2017-02-25 12:28:57 +00:00
< / div >
2021-07-23 17:34:46 +00:00
< div class = "col-sm-12" >
< div id = "user_submit" class = "btn btn-default" > {{_('Save')}}< / div >
{% if not profile %}
< div class = "btn btn-default" data-back = "{{ url_for('admin.admin') }}" id = "back" > {{_('Cancel')}}< / div >
{% endif %}
2023-02-04 10:18:43 +00:00
{% if current_user and current_user.role_admin() and not profile and not new_user and not content.role_anonymous() %}
2021-07-23 17:34:46 +00:00
< div class = "btn btn-danger" id = "btndeluser" data-value = "{{ content.id }}" data-remote = "false" > {{_('Delete User')}}< / div >
{% endif %}
2018-09-29 13:44:42 +00:00
< / div >
2021-07-27 06:09:57 +00:00
< / div >
2015-08-02 18:59:11 +00:00
< / form >
2020-09-27 14:00:17 +00:00
< / div >
2021-07-23 17:34:46 +00:00
< div class = "modal fade" id = "modal_kobo_token" tabindex = "-1" role = "dialog" aria-labelledby = "kobo_tokenModalLabel" >
< div class = "modal-dialog modal-lg" role = "document" >
< div class = "modal-content" >
< div class = "modal-header" >
< button type = "button" class = "close" data-dismiss = "modal" aria-label = "Close" > < span aria-hidden = "true" > × < / span > < / button >
< h4 class = "modal-title" id = "kobo_tokenModalLabel" > {{_('Generate Kobo Auth URL')}}< / h4 >
< / div >
< div class = "modal-body" > ...< / div >
< div class = "modal-footer" >
< button type = "button" id = "kobo_close" class = "btn btn-default" data-dismiss = "modal" > {{_('Close')}}< / button >
2020-01-11 18:10:39 +00:00
< / div >
< / div >
2021-07-23 17:34:46 +00:00
< / div >
< / div >
2020-01-11 18:10:39 +00:00
2015-08-02 18:59:11 +00:00
{% endblock %}
2020-01-01 16:26:47 +00:00
{% block modal %}
{{ restrict_modal() }}
2020-12-20 18:17:29 +00:00
{{ delete_confirm_modal() }}
2020-01-01 16:26:47 +00:00
{% endblock %}
{% block js %}
< script src = "{{ url_for('static', filename='js/libs/bootstrap-table/bootstrap-table.min.js') }}" > < / script >
< script src = "{{ url_for('static', filename='js/libs/bootstrap-table/bootstrap-table-editable.min.js') }}" > < / script >
< script src = "{{ url_for('static', filename='js/libs/bootstrap-table/bootstrap-editable.min.js') }}" > < / script >
2022-06-16 06:33:39 +00:00
< script src = "{{ url_for('static', filename='js/libs/pwstrength/i18next.min.js') }}" > < / script >
< script src = "{{ url_for('static', filename='js/libs/pwstrength/i18nextHttpBackend.min.js') }}" > < / script >
2024-02-29 07:23:18 +00:00
< script src = "{{ url_for('static', filename='js/libs/pwstrength/pwstrength-bootstrap.js') }}" > < / script >
2022-06-16 06:33:39 +00:00
< script src = "{{ url_for('static', filename='js/password.js') }}" > < / script >
2020-01-01 16:26:47 +00:00
< script src = "{{ url_for('static', filename='js/table.js') }}" > < / script >
{% endblock %}