|
|
|
@ -17,10 +17,10 @@
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
<div class="form-group required">
|
|
|
|
|
<label for="config_calibre_dir">{{_('Location of Calibre database')}}</label>
|
|
|
|
|
<input type="text" class="form-control" name="config_calibre_dir" id="config_calibre_dir" value="{% if content.config_calibre_dir != None %}{{ content.config_calibre_dir }}{% endif %}" autocomplete="off">
|
|
|
|
|
<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">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group required">
|
|
|
|
|
<input type="checkbox" id="config_use_google_drive" name="config_use_google_drive" data-control="gdrive_settings" {% if content.config_use_google_drive %}checked{% endif %} >
|
|
|
|
|
<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 %} >
|
|
|
|
|
<label for="config_use_google_drive">{{_('Use Google Drive?')}}</label>
|
|
|
|
|
</div>
|
|
|
|
|
<div data-related="gdrive_settings">
|
|
|
|
@ -31,12 +31,12 @@
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
{% else %}
|
|
|
|
|
{% if show_authenticate_google_drive and g.user.is_authenticated and content.config_use_google_drive %}
|
|
|
|
|
{% if show_authenticate_google_drive and g.user.is_authenticated and config.config_use_google_drive %}
|
|
|
|
|
<div class="form-group required">
|
|
|
|
|
<a href="{{ url_for('gdrive.authenticate_google_drive') }}" class="btn btn-primary">{{_('Authenticate Google Drive')}}</a>
|
|
|
|
|
</div>
|
|
|
|
|
{% else %}
|
|
|
|
|
{% if show_authenticate_google_drive and g.user.is_authenticated and not content.config_use_google_drive %}
|
|
|
|
|
{% if show_authenticate_google_drive and g.user.is_authenticated and not config.config_use_google_drive %}
|
|
|
|
|
<div >{{_('Please hit submit to continue with setup')}}</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% if not g.user.is_authenticated %}
|
|
|
|
@ -48,14 +48,14 @@
|
|
|
|
|
<label for="config_google_drive_folder">{{_('Google Drive Calibre folder')}}</label>
|
|
|
|
|
<select name="config_google_drive_folder" id="config_google_drive_folder" class="form-control">
|
|
|
|
|
{% for gdrivefolder in gdrivefolders %}
|
|
|
|
|
<option value="{{ gdrivefolder.title }}" {% if gdrivefolder.title == content.config_google_drive_folder %}selected{% endif %}>{{ gdrivefolder.title }}</option>
|
|
|
|
|
<option value="{{ gdrivefolder.title }}" {% if gdrivefolder.title == config.config_google_drive_folder %}selected{% endif %}>{{ gdrivefolder.title }}</option>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
{% if content.config_google_drive_watch_changes_response %}
|
|
|
|
|
{% if config.config_google_drive_watch_changes_response %}
|
|
|
|
|
<label for="config_google_drive_watch_changes_response">{{_('Metadata Watch Channel ID')}}</label>
|
|
|
|
|
<div class="form-group input-group required">
|
|
|
|
|
<input type="text" class="form-control" name="config_google_drive_watch_changes_response" id="config_google_drive_watch_changes_response" value="{{ content.config_google_drive_watch_changes_response['id'] }} expires on {{ content.config_google_drive_watch_changes_response['expiration'] | strftime }}" autocomplete="off" disabled="">
|
|
|
|
|
<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 {{ content.config_google_drive_watch_changes_response['expiration'] | strftime }}" autocomplete="off" disabled="">
|
|
|
|
|
<span class="input-group-btn"><a href="{{ url_for('gdrive.revoke_watch_gdrive') }}" class="btn btn-primary">{{_('Revoke')}}</a></span>
|
|
|
|
|
</div>
|
|
|
|
|
{% else %}
|
|
|
|
@ -83,23 +83,23 @@
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="config_port">{{_('Server Port')}}</label>
|
|
|
|
|
<input type="number" min="1" max="65535" class="form-control" name="config_port" id="config_port" value="{% if content.config_port != None %}{{ content.config_port }}{% endif %}" autocomplete="off" required>
|
|
|
|
|
<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>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="config_certfile">{{_('SSL certfile location (leave it empty for non-SSL Servers)')}}</label>
|
|
|
|
|
<input type="text" class="form-control" name="config_certfile" id="config_certfile" value="{% if content.config_certfile != None %}{{ content.config_certfile }}{% endif %}" autocomplete="off">
|
|
|
|
|
<input type="text" class="form-control" name="config_certfile" id="config_certfile" value="{% if config.config_certfile != None %}{{ config.config_certfile }}{% endif %}" autocomplete="off">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="config_keyfile">{{_('SSL Keyfile location (leave it empty for non-SSL Servers)')}}</label>
|
|
|
|
|
<input type="text" class="form-control" name="config_keyfile" id="config_keyfile" value="{% if content.config_keyfile != None %}{{ content.config_keyfile }}{% endif %}" autocomplete="off">
|
|
|
|
|
<input type="text" class="form-control" name="config_keyfile" id="config_keyfile" value="{% if config.config_keyfile != None %}{{ config.config_keyfile }}{% endif %}" autocomplete="off">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="config_updater">{{_('Update channel')}}</label>
|
|
|
|
|
<select name="config_updater" id="config_updater" class="form-control">
|
|
|
|
|
<option value="0" {% if content.config_updatechannel == 0 %}selected{% endif %}>{{_('Stable')}}</option>
|
|
|
|
|
<!--option value="1" {% if content.config_updatechannel == 1 %}selected{% endif %}>{{_('Stable (Automatic)')}}</option-->
|
|
|
|
|
<option value="2" {% if content.config_updatechannel == 2 %}selected{% endif %}>{{_('Nightly')}}</option>
|
|
|
|
|
<!--option-- value="3" {% if content.config_updatechannel == 3 %}selected{% endif %}>{{_('Nightly (Automatic)')}}</option-->
|
|
|
|
|
<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-->
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -119,15 +119,15 @@
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="config_log_level">{{_('Log Level')}}</label>
|
|
|
|
|
<select name="config_log_level" id="config_log_level" class="form-control">
|
|
|
|
|
<option value="10" {% if content.config_log_level == 10 %}selected{% endif %}>DEBUG</option>
|
|
|
|
|
<option value="20" {% if content.config_log_level == 20 or content.config_log_level == None %}selected{% endif %}>INFO</option>
|
|
|
|
|
<option value="30" {% if content.config_log_level == 30 %}selected{% endif %}>WARNING</option>
|
|
|
|
|
<option value="40" {% if content.config_log_level == 40 %}selected{% endif %}>ERROR</option>
|
|
|
|
|
<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>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="config_logfile">{{_('Location and name of logfile (calibre-web.log for no entry)')}}</label>
|
|
|
|
|
<input type="text" class="form-control" name="config_logfile" id="config_logfile" value="{% if content.config_logfile != None %}{{ content.config_logfile }}{% endif %}" autocomplete="off">
|
|
|
|
|
<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>
|
|
|
|
|
</div>
|
|
|
|
@ -144,35 +144,35 @@
|
|
|
|
|
<div id="collapsefive" class="panel-collapse collapse">
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<input type="checkbox" id="config_uploading" name="config_uploading" {% if content.config_uploading %}checked{% endif %}>
|
|
|
|
|
<input type="checkbox" id="config_uploading" name="config_uploading" {% if config.config_uploading %}checked{% endif %}>
|
|
|
|
|
<label for="config_uploading">{{_('Enable uploading')}}</label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<input type="checkbox" id="config_anonbrowse" name="config_anonbrowse" {% if content.config_anonbrowse %}checked{% endif %}>
|
|
|
|
|
<input type="checkbox" id="config_anonbrowse" name="config_anonbrowse" {% if config.config_anonbrowse %}checked{% endif %}>
|
|
|
|
|
<label for="config_anonbrowse">{{_('Enable anonymous browsing')}}</label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<input type="checkbox" id="config_public_reg" name="config_public_reg" {% if content.config_public_reg %}checked{% endif %}>
|
|
|
|
|
<input type="checkbox" id="config_public_reg" name="config_public_reg" {% if config.config_public_reg %}checked{% endif %}>
|
|
|
|
|
<label for="config_public_reg">{{_('Enable public registration')}}</label>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<input type="checkbox" id="config_remote_login" name="config_remote_login" {% if content.config_remote_login %}checked{% endif %}>
|
|
|
|
|
<input type="checkbox" id="config_remote_login" name="config_remote_login" {% if config.config_remote_login %}checked{% endif %}>
|
|
|
|
|
<label for="config_remote_login">{{_('Enable remote login ("magic link")')}}</label>
|
|
|
|
|
</div>
|
|
|
|
|
{% if feature_support['goodreads'] %}
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<input type="checkbox" id="config_use_goodreads" name="config_use_goodreads" data-control="goodreads-settings" {% if content.config_use_goodreads %}checked{% endif %}>
|
|
|
|
|
<input type="checkbox" id="config_use_goodreads" name="config_use_goodreads" data-control="goodreads-settings" {% if config.config_use_goodreads %}checked{% endif %}>
|
|
|
|
|
<label for="config_use_goodreads">{{_('Use')}} Goodreads</label>
|
|
|
|
|
<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>
|
|
|
|
|
<input type="text" class="form-control" id="config_goodreads_api_key" name="config_goodreads_api_key" value="{% if content.config_goodreads_api_key != None %}{{ content.config_goodreads_api_key }}{% endif %}" autocomplete="off">
|
|
|
|
|
<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">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="config_goodreads_api_secret">{{_('Goodreads API Secret')}}</label>
|
|
|
|
|
<input type="text" class="form-control" id="config_goodreads_api_secret" name="config_goodreads_api_secret" value="{% if content.config_goodreads_api_secret != None %}{{ content.config_goodreads_api_secret }}{% endif %}" autocomplete="off">
|
|
|
|
|
<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">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
@ -180,13 +180,13 @@
|
|
|
|
|
<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 content.config_login_type == 0 %}selected{% endif %}>{{_('Use standard Authentication')}}</option>
|
|
|
|
|
<option value="0" {% if config.config_login_type == 0 %}selected{% endif %}>{{_('Use standard Authentication')}}</option>
|
|
|
|
|
{% if feature_support['ldap'] %}
|
|
|
|
|
<option value="1" {% if content.config_login_type == 1 %}selected{% endif %}>{{_('Use LDAP Authentication')}}</option>
|
|
|
|
|
<option value="1" {% if config.config_login_type == 1 %}selected{% endif %}>{{_('Use LDAP Authentication')}}</option>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% if feature_support['oauth'] %}
|
|
|
|
|
<option value="2" {% if content.config_login_type == 2 %}selected{% endif %}>{{_('Use GitHub OAuth')}}</option>
|
|
|
|
|
<option value="3" {% if content.config_login_type == 3 %}selected{% endif %}>{{_('Use Google OAuth')}}</option>
|
|
|
|
|
<option value="2" {% if config.config_login_type == 2 %}selected{% endif %}>{{_('Use GitHub OAuth')}}</option>
|
|
|
|
|
<option value="3" {% if config.config_login_type == 3 %}selected{% endif %}>{{_('Use Google OAuth')}}</option>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
@ -194,11 +194,11 @@
|
|
|
|
|
<div data-related="login-settings-1">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="config_ldap_provider_url">{{_('LDAP Provider URL')}}</label>
|
|
|
|
|
<input type="text" class="form-control" id="config_ldap_provider_url" name="config_ldap_provider_url" value="{% if content.config_ldap_provider_url != None %}{{ content.config_ldap_provider_url }}{% endif %}" autocomplete="off">
|
|
|
|
|
<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_dn">{{_('LDAP Distinguished Name (DN)')}}</label>
|
|
|
|
|
<input type="text" class="form-control" id="config_ldap_dn" name="config_ldap_dn" value="{% if content.config_ldap_dn != None %}{{ content.config_ldap_dn }}{% endif %}" autocomplete="off">
|
|
|
|
|
<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>
|
|
|
|
|
{% endif %}
|
|
|
|
@ -209,11 +209,11 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="config_github_oauth_client_id">{{_('GitHub OAuth Client Id')}}</label>
|
|
|
|
|
<input type="text" class="form-control" id="config_github_oauth_client_id" name="config_github_oauth_client_id" value="{% if content.config_github_oauth_client_id != None %}{{ content.config_github_oauth_client_id }}{% endif %}" autocomplete="off">
|
|
|
|
|
<input type="text" class="form-control" id="config_github_oauth_client_id" name="config_github_oauth_client_id" value="{% if config.config_github_oauth_client_id != None %}{{ config.config_github_oauth_client_id }}{% endif %}" autocomplete="off">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="config_github_oauth_client_secret">{{_('GitHub OAuth Client Secret')}}</label>
|
|
|
|
|
<input type="text" class="form-control" id="config_github_oauth_client_secret" name="config_github_oauth_client_secret" value="{% if content.config_github_oauth_client_secret != None %}{{ content.config_github_oauth_client_secret }}{% endif %}" autocomplete="off">
|
|
|
|
|
<input type="text" class="form-control" id="config_github_oauth_client_secret" name="config_github_oauth_client_secret" value="{% if config.config_github_oauth_client_secret != None %}{{ config.config_github_oauth_client_secret }}{% endif %}" autocomplete="off">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div data-related="login-settings-3">
|
|
|
|
@ -222,11 +222,11 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="config_google_oauth_client_id">{{_('Google OAuth Client Id')}}</label>
|
|
|
|
|
<input type="text" class="form-control" id="config_google_oauth_client_id" name="config_google_oauth_client_id" value="{% if content.config_google_oauth_client_id != None %}{{ content.config_google_oauth_client_id }}{% endif %}" autocomplete="off">
|
|
|
|
|
<input type="text" class="form-control" id="config_google_oauth_client_id" name="config_google_oauth_client_id" value="{% if config.config_google_oauth_client_id != None %}{{ config.config_google_oauth_client_id }}{% endif %}" autocomplete="off">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="config_google_oauth_client_secret">{{_('Google OAuth Client Secret')}}</label>
|
|
|
|
|
<input type="text" class="form-control" id="config_google_oauth_client_secret" name="config_google_oauth_client_secret" value="{% if content.config_google_oauth_client_secret != None %}{{ content.config_google_oauth_client_secret }}{% endif %}" autocomplete="off">
|
|
|
|
|
<input type="text" class="form-control" id="config_google_oauth_client_secret" name="config_google_oauth_client_secret" value="{% if config.config_google_oauth_client_secret != None %}{{ config.config_google_oauth_client_secret }}{% endif %}" autocomplete="off">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
@ -246,27 +246,27 @@
|
|
|
|
|
<div id="collapseeight" class="panel-collapse collapse">
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<div><input type="radio" name="config_ebookconverter" id="converter0" value="0" {% if content.config_ebookconverter == 0 %}checked{% endif %}>
|
|
|
|
|
<div><input type="radio" name="config_ebookconverter" id="converter0" value="0" {% if config.config_ebookconverter == 0 %}checked{% endif %}>
|
|
|
|
|
<label for="converter0">{{_('No converter')}}</label></div>
|
|
|
|
|
<div><input type="radio" name="config_ebookconverter" id="converter1" value="1" {% if content.config_ebookconverter == 1 %}checked{% endif %}>
|
|
|
|
|
<div><input type="radio" name="config_ebookconverter" id="converter1" value="1" {% if config.config_ebookconverter == 1 %}checked{% endif %}>
|
|
|
|
|
<label for="converter1">{{_('Use Kindlegen')}}</label></div>
|
|
|
|
|
<div><input type="radio" name="config_ebookconverter" id="converter2" value="2" {% if content.config_ebookconverter == 2 %}checked{% endif %}>
|
|
|
|
|
<div><input type="radio" name="config_ebookconverter" id="converter2" value="2" {% if config.config_ebookconverter == 2 %}checked{% endif %}>
|
|
|
|
|
<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>
|
|
|
|
|
<input type="text" class="form-control" id="config_calibre" name="config_calibre" value="{% if content.config_calibre != None %}{{ content.config_calibre }}{% endif %}" autocomplete="off">
|
|
|
|
|
<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>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="config_calibre">{{_('Path to convertertool')}}</label>
|
|
|
|
|
<input type="text" class="form-control" id="config_converterpath" name="config_converterpath" value="{% if content.config_converterpath != None %}{{ content.config_converterpath }}{% endif %}" autocomplete="off">
|
|
|
|
|
<input type="text" class="form-control" id="config_converterpath" name="config_converterpath" value="{% if config.config_converterpath != None %}{{ config.config_converterpath }}{% endif %}" autocomplete="off">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% if rarfile_support %}
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="config_rarfile_location">{{_('Location of Unrar binary')}}</label>
|
|
|
|
|
<input type="text" class="form-control" name="config_rarfile_location" id="config_rarfile_location" value="{% if content.config_rarfile_location != None %}{{ content.config_rarfile_location }}{% endif %}" autocomplete="off">
|
|
|
|
|
<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">
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|