2017-01-22 15:44:37 +00:00
|
|
|
{% extends "layout.html" %}
|
2021-05-26 11:35:35 +00:00
|
|
|
{% block flash %}
|
2021-08-01 11:50:17 +00:00
|
|
|
<div id="spinning_success" class="row-fluid text-center" style="display:none;">
|
2021-05-26 11:35:35 +00:00
|
|
|
<div class="alert alert-info"><img id="img-spinner" src="{{ url_for('static', filename='css/libs/images/loading-icon.gif') }}"/></div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
2017-01-22 15:44:37 +00:00
|
|
|
{% block body %}
|
|
|
|
<div class="discover">
|
2017-02-10 19:18:37 +00:00
|
|
|
<h2>{{title}}</h2>
|
2021-05-26 11:35:35 +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() }}">
|
2021-08-30 06:02:21 +00:00
|
|
|
<div class="panel-group col-md-10 col-lg-8">
|
2018-07-15 13:08:06 +00:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h4 class="panel-title">
|
2021-05-26 11:35:35 +00:00
|
|
|
<a class="accordion-toggle" data-toggle="collapse" href="#collapseone">
|
2018-07-15 13:08:06 +00:00
|
|
|
<span class="glyphicon glyphicon-plus"></span>
|
|
|
|
{{_('Server Configuration')}}
|
2018-08-16 19:17:26 +00:00
|
|
|
</a>
|
2018-07-15 13:08:06 +00:00
|
|
|
</h4>
|
2017-02-28 23:53:32 +00:00
|
|
|
</div>
|
2021-05-26 11:35:35 +00:00
|
|
|
<div id="collapseone" class="panel-collapse collapse">
|
2018-07-15 13:08:06 +00:00
|
|
|
<div class="panel-body">
|
2019-01-20 16:45:42 +00:00
|
|
|
<div class="form-group">
|
2018-07-15 13:08:06 +00:00
|
|
|
<label for="config_port">{{_('Server Port')}}</label>
|
2019-07-13 18:45:48 +00:00
|
|
|
<input type="number" min="1" max="65535" class="form-control" name="config_port" id="config_port" value="{% if config.config_port != None %}{{ config.config_port }}{% endif %}" autocomplete="off" required>
|
2018-07-15 13:08:06 +00:00
|
|
|
</div>
|
2020-05-06 16:47:33 +00:00
|
|
|
<label for="config_certfile">{{_('SSL certfile location (leave it empty for non-SSL Servers)')}}</label>
|
2020-05-03 08:55:33 +00:00
|
|
|
<div class="form-group input-group">
|
|
|
|
<input type="text" class="form-control" id="config_certfile" name="config_certfile" value="{% if config.config_certfile != None %}{{ config.config_certfile }}{% endif %}" autocomplete="off">
|
|
|
|
<span class="input-group-btn">
|
2020-12-11 07:37:37 +00:00
|
|
|
<button type="button" data-toggle="modal" data-link="config_certfile" data-target="#fileModal" id="certfile_path" class="btn btn-default"><span class="glyphicon glyphicon-folder-open"></span></button>
|
2020-05-03 08:55:33 +00:00
|
|
|
</span>
|
2018-07-15 13:08:06 +00:00
|
|
|
</div>
|
2021-06-19 12:44:57 +00:00
|
|
|
<label for="config_keyfile" >{{_('SSL Keyfile location (leave it empty for non-SSL Servers)')}}</label>
|
2020-05-03 08:55:33 +00:00
|
|
|
<div class="form-group input-group">
|
|
|
|
<input type="text" class="form-control" id="config_keyfile" name="config_keyfile" value="{% if config.config_keyfile != None %}{{ config.config_keyfile }}{% endif %}" autocomplete="off">
|
|
|
|
<span class="input-group-btn">
|
2020-12-11 07:37:37 +00:00
|
|
|
<button type="button" id="keyfile_path" data-toggle="modal" data-link="config_keyfile" data-target="#fileModal" class="btn btn-default"><span class="glyphicon glyphicon-folder-open"></span></button>
|
2020-05-03 08:55:33 +00:00
|
|
|
</span>
|
2018-07-15 13:08:06 +00:00
|
|
|
</div>
|
2019-01-20 16:45:42 +00:00
|
|
|
<div class="form-group">
|
2020-02-03 03:22:00 +00:00
|
|
|
<label for="config_updatechannel">{{_('Update Channel')}}</label>
|
2019-07-13 18:45:48 +00:00
|
|
|
<select name="config_updatechannel" id="config_updatechannel" class="form-control">
|
2020-05-03 08:55:33 +00:00
|
|
|
<option value="0" {% if config.config_updatechannel == 0 %}selected{% endif %}>{{_('Stable')}}</option>
|
|
|
|
<option value="2" {% if config.config_updatechannel == 2 %}selected{% endif %}>{{_('Nightly')}}</option>
|
2019-01-20 16:45:42 +00:00
|
|
|
</select>
|
|
|
|
</div>
|
2021-10-22 19:35:10 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_trustedhosts">{{_('Trusted Hosts (Comma Separated)')}}</label>
|
|
|
|
<input type="text" class="form-control" id="config_trustedhosts" name="config_trustedhosts" value="{% if config.trustedhosts != None %}{{ config.config_trustedhosts }}{% endif %}" autocomplete="off">
|
|
|
|
</div>
|
2018-07-15 13:08:06 +00:00
|
|
|
</div>
|
2017-01-22 15:44:37 +00:00
|
|
|
</div>
|
2018-07-15 13:08:06 +00:00
|
|
|
</div>
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h4 class="panel-title">
|
2021-05-26 11:35:35 +00:00
|
|
|
<a class="accordion-toggle" data-toggle="collapse" href="#collapsetwo">
|
2018-07-15 13:08:06 +00:00
|
|
|
<span class="glyphicon glyphicon-plus"></span>
|
|
|
|
{{_('Logfile Configuration')}}
|
2018-08-16 19:17:26 +00:00
|
|
|
</a>
|
2018-07-15 13:08:06 +00:00
|
|
|
</h4>
|
2017-08-08 16:52:00 +00:00
|
|
|
</div>
|
2021-05-26 11:35:35 +00:00
|
|
|
<div id="collapsetwo" class="panel-collapse collapse">
|
2018-07-15 13:08:06 +00:00
|
|
|
<div class="panel-body">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_log_level">{{_('Log Level')}}</label>
|
|
|
|
<select name="config_log_level" id="config_log_level" class="form-control">
|
2019-07-13 18:45:48 +00:00
|
|
|
<option value="10" {% if config.config_log_level == 10 %}selected{% endif %}>DEBUG</option>
|
|
|
|
<option value="20" {% if config.config_log_level == 20 or config.config_log_level == None %}selected{% endif %}>INFO</option>
|
|
|
|
<option value="30" {% if config.config_log_level == 30 %}selected{% endif %}>WARNING</option>
|
|
|
|
<option value="40" {% if config.config_log_level == 40 %}selected{% endif %}>ERROR</option>
|
2018-07-15 13:08:06 +00:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_logfile">{{_('Location and name of logfile (calibre-web.log for no entry)')}}</label>
|
2019-07-13 18:45:48 +00:00
|
|
|
<input type="text" class="form-control" name="config_logfile" id="config_logfile" value="{% if config.config_logfile != None %}{{ config.config_logfile }}{% endif %}" autocomplete="off">
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" id="config_access_log" name="config_access_log" {% if config.config_access_log %}checked{% endif %}>
|
|
|
|
<label for="config_access_log">{{_('Enable Access Log')}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_access_logfile">{{_('Location and name of access logfile (access.log for no entry)')}}</label>
|
|
|
|
<input type="text" class="form-control" name="config_access_logfile" id="config_access_logfile" value="{% if config.config_access_logfile != None %}{{ config.config_access_logfile }}{% endif %}" autocomplete="off">
|
2018-07-15 13:08:06 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-01-22 15:44:37 +00:00
|
|
|
</div>
|
2018-07-15 13:08:06 +00:00
|
|
|
</div>
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h4 class="panel-title">
|
2021-05-26 11:35:35 +00:00
|
|
|
<a class="accordion-toggle" data-toggle="collapse" href="#collapsefour">
|
2018-07-15 13:08:06 +00:00
|
|
|
<span class="glyphicon glyphicon-plus"></span>
|
|
|
|
{{_('Feature Configuration')}}
|
2018-08-16 19:17:26 +00:00
|
|
|
</a>
|
2018-07-15 13:08:06 +00:00
|
|
|
</h4>
|
2017-12-02 10:15:51 +00:00
|
|
|
</div>
|
2021-05-26 11:35:35 +00:00
|
|
|
<div id="collapsefour" class="panel-collapse collapse">
|
2018-07-15 13:08:06 +00:00
|
|
|
<div class="panel-body">
|
2021-08-01 11:50:17 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" id="config_unicode_filename" name="config_unicode_filename" {% if config.config_unicode_filename %}checked{% endif %}>
|
|
|
|
<label for="config_unicode_filename">{{_('Convert non-English characters in title and author while saving to disk')}}</label>
|
|
|
|
</div>
|
2017-01-22 15:44:37 +00:00
|
|
|
<div class="form-group">
|
2020-05-02 08:18:01 +00:00
|
|
|
<input type="checkbox" id="config_uploading" data-control="upload_settings" name="config_uploading" {% if config.config_uploading %}checked{% endif %}>
|
2021-11-24 16:35:09 +00:00
|
|
|
<label for="config_uploading">{{_('Enable Uploads')}} {{_('(Please ensure users having also upload rights)')}}</label>
|
2017-01-22 15:44:37 +00:00
|
|
|
</div>
|
2020-05-02 08:18:01 +00:00
|
|
|
<div data-related="upload_settings">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_upload_formats">{{_('Allowed Upload Fileformats')}}</label>
|
|
|
|
<input type="text" class="form-control" name="config_upload_formats" id="config_upload_formats" value="{% if config.config_upload_formats != None %}{{ config.config_upload_formats }}{% endif %}" autocomplete="off">
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-01-22 15:44:37 +00:00
|
|
|
<div class="form-group">
|
2019-07-13 18:45:48 +00:00
|
|
|
<input type="checkbox" id="config_anonbrowse" name="config_anonbrowse" {% if config.config_anonbrowse %}checked{% endif %}>
|
2020-02-03 03:22:00 +00:00
|
|
|
<label for="config_anonbrowse">{{_('Enable Anonymous Browsing')}}</label>
|
2017-01-22 15:44:37 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2020-05-02 08:18:01 +00:00
|
|
|
<input type="checkbox" id="config_public_reg" data-control="register_settings" name="config_public_reg" {% if config.config_public_reg %}checked{% endif %}>
|
2020-02-03 03:22:00 +00:00
|
|
|
<label for="config_public_reg">{{_('Enable Public Registration')}}</label>
|
2017-01-28 19:16:40 +00:00
|
|
|
</div>
|
2020-05-02 08:18:01 +00:00
|
|
|
<div data-related="register_settings">
|
2020-05-12 15:23:58 +00:00
|
|
|
<div class="form-group intend-form">
|
2020-05-02 08:18:01 +00:00
|
|
|
<input type="checkbox" id="config_register_email" name="config_register_email" {% if config.config_register_email %}checked{% endif %}>
|
|
|
|
<label for="config_register_email">{{_('Use E-Mail as Username')}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-08 01:18:03 +00:00
|
|
|
<div class="form-group">
|
2019-07-13 18:45:48 +00:00
|
|
|
<input type="checkbox" id="config_remote_login" name="config_remote_login" {% if config.config_remote_login %}checked{% endif %}>
|
2020-02-03 03:22:00 +00:00
|
|
|
<label for="config_remote_login">{{_('Enable Magic Link Remote Login')}}</label>
|
2017-07-08 01:18:03 +00:00
|
|
|
</div>
|
2020-01-26 13:42:53 +00:00
|
|
|
{% if feature_support['kobo'] %}
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" id="config_kobo_sync" name="config_kobo_sync" data-control="kobo-settings" {% if config.config_kobo_sync %}checked{% endif %}>
|
|
|
|
<label for="config_kobo_sync">{{_('Enable Kobo sync')}}</label>
|
|
|
|
</div>
|
|
|
|
<div data-related="kobo-settings">
|
2020-08-23 16:23:22 +00:00
|
|
|
<div class="form-group" style="margin-left:10px;">
|
2020-01-26 13:42:53 +00:00
|
|
|
<input type="checkbox" id="config_kobo_proxy" name="config_kobo_proxy" {% if config.config_kobo_proxy %}checked{% endif %}>
|
|
|
|
<label for="config_kobo_proxy">{{_('Proxy unknown requests to Kobo Store')}}</label>
|
|
|
|
</div>
|
2020-08-23 16:23:22 +00:00
|
|
|
<div class="form-group" style="margin-left:10px;">
|
|
|
|
<label for="config_external_port">{{_('Server External Port (for port forwarded API calls)')}}</label>
|
|
|
|
<input type="number" min="1" max="65535" class="form-control" name="config_external_port" id="config_external_port" value="{% if config.config_external_port != None %}{{ config.config_external_port }}{% endif %}" autocomplete="off" required>
|
|
|
|
</div>
|
2020-01-26 13:42:53 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2019-07-13 18:45:48 +00:00
|
|
|
{% if feature_support['goodreads'] %}
|
2017-07-08 23:05:20 +00:00
|
|
|
<div class="form-group">
|
2019-07-13 18:45:48 +00:00
|
|
|
<input type="checkbox" id="config_use_goodreads" name="config_use_goodreads" data-control="goodreads-settings" {% if config.config_use_goodreads %}checked{% endif %}>
|
2019-08-20 17:12:40 +00:00
|
|
|
<label for="config_use_goodreads">{{_('Use Goodreads')}}</label>
|
2020-02-03 03:22:00 +00:00
|
|
|
<a href="https://www.goodreads.com/api/keys" target="_blank" style="margin-left: 5px">{{_('Create an API Key')}}</a>
|
2017-07-08 23:05:20 +00:00
|
|
|
</div>
|
|
|
|
<div data-related="goodreads-settings">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_goodreads_api_key">{{_('Goodreads API Key')}}</label>
|
2019-07-13 18:45:48 +00:00
|
|
|
<input type="text" class="form-control" id="config_goodreads_api_key" name="config_goodreads_api_key" value="{% if config.config_goodreads_api_key != None %}{{ config.config_goodreads_api_key }}{% endif %}" autocomplete="off">
|
2017-07-08 23:05:20 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_goodreads_api_secret">{{_('Goodreads API Secret')}}</label>
|
2019-07-13 18:45:48 +00:00
|
|
|
<input type="text" class="form-control" id="config_goodreads_api_secret" name="config_goodreads_api_secret" value="{% if config.config_goodreads_api_secret != None %}{{ config.config_goodreads_api_secret }}{% endif %}" autocomplete="off">
|
2017-07-08 23:05:20 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-07-13 18:45:48 +00:00
|
|
|
{% endif %}
|
2020-04-05 15:31:41 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" id="config_allow_reverse_proxy_header_login" name="config_allow_reverse_proxy_header_login" data-control="reverse-proxy-login-settings" {% if config.config_allow_reverse_proxy_header_login %}checked{% endif %}>
|
|
|
|
<label for="config_allow_reverse_proxy_header_login">{{_('Allow Reverse Proxy Authentication')}}</label>
|
|
|
|
</div>
|
|
|
|
<div data-related="reverse-proxy-login-settings">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_reverse_proxy_login_header_name">{{_('Reverse Proxy Header Name')}}</label>
|
|
|
|
<input type="text" class="form-control" id="config_reverse_proxy_login_header_name" name="config_reverse_proxy_login_header_name" value="{% if config.config_reverse_proxy_login_header_name != None %}{{ config.config_reverse_proxy_login_header_name }}{% endif %}" autocomplete="off">
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-12-28 06:12:18 +00:00
|
|
|
{% if not config.config_is_initial %}
|
2019-07-13 18:45:48 +00:00
|
|
|
{% if feature_support['ldap'] or feature_support['oauth'] %}
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_login_type">{{_('Login type')}}</label>
|
|
|
|
<select name="config_login_type" id="config_login_type" class="form-control" data-control="login-settings">
|
2020-02-03 03:22:00 +00:00
|
|
|
<option value="0" {% if config.config_login_type == 0 %}selected{% endif %}>{{_('Use Standard Authentication')}}</option>
|
2019-07-13 18:45:48 +00:00
|
|
|
{% if feature_support['ldap'] %}
|
|
|
|
<option value="1" {% if config.config_login_type == 1 %}selected{% endif %}>{{_('Use LDAP Authentication')}}</option>
|
|
|
|
{% endif %}
|
|
|
|
{% if feature_support['oauth'] %}
|
2019-07-20 18:01:05 +00:00
|
|
|
<option value="2" {% if config.config_login_type == 2 %}selected{% endif %}>{{_('Use OAuth')}}</option>
|
2019-07-13 18:45:48 +00:00
|
|
|
{% endif %}
|
|
|
|
</select>
|
|
|
|
</div>
|
2020-04-05 15:31:41 +00:00
|
|
|
{% if feature_support['ldap'] %}
|
2020-01-05 07:43:00 +00:00
|
|
|
<div data-related="login-settings-1">
|
2019-07-13 18:45:48 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_ldap_provider_url">{{_('LDAP Server Host Name or IP Address')}}</label>
|
|
|
|
<input type="text" class="form-control" id="config_ldap_provider_url" name="config_ldap_provider_url" value="{% if config.config_ldap_provider_url != None %}{{ config.config_ldap_provider_url }}{% endif %}" autocomplete="off">
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_ldap_port">{{_('LDAP Server Port')}}</label>
|
2020-04-13 20:23:58 +00:00
|
|
|
<input type="number" min="1" max="65535" class="form-control" id="config_ldap_port" name="config_ldap_port" value="{% if config.config_ldap_port != None %}{{ config.config_ldap_port }}{% endif %}" autocomplete="off" required>
|
2019-07-13 18:45:48 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2020-04-13 20:23:58 +00:00
|
|
|
<label for="config_ldap_encryption">{{_('LDAP Encryption')}}</label>
|
2020-04-05 15:31:41 +00:00
|
|
|
<select name="config_ldap_encryption" id="config_ldap_encryption" class="form-control" data-controlall="ldap-cert-settings">
|
|
|
|
<option value="0" {% if config.config_ldap_encryption == 0 %}selected{% endif %}>{{ _('None') }}</option>
|
|
|
|
<option value="1" {% if config.config_ldap_encryption == 1 %}selected{% endif %}>{{ _('TLS') }}</option>
|
|
|
|
<option value="2" {% if config.config_ldap_encryption == 2 %}selected{% endif %}>{{ _('SSL') }}</option>
|
|
|
|
</select>
|
2019-07-13 18:45:48 +00:00
|
|
|
</div>
|
|
|
|
<div data-related="ldap-cert-settings">
|
2020-11-22 10:19:14 +00:00
|
|
|
<label for="config_ldap_cacert_path" >{{_('LDAP CACertificate Path (Only needed for Client Certificate Authentication)')}}</label>
|
2020-11-20 18:47:50 +00:00
|
|
|
<div class="form-group input-group">
|
|
|
|
<input type="text" class="form-control" id="config_ldap_cacert_path" name="config_ldap_cacert_path" value="{% if config.config_ldap_cacert_path != None %}{{ config.config_ldap_cacert_path }}{% endif %}" autocomplete="off">
|
|
|
|
<span class="input-group-btn">
|
2020-12-11 07:37:37 +00:00
|
|
|
<button type="button" id="library_path" data-toggle="modal" data-link="config_ldap_cacert_path" data-target="#fileModal" class="btn btn-default"><span class="glyphicon glyphicon-folder-open"></span></button>
|
2020-11-20 18:47:50 +00:00
|
|
|
</span>
|
|
|
|
</div>
|
2020-11-22 10:19:14 +00:00
|
|
|
<label for="config_ldap_cert_path">{{_('LDAP Certificate Path (Only needed for Client Certificate Authentication)')}}</label>
|
2020-11-20 18:47:50 +00:00
|
|
|
<div class="form-group input-group">
|
2020-04-05 15:31:41 +00:00
|
|
|
<input type="text" class="form-control" id="config_ldap_cert_path" name="config_ldap_cert_path" value="{% if config.config_ldap_cert_path != None %}{{ config.config_ldap_cert_path }}{% endif %}" autocomplete="off">
|
2020-11-20 18:47:50 +00:00
|
|
|
<span class="input-group-btn">
|
2020-12-11 07:37:37 +00:00
|
|
|
<button type="button" id="library_path" data-toggle="modal" data-link="config_ldap_cert_path" data-target="#fileModal" class="btn btn-default"><span class="glyphicon glyphicon-folder-open"></span></button>
|
2020-11-20 18:47:50 +00:00
|
|
|
</span>
|
|
|
|
</div>
|
2020-11-22 10:19:14 +00:00
|
|
|
<label for="config_ldap_key_path">{{_('LDAP Keyfile Path (Only needed for Client Certificate Authentication)')}}</label>
|
2020-11-20 18:47:50 +00:00
|
|
|
<div class="form-group input-group">
|
|
|
|
<input type="text" class="form-control" id="config_ldap_key_path" name="config_ldap_key_path" value="{% if config.config_ldap_key_path != None %}{{ config.config_ldap_key_path }}{% endif %}" autocomplete="off">
|
|
|
|
<span class="input-group-btn">
|
2020-12-11 07:37:37 +00:00
|
|
|
<button type="button" id="library_path" data-toggle="modal" data-link="config_ldap_key_path" data-target="#fileModal" class="btn btn-default"><span class="glyphicon glyphicon-folder-open"></span></button>
|
2020-11-20 18:47:50 +00:00
|
|
|
</span>
|
2019-07-13 18:45:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-04-13 20:23:58 +00:00
|
|
|
<div class="form-group">
|
2020-04-17 16:16:21 +00:00
|
|
|
<label for="config_ldap_authentication">{{_('LDAP Authentication')}}</label>
|
|
|
|
<select name="config_ldap_authentication" id="config_ldap_authentication" class="form-control" data-control="ldap-auth-password" data-controlall="ldap-auth-settings">
|
|
|
|
<option value="0" {% if config.config_ldap_authentication == 0 %}selected{% endif %}>{{ _('Anonymous') }}</option>
|
|
|
|
<option value="1" {% if config.config_ldap_authentication == 1 %}selected{% endif %}>{{ _('Unauthenticated') }}</option>
|
|
|
|
<option value="2" {% if config.config_ldap_authentication == 2 %}selected{% endif %}>{{ _('Simple') }}</option>
|
|
|
|
</select>
|
2020-04-13 20:23:58 +00:00
|
|
|
</div>
|
2020-04-17 16:16:21 +00:00
|
|
|
<div data-related="ldap-auth-settings">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_ldap_serv_username">{{_('LDAP Administrator Username')}}</label>
|
|
|
|
<input type="text" class="form-control" id="config_ldap_serv_username" name="config_ldap_serv_username" value="{% if config.config_ldap_serv_username != None %}{{ config.config_ldap_serv_username }}{% endif %}" autocomplete="off">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div data-related="ldap-auth-password-2">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_ldap_serv_password">{{_('LDAP Administrator Password')}}</label>
|
|
|
|
<input type="password" class="form-control" id="config_ldap_serv_password" name="config_ldap_serv_password" value="" autocomplete="off">
|
|
|
|
</div>
|
2020-04-13 20:23:58 +00:00
|
|
|
</div>
|
2019-07-13 18:45:48 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_ldap_dn">{{_('LDAP Distinguished Name (DN)')}}</label>
|
|
|
|
<input type="text" class="form-control" id="config_ldap_dn" name="config_ldap_dn" value="{% if config.config_ldap_dn != None %}{{ config.config_ldap_dn }}{% endif %}" autocomplete="off">
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2020-02-03 03:22:00 +00:00
|
|
|
<label for="config_ldap_user_object">{{_('LDAP User Object Filter')}}</label>
|
2019-07-13 18:45:48 +00:00
|
|
|
<input type="text" class="form-control" id="config_ldap_user_object" name="config_ldap_user_object" value="{% if config.config_ldap_user_object != None %}{{ config.config_ldap_user_object }}{% endif %}" autocomplete="off">
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" id="config_ldap_openldap" name="config_ldap_openldap" {% if config.config_ldap_openldap %}checked{% endif %}>
|
|
|
|
<label for="config_ldap_openldap">{{_('LDAP Server is OpenLDAP?')}}</label>
|
|
|
|
</div>
|
2020-04-13 20:23:58 +00:00
|
|
|
<h4 class="text-center">{{_('Following Settings are Needed For User Import')}}</h4>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_ldap_group_object_filter">{{_('LDAP Group Object Filter')}}</label>
|
|
|
|
<input type="text" class="form-control" id="config_ldap_group_object_filter" name="config_ldap_group_object_filter" value="{% if config.config_ldap_group_object_filter != None %}{{ config.config_ldap_group_object_filter }}{% endif %}" autocomplete="off">
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_ldap_group_name">{{_('LDAP Group Name')}}</label>
|
|
|
|
<input type="text" class="form-control" id="config_ldap_group_name" name="config_ldap_group_name" value="{% if config.config_ldap_group_name != None %}{{ config.config_ldap_group_name }}{% endif %}" autocomplete="off">
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_ldap_group_members_field">{{_('LDAP Group Members Field')}}</label>
|
|
|
|
<input type="text" class="form-control" id="config_ldap_group_members_field" name="config_ldap_group_members_field" value="{% if config.config_ldap_group_members_field != None %}{{ config.config_ldap_group_members_field }}{% endif %}" autocomplete="off">
|
|
|
|
</div>
|
2020-07-23 10:12:00 +00:00
|
|
|
<div class="form-group">
|
2020-12-03 15:20:31 +00:00
|
|
|
<label for="ldap_import_user_filter">{{_('LDAP Member User Filter Detection')}}</label>
|
2020-12-03 15:01:15 +00:00
|
|
|
<select name="ldap_import_user_filter" id="ldap_import_user_filter" class="form-control" data-control="ldap_member_user_object">
|
|
|
|
<option value="0" {% if config.config_ldap_member_user_object == "" %}selected{% endif %}>{{ _('Autodetect') }}</option>
|
|
|
|
<option value="1" {% if config.config_ldap_member_user_object %}selected{% endif %}>{{ _('Custom Filter') }}</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div data-related="ldap_member_user_object-1">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_ldap_member_user_object">{{_('LDAP Member User Filter')}}</label>
|
2020-07-23 10:12:00 +00:00
|
|
|
<input type="text" class="form-control" id="config_ldap_member_user_object" name="config_ldap_member_user_object" value="{% if config.config_ldap_member_user_object != None %}{{ config.config_ldap_member_user_object }}{% endif %}" autocomplete="off">
|
|
|
|
</div>
|
2020-12-03 15:01:15 +00:00
|
|
|
</div>
|
|
|
|
|
2019-07-13 18:45:48 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% if feature_support['oauth'] %}
|
|
|
|
<div data-related="login-settings-2">
|
2019-07-20 18:01:05 +00:00
|
|
|
{% for prov in provider %}
|
2019-07-13 18:45:48 +00:00
|
|
|
<div class="form-group">
|
2019-07-20 18:01:05 +00:00
|
|
|
<a href="{{prov['obtain_link']}}" target="_blank">{{_('Obtain %(provider)s OAuth Credential', provider=prov['provider_name'])}}</a>
|
2019-07-13 18:45:48 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-07-21 06:10:23 +00:00
|
|
|
<label for="config_{{ prov['id'] }}_oauth_client_id">{{_('%(provider)s OAuth Client Id', provider=prov['provider_name'])}}</label>
|
|
|
|
<input type="text" class="form-control" id="config_{{ prov['id'] }}_oauth_client_id" name="config_{{ prov['id'] }}_oauth_client_id" value="{% if prov['oauth_client_id']%}{{ prov['oauth_client_id'] }}{% endif %}" autocomplete="off">
|
2019-07-13 18:45:48 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-07-21 06:10:23 +00:00
|
|
|
<label for="config_{{ prov['id'] }}_oauth_client_secret">{{_('%(provider)s OAuth Client Secret', provider=prov['provider_name'])}}</label>
|
|
|
|
<input type="text" class="form-control" id="config_{{ prov['id'] }}_oauth_client_secret" name="config_{{ prov['id'] }}_oauth_client_secret" value="{% if prov['oauth_client_secret']%}{{ prov['oauth_client_secret'] }}{% endif %}" autocomplete="off">
|
2019-07-13 18:45:48 +00:00
|
|
|
</div>
|
2019-07-20 18:01:05 +00:00
|
|
|
{% endfor %}
|
2019-07-13 18:45:48 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2019-12-28 06:12:18 +00:00
|
|
|
{% endif %}
|
2017-07-08 23:05:20 +00:00
|
|
|
{% endif %}
|
2017-11-30 19:12:13 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-07-15 13:08:06 +00:00
|
|
|
</div>
|
2018-07-18 18:21:44 +00:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h4 class="panel-title">
|
2021-05-26 11:35:35 +00:00
|
|
|
<a class="accordion-toggle" data-toggle="collapse" href="#collapsefive">
|
2018-07-18 18:21:44 +00:00
|
|
|
<span class="glyphicon glyphicon-plus"></span>
|
2018-08-31 08:47:58 +00:00
|
|
|
{{_('External binaries')}}
|
2018-08-16 19:17:26 +00:00
|
|
|
</a>
|
2018-07-18 18:21:44 +00:00
|
|
|
</h4>
|
|
|
|
</div>
|
2021-05-26 11:35:35 +00:00
|
|
|
<div id="collapsefive" class="panel-collapse collapse">
|
2018-07-18 18:21:44 +00:00
|
|
|
<div class="panel-body">
|
2022-06-21 17:04:44 +00:00
|
|
|
<label for="config_binariesdir">{{_('Path to Calibre Binaries')}}</label>
|
|
|
|
<div class="form-group input-group">
|
|
|
|
<input type="text" class="form-control" id="config_binariesdir" name="config_binariesdir" value="{% if config.config_binariesdir != None %}{{ config.config_binariesdir }}{% endif %}" autocomplete="off">
|
|
|
|
<span class="input-group-btn">
|
|
|
|
<button type="button" data-toggle="modal" id="binaries_modal_path" data-link="config_binariesdir" data-target="#fileModal" class="btn btn-default"><span class="glyphicon glyphicon-folder-open"></span></button>
|
|
|
|
</span>
|
|
|
|
</div>
|
2020-05-09 08:58:59 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_calibre">{{_('Calibre E-Book Converter Settings')}}</label>
|
|
|
|
<input type="text" class="form-control" id="config_calibre" name="config_calibre" value="{% if config.config_calibre != None %}{{ config.config_calibre }}{% endif %}" autocomplete="off">
|
|
|
|
</div>
|
2020-05-06 16:47:33 +00:00
|
|
|
<label for="config_kepubifypath">{{_('Path to Kepubify E-Book Converter')}}</label>
|
2020-05-03 08:55:33 +00:00
|
|
|
<div class="form-group input-group">
|
|
|
|
<input type="text" class="form-control" id="config_kepubifypath" name="config_kepubifypath" value="{% if config.config_kepubifypath != None %}{{ config.config_kepubifypath }}{% endif %}" autocomplete="off">
|
|
|
|
<span class="input-group-btn">
|
2020-12-11 07:37:37 +00:00
|
|
|
<button type="button" id="kepubify_path" data-toggle="modal" data-link="config_kepubifypath" data-target="#fileModal" class="btn btn-default"><span class="glyphicon glyphicon-folder-open"></span></button>
|
2020-05-03 08:55:33 +00:00
|
|
|
</span>
|
2020-05-02 08:18:01 +00:00
|
|
|
</div>
|
|
|
|
{% if feature_support['rar'] %}
|
2020-05-06 16:47:33 +00:00
|
|
|
<label for="config_rarfile_location">{{_('Location of Unrar binary')}}</label>
|
2020-05-03 08:55:33 +00:00
|
|
|
<div class="form-group input-group">
|
|
|
|
<input type="text" class="form-control" id="config_rarfile_location" name="config_rarfile_location" value="{% if config.config_rarfile_location != None %}{{ config.config_rarfile_location }}{% endif %}" autocomplete="off">
|
|
|
|
<span class="input-group-btn">
|
2020-12-11 07:37:37 +00:00
|
|
|
<button type="button" id="unrar_path" data-toggle="modal" data-link="config_rarfile_location" data-target="#fileModal" class="btn btn-default"><span class="glyphicon glyphicon-folder-open"></span></button>
|
2020-05-03 08:55:33 +00:00
|
|
|
</span>
|
2020-05-02 08:18:01 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2018-07-18 18:21:44 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-07-15 13:08:06 +00:00
|
|
|
</div>
|
2017-11-30 19:12:13 +00:00
|
|
|
<div class="col-sm-12">
|
2021-05-26 11:35:35 +00:00
|
|
|
<button type="button" name="submit" id="config_submit" class="btn btn-default">{{_('Save')}}</button>
|
|
|
|
<a href="{{ url_for('admin.admin') }}" id="config_back" class="btn btn-default">{{_('Cancel')}}</a>
|
2017-11-30 19:12:13 +00:00
|
|
|
</div>
|
2017-01-22 15:44:37 +00:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
2020-12-10 13:41:45 +00:00
|
|
|
{% block modal %}
|
|
|
|
{{ filechooser_modal() }}
|
|
|
|
{% endblock %}
|