2017-01-22 16:44:37 +01:00
|
|
|
{% extends "layout.html" %}
|
|
|
|
{% block body %}
|
2020-01-26 16:52:40 +01:00
|
|
|
<div class="discover" xmlns:text-indent="http://www.w3.org/1999/xhtml">
|
2017-02-10 20:18:37 +01:00
|
|
|
<h2>{{title}}</h2>
|
2017-01-22 16:44:37 +01:00
|
|
|
<form role="form" method="POST" autocomplete="off">
|
2018-07-15 15:08:06 +02:00
|
|
|
<div class="panel-group">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h4 class="panel-title">
|
2018-08-18 12:15:32 +02:00
|
|
|
<a class="accordion-toggle" data-toggle="collapse" href="#collapseOne">
|
2018-07-15 15:08:06 +02:00
|
|
|
<span class="glyphicon glyphicon-minus"></span>
|
|
|
|
{{_('Library Configuration')}}
|
2018-08-16 21:17:26 +02:00
|
|
|
</a>
|
2018-07-15 15:08:06 +02:00
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
<div id="collapseOne" class="panel-collapse collapse in">
|
|
|
|
<div class="panel-body">
|
2017-01-22 16:44:37 +01:00
|
|
|
<div class="form-group required">
|
|
|
|
<label for="config_calibre_dir">{{_('Location of Calibre database')}}</label>
|
2019-07-13 20:45:48 +02:00
|
|
|
<input type="text" class="form-control" name="config_calibre_dir" id="config_calibre_dir" value="{% if config.config_calibre_dir != None %}{{ config.config_calibre_dir }}{% endif %}" autocomplete="off">
|
2017-01-22 16:44:37 +01:00
|
|
|
</div>
|
2019-07-14 13:20:40 +02:00
|
|
|
{% if feature_support['gdrive'] %}
|
2017-02-20 19:34:37 +01:00
|
|
|
<div class="form-group required">
|
2019-07-13 20:45:48 +02:00
|
|
|
<input type="checkbox" id="config_use_google_drive" name="config_use_google_drive" data-control="gdrive_settings" {% if config.config_use_google_drive %}checked{% endif %} >
|
2018-07-15 15:08:06 +02:00
|
|
|
<label for="config_use_google_drive">{{_('Use Google Drive?')}}</label>
|
2017-02-20 19:34:37 +01:00
|
|
|
</div>
|
2017-07-23 14:03:02 +02:00
|
|
|
<div data-related="gdrive_settings">
|
2018-06-02 10:59:34 +02:00
|
|
|
{% if gdriveError %}
|
|
|
|
<div class="form-group">
|
|
|
|
<label>
|
2018-07-15 15:08:06 +02:00
|
|
|
{{_('Google Drive config problem')}}: {{ gdriveError }}
|
2018-06-02 10:59:34 +02:00
|
|
|
</label>
|
2017-02-20 19:34:37 +01:00
|
|
|
</div>
|
|
|
|
{% else %}
|
2019-07-13 20:45:48 +02:00
|
|
|
{% if show_authenticate_google_drive and g.user.is_authenticated and config.config_use_google_drive %}
|
2018-06-02 10:59:34 +02:00
|
|
|
<div class="form-group required">
|
2019-07-13 20:45:48 +02:00
|
|
|
<a href="{{ url_for('gdrive.authenticate_google_drive') }}" class="btn btn-primary">{{_('Authenticate Google Drive')}}</a>
|
2018-06-02 10:59:34 +02:00
|
|
|
</div>
|
|
|
|
{% else %}
|
2019-07-13 20:45:48 +02:00
|
|
|
{% if show_authenticate_google_drive and g.user.is_authenticated and not config.config_use_google_drive %}
|
2019-02-03 16:38:27 +01:00
|
|
|
<div >{{_('Please hit submit to continue with setup')}}</div>
|
|
|
|
{% endif %}
|
|
|
|
{% if not g.user.is_authenticated %}
|
2018-08-16 21:17:26 +02:00
|
|
|
<div >{{_('Please finish Google Drive setup after login')}}</div>
|
2019-02-03 16:38:27 +01:00
|
|
|
{% endif %}
|
|
|
|
{% if g.user.is_authenticated %}
|
|
|
|
{% if not show_authenticate_google_drive %}
|
2018-06-02 10:59:34 +02:00
|
|
|
<div class="form-group required">
|
2018-07-15 15:08:06 +02:00
|
|
|
<label for="config_google_drive_folder">{{_('Google Drive Calibre folder')}}</label>
|
2018-06-02 10:59:34 +02:00
|
|
|
<select name="config_google_drive_folder" id="config_google_drive_folder" class="form-control">
|
|
|
|
{% for gdrivefolder in gdrivefolders %}
|
2019-07-13 20:45:48 +02:00
|
|
|
<option value="{{ gdrivefolder.title }}" {% if gdrivefolder.title == config.config_google_drive_folder %}selected{% endif %}>{{ gdrivefolder.title }}</option>
|
2018-06-02 10:59:34 +02:00
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
2019-07-13 20:45:48 +02:00
|
|
|
{% if config.config_google_drive_watch_changes_response %}
|
2018-06-02 10:59:34 +02:00
|
|
|
<label for="config_google_drive_watch_changes_response">{{_('Metadata Watch Channel ID')}}</label>
|
|
|
|
<div class="form-group input-group required">
|
2019-12-03 09:06:25 +01:00
|
|
|
<input type="text" class="form-control" name="config_google_drive_watch_changes_response" id="config_google_drive_watch_changes_response" value="{{ config.config_google_drive_watch_changes_response['id'] }} expires on {{ config.config_google_drive_watch_changes_response['expiration'] | strftime }}" autocomplete="off" disabled="">
|
2019-07-13 20:45:48 +02:00
|
|
|
<span class="input-group-btn"><a href="{{ url_for('gdrive.revoke_watch_gdrive') }}" class="btn btn-primary">{{_('Revoke')}}</a></span>
|
2018-06-02 10:59:34 +02:00
|
|
|
</div>
|
2017-02-20 19:34:37 +01:00
|
|
|
{% else %}
|
2019-07-13 20:45:48 +02:00
|
|
|
<a href="{{ url_for('gdrive.watch_gdrive') }}" class="btn btn-primary">Enable watch of metadata.db</a>
|
2017-02-20 19:34:37 +01:00
|
|
|
{% endif %}
|
2018-08-16 21:17:26 +02:00
|
|
|
{% endif %}
|
2019-02-03 16:38:27 +01:00
|
|
|
{% endif %}
|
2017-02-20 19:34:37 +01:00
|
|
|
{% endif %}
|
2018-06-02 10:59:34 +02:00
|
|
|
{% endif %}
|
2017-02-20 19:34:37 +01:00
|
|
|
</div>
|
2019-07-14 13:20:40 +02:00
|
|
|
{% endif %}
|
2018-07-15 15:08:06 +02:00
|
|
|
</div>
|
2017-01-22 16:44:37 +01:00
|
|
|
</div>
|
2018-07-15 15:08:06 +02:00
|
|
|
</div>
|
2019-12-30 15:15:07 +01:00
|
|
|
{% if show_back_button %}
|
2018-07-15 15:08:06 +02:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h4 class="panel-title">
|
2018-08-18 12:15:32 +02:00
|
|
|
<a class="accordion-toggle" data-toggle="collapse" href="#collapsetwo">
|
2018-07-15 15:08:06 +02:00
|
|
|
<span class="glyphicon glyphicon-plus"></span>
|
|
|
|
{{_('Server Configuration')}}
|
2018-08-16 21:17:26 +02:00
|
|
|
</a>
|
2018-07-15 15:08:06 +02:00
|
|
|
</h4>
|
2017-03-01 00:53:32 +01:00
|
|
|
</div>
|
2018-07-15 15:08:06 +02:00
|
|
|
<div id="collapsetwo" class="panel-collapse collapse">
|
|
|
|
<div class="panel-body">
|
2019-01-20 17:45:42 +01:00
|
|
|
<div class="form-group">
|
2018-07-15 15:08:06 +02:00
|
|
|
<label for="config_port">{{_('Server Port')}}</label>
|
2019-07-13 20:45:48 +02: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 15:08:06 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_certfile">{{_('SSL certfile location (leave it empty for non-SSL Servers)')}}</label>
|
2019-07-13 20:45:48 +02:00
|
|
|
<input type="text" class="form-control" name="config_certfile" id="config_certfile" value="{% if config.config_certfile != None %}{{ config.config_certfile }}{% endif %}" autocomplete="off">
|
2018-07-15 15:08:06 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_keyfile">{{_('SSL Keyfile location (leave it empty for non-SSL Servers)')}}</label>
|
2019-07-13 20:45:48 +02:00
|
|
|
<input type="text" class="form-control" name="config_keyfile" id="config_keyfile" value="{% if config.config_keyfile != None %}{{ config.config_keyfile }}{% endif %}" autocomplete="off">
|
2018-07-15 15:08:06 +02:00
|
|
|
</div>
|
2019-01-20 17:45:42 +01:00
|
|
|
<div class="form-group">
|
2019-07-13 20:45:48 +02:00
|
|
|
<label for="config_updatechannel">{{_('Update channel')}}</label>
|
|
|
|
<select name="config_updatechannel" id="config_updatechannel" class="form-control">
|
|
|
|
<option value="0" {% if config.config_updatechannel == 0 %}selected{% endif %}>{{_('Stable')}}</option>
|
|
|
|
<!--option value="1" {% if config.config_updatechannel == 1 %}selected{% endif %}>{{_('Stable (Automatic)')}}</option-->
|
|
|
|
<option value="2" {% if config.config_updatechannel == 2 %}selected{% endif %}>{{_('Nightly')}}</option>
|
|
|
|
<!--option-- value="3" {% if config.config_updatechannel == 3 %}selected{% endif %}>{{_('Nightly (Automatic)')}}</option-->
|
2019-01-20 17:45:42 +01:00
|
|
|
</select>
|
|
|
|
</div>
|
2018-07-15 15:08:06 +02:00
|
|
|
</div>
|
2017-01-22 16:44:37 +01:00
|
|
|
</div>
|
2018-07-15 15:08:06 +02:00
|
|
|
</div>
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h4 class="panel-title">
|
2018-08-18 12:15:32 +02:00
|
|
|
<a class="accordion-toggle" data-toggle="collapse" href="#collapsethree">
|
2018-07-15 15:08:06 +02:00
|
|
|
<span class="glyphicon glyphicon-plus"></span>
|
|
|
|
{{_('Logfile Configuration')}}
|
2018-08-16 21:17:26 +02:00
|
|
|
</a>
|
2018-07-15 15:08:06 +02:00
|
|
|
</h4>
|
2017-08-08 18:52:00 +02:00
|
|
|
</div>
|
2018-07-15 15:08:06 +02:00
|
|
|
<div id="collapsethree" class="panel-collapse collapse">
|
|
|
|
<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 20:45:48 +02: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 15:08:06 +02: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 20:45:48 +02: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 15:08:06 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-01-22 16:44:37 +01:00
|
|
|
</div>
|
2018-07-15 15:08:06 +02:00
|
|
|
</div>
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h4 class="panel-title">
|
2018-08-16 21:17:26 +02:00
|
|
|
<a class="accordion-toggle" data-toggle="collapse" href="#collapsefive">
|
2018-07-15 15:08:06 +02:00
|
|
|
<span class="glyphicon glyphicon-plus"></span>
|
|
|
|
{{_('Feature Configuration')}}
|
2018-08-16 21:17:26 +02:00
|
|
|
</a>
|
2018-07-15 15:08:06 +02:00
|
|
|
</h4>
|
2017-12-02 11:15:51 +01:00
|
|
|
</div>
|
2018-07-15 15:08:06 +02:00
|
|
|
<div id="collapsefive" class="panel-collapse collapse">
|
|
|
|
<div class="panel-body">
|
2017-01-22 16:44:37 +01:00
|
|
|
<div class="form-group">
|
2019-07-13 20:45:48 +02:00
|
|
|
<input type="checkbox" id="config_uploading" name="config_uploading" {% if config.config_uploading %}checked{% endif %}>
|
2017-01-22 16:44:37 +01:00
|
|
|
<label for="config_uploading">{{_('Enable uploading')}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-07-13 20:45:48 +02:00
|
|
|
<input type="checkbox" id="config_anonbrowse" name="config_anonbrowse" {% if config.config_anonbrowse %}checked{% endif %}>
|
2017-01-22 16:44:37 +01:00
|
|
|
<label for="config_anonbrowse">{{_('Enable anonymous browsing')}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-07-13 20:45:48 +02:00
|
|
|
<input type="checkbox" id="config_public_reg" name="config_public_reg" {% if config.config_public_reg %}checked{% endif %}>
|
2017-01-22 16:44:37 +01:00
|
|
|
<label for="config_public_reg">{{_('Enable public registration')}}</label>
|
2017-01-28 20:16:40 +01:00
|
|
|
</div>
|
2017-07-08 03:18:03 +02:00
|
|
|
<div class="form-group">
|
2019-07-13 20:45:48 +02:00
|
|
|
<input type="checkbox" id="config_remote_login" name="config_remote_login" {% if config.config_remote_login %}checked{% endif %}>
|
2017-07-08 03:18:03 +02:00
|
|
|
<label for="config_remote_login">{{_('Enable remote login ("magic link")')}}</label>
|
|
|
|
</div>
|
2020-01-26 14:42:53 +01: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-01-26 16:52:40 +01:00
|
|
|
<div class="form-group" style="text-indent:10px;">
|
2020-01-26 14:42:53 +01: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>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2019-07-13 20:45:48 +02:00
|
|
|
{% if feature_support['goodreads'] %}
|
2017-07-09 01:05:20 +02:00
|
|
|
<div class="form-group">
|
2019-07-13 20:45:48 +02: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 19:12:40 +02:00
|
|
|
<label for="config_use_goodreads">{{_('Use Goodreads')}}</label>
|
2017-07-09 01:05:20 +02:00
|
|
|
<a href="https://www.goodreads.com/api/keys" target="_blank" style="margin-left: 5px">{{_('Obtain an API Key')}}</a>
|
|
|
|
</div>
|
|
|
|
<div data-related="goodreads-settings">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_goodreads_api_key">{{_('Goodreads API Key')}}</label>
|
2019-07-13 20:45:48 +02: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-09 01:05:20 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_goodreads_api_secret">{{_('Goodreads API Secret')}}</label>
|
2019-07-13 20:45:48 +02: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-09 01:05:20 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-07-13 20:45:48 +02:00
|
|
|
{% endif %}
|
|
|
|
{% 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">
|
|
|
|
<option value="0" {% if config.config_login_type == 0 %}selected{% endif %}>{{_('Use standard Authentication')}}</option>
|
|
|
|
{% 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 20:01:05 +02:00
|
|
|
<option value="2" {% if config.config_login_type == 2 %}selected{% endif %}>{{_('Use OAuth')}}</option>
|
2019-07-13 20:45:48 +02:00
|
|
|
{% endif %}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
{% if feature_support['ldap'] %}
|
2020-01-05 08:43:00 +01:00
|
|
|
<div data-related="login-settings-1">
|
2019-07-13 20:45:48 +02: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>
|
|
|
|
<input type="text" 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">
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_ldap_schema">{{_('LDAP schema (ldap or ldaps)')}}</label>
|
|
|
|
<input type="text" class="form-control" id="config_ldap_schema" name="config_ldap_schema" value="{% if config.config_ldap_schema != None %}{{ config.config_ldap_schema }}{% endif %}" autocomplete="off">
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_ldap_serv_username">{{_('LDAP Admin 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 class="form-group">
|
|
|
|
<label for="config_ldap_serv_password">{{_('LDAP Admin password')}}</label>
|
|
|
|
<input type="password" class="form-control" id="config_ldap_serv_password" name="config_ldap_serv_password" value="{% if config.config_ldap_serv_password != None %}{{ config.config_ldap_serv_password }}{% endif %}" autocomplete="off">
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" id="config_ldap_use_ssl" name="config_ldap_use_ssl" {% if config.config_ldap_use_ssl %}checked{% endif %}>
|
|
|
|
<label for="config_ldap_use_ssl">{{_('LDAP Server use SSL')}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" id="config_ldap_use_tls" name="config_ldap_use_tls" {% if config.config_ldap_use_tls %}checked{% endif %}>
|
|
|
|
<label for="config_ldap_use_tls">{{_('LDAP Server use TLS')}}</label>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<input type="checkbox" id="config_ldap_require_cert" name="config_ldap_require_cert" data-control="ldap-cert-settings" {% if config.config_ldap_require_cert %}checked{% endif %}>
|
|
|
|
<label for="config_ldap_require_cert">{{_('LDAP Server Certificate')}}</label>
|
|
|
|
</div>
|
|
|
|
<div data-related="ldap-cert-settings">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_ldap_cert_path">{{_('LDAP SSL Certificate Path')}}</label>
|
|
|
|
<input type="text" class="form-control" id="config_ldap_cert_path" name="config_ldap_cert_path" value="{% if config.config_ldap_cert_path != None and config.config_ldap_require_cert !=None %}{{ config.config_ldap_cert_path }}{% endif %}" autocomplete="off">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<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">
|
|
|
|
<label for="config_ldap_user_object">{{_('LDAP User object filter')}}</label>
|
|
|
|
<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>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% if feature_support['oauth'] %}
|
|
|
|
<div data-related="login-settings-2">
|
2019-07-20 20:01:05 +02:00
|
|
|
{% for prov in provider %}
|
2019-07-13 20:45:48 +02:00
|
|
|
<div class="form-group">
|
2019-07-20 20:01:05 +02:00
|
|
|
<a href="{{prov['obtain_link']}}" target="_blank">{{_('Obtain %(provider)s OAuth Credential', provider=prov['provider_name'])}}</a>
|
2019-07-13 20:45:48 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-07-21 08:10:23 +02: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 20:45:48 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-07-21 08:10:23 +02: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 20:45:48 +02:00
|
|
|
</div>
|
2019-07-20 20:01:05 +02:00
|
|
|
{% endfor %}
|
2019-07-13 20:45:48 +02:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2017-07-09 01:05:20 +02:00
|
|
|
{% endif %}
|
2020-01-05 08:43:00 +01: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>
|
2017-11-30 20:12:13 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-07-15 15:08:06 +02:00
|
|
|
</div>
|
2018-07-18 20:21:44 +02:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h4 class="panel-title">
|
2018-08-18 12:15:32 +02:00
|
|
|
<a class="accordion-toggle" data-toggle="collapse" href="#collapseeight">
|
2018-07-18 20:21:44 +02:00
|
|
|
<span class="glyphicon glyphicon-plus"></span>
|
2018-08-31 10:47:58 +02:00
|
|
|
{{_('External binaries')}}
|
2018-08-16 21:17:26 +02:00
|
|
|
</a>
|
2018-07-18 20:21:44 +02:00
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
<div id="collapseeight" class="panel-collapse collapse">
|
|
|
|
<div class="panel-body">
|
|
|
|
<div class="form-group">
|
2019-07-13 20:45:48 +02:00
|
|
|
<div><input type="radio" name="config_ebookconverter" id="converter0" value="0" {% if config.config_ebookconverter == 0 %}checked{% endif %}>
|
2018-07-18 20:21:44 +02:00
|
|
|
<label for="converter0">{{_('No converter')}}</label></div>
|
2019-07-13 20:45:48 +02:00
|
|
|
<div><input type="radio" name="config_ebookconverter" id="converter1" value="1" {% if config.config_ebookconverter == 1 %}checked{% endif %}>
|
2018-07-18 20:21:44 +02:00
|
|
|
<label for="converter1">{{_('Use Kindlegen')}}</label></div>
|
2019-07-13 20:45:48 +02:00
|
|
|
<div><input type="radio" name="config_ebookconverter" id="converter2" value="2" {% if config.config_ebookconverter == 2 %}checked{% endif %}>
|
2018-07-18 20:21:44 +02:00
|
|
|
<label for="converter2">{{_('Use calibre\'s ebook converter')}}</label></div>
|
|
|
|
</div>
|
|
|
|
<div data-related="calibre">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_calibre">{{_('E-Book converter settings')}}</label>
|
2019-07-13 20:45:48 +02:00
|
|
|
<input type="text" class="form-control" id="config_calibre" name="config_calibre" value="{% if config.config_calibre != None %}{{ config.config_calibre }}{% endif %}" autocomplete="off">
|
2018-07-18 20:21:44 +02:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_calibre">{{_('Path to convertertool')}}</label>
|
2019-07-13 20:45:48 +02:00
|
|
|
<input type="text" class="form-control" id="config_converterpath" name="config_converterpath" value="{% if config.config_converterpath != None %}{{ config.config_converterpath }}{% endif %}" autocomplete="off">
|
2018-07-18 20:21:44 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-08-31 10:47:58 +02:00
|
|
|
{% if rarfile_support %}
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="config_rarfile_location">{{_('Location of Unrar binary')}}</label>
|
2019-07-13 20:45:48 +02:00
|
|
|
<input type="text" class="form-control" name="config_rarfile_location" id="config_rarfile_location" value="{% if config.config_rarfile_location != None %}{{ config.config_rarfile_location }}{% endif %}" autocomplete="off">
|
2018-08-31 10:47:58 +02:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2018-07-18 20:21:44 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-12-30 15:15:07 +01:00
|
|
|
{% endif %}
|
2018-07-15 15:08:06 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2017-11-30 20:12:13 +01:00
|
|
|
<div class="col-sm-12">
|
2019-12-30 15:15:07 +01:00
|
|
|
{% if not show_login_button %}
|
2018-09-23 19:15:50 +02:00
|
|
|
<button type="submit" name="submit" class="btn btn-default">{{_('Submit')}}</button>
|
2017-01-28 20:16:40 +01:00
|
|
|
{% endif %}
|
2019-07-13 20:45:48 +02:00
|
|
|
{% if show_back_button %}
|
|
|
|
<a href="{{ url_for('admin.admin') }}" class="btn btn-default">{{_('Back')}}</a>
|
2017-01-28 20:16:40 +01:00
|
|
|
{% endif %}
|
2019-07-13 20:45:48 +02:00
|
|
|
{% if show_login_button %}
|
|
|
|
<a href="{{ url_for('web.login') }}" name="login" class="btn btn-default">{{_('Login')}}</a>
|
2017-01-28 20:16:40 +01:00
|
|
|
{% endif %}
|
2017-11-30 20:12:13 +01:00
|
|
|
</div>
|
2017-01-22 16:44:37 +01:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
2017-02-20 19:34:37 +01:00
|
|
|
{% block js %}
|
2017-07-23 14:03:02 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).on('change', '#config_use_google_drive', function() {
|
|
|
|
$('#config_google_drive_folder').prop('required', $(this).prop('checked'));
|
2017-02-20 19:34:37 +01:00
|
|
|
});
|
2018-07-15 15:08:06 +02:00
|
|
|
$('.collapse').on('shown.bs.collapse', function(){
|
|
|
|
$(this).parent().find(".glyphicon-plus").removeClass("glyphicon-plus").addClass("glyphicon-minus");
|
|
|
|
}).on('hidden.bs.collapse', function(){
|
|
|
|
$(this).parent().find(".glyphicon-minus").removeClass("glyphicon-minus").addClass("glyphicon-plus");
|
|
|
|
});
|
2017-02-20 19:34:37 +01:00
|
|
|
</script>
|
|
|
|
{% endblock %}
|