{% import "macros/groups.twig" as grpmac %}
<div class="form-table table-pad-1">
<div class="table-row">
<div class="table-min-width table-pad-right text-right table-cell">
<label for="trusted_supplier">
{{ __("Trusted Supplier") }}:
</label>
</div>
<div class="table-cell">
<select id="trusted_supplier" name="universal[airship][trusted-supplier]">
{% for supplier, data in suppliers %}
<option
value="{{ supplier|e('html_attr') }}"
{% if supplier == universal.airship['trusted-supplier'] %} selected="selected"{% endif %}
>{{ supplier }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="table-row">
<div class="table-min-width table-pad-right text-right table-cell">
<label for="update_frequency">
{{ __("Check for Updates Every") }}:
</label>
</div>
<div class="table-cell">
<select id="update_frequency" name="universal[auto-update][check]">
<option {% if universal["auto-update"].check == 900 %} selected="selected"{% endif %} value="900">
{{ __("15 Minutes") }}
</option>
<option {% if universal["auto-update"].check == 1800 %} selected="selected"{% endif %} value="1800">
{{ __("30 Minutes") }}
</option>
<option {% if universal["auto-update"].check == 3600 %} selected="selected"{% endif %} value="3600">
{{ __("1 Hour (60 Minutes) - Recommended") }}
</option>
<option {% if universal["auto-update"].check == 21600 %} selected="selected"{% endif %} value="21600">
{{ __("6 Hours") }}
</option>
<option {% if universal["auto-update"].check == 43200 %} selected="selected"{% endif %} value="43200">
{{ __("12 Hours") }}
</option>
<option {% if universal["auto-update"].check == 86400 %} selected="selected"{% endif %} value="86400">
{{ __("24 Hours (1 Day)") }}
</option>
<option {% if universal["auto-update"].check == 604800 %} selected="selected"{% endif %} value="604800">
{{ __("7 Days (1 Week)") }}
</option>
</select>
<fieldset class="updates_auto">
<legend>{{ __("Automatically apply changes to") }}:</legend>
<div class="multiline_checkbox_container">
<div class="multiline_checkbox">
<input
{% if universal["auto-update"].major %} checked="checked"{% endif %}
id="update_major"
name="universal[auto-update][major]"
type="checkbox"
value="1"
/>
<label for="update_major">{{ __("Major version changes") }} (<code>1.5.2 -> 2.0.0</code>)</label>
</div>
<div class="multiline_checkbox">
<input
{% if universal["auto-update"].minor %} checked="checked"{% endif %}
id="update_minor"
name="universal[auto-update][minor]"
type="checkbox"
value="1"
/>
<label for="update_minor">{{ __("Minor version changes") }} (<code>1.5.2 -> 1.6.0</code>)</label>
</div>
<div class="multiline_checkbox">
<input
{% if universal["auto-update"].patch %} checked="checked"{% endif %}
id="update_patch"
name="universal[auto-update][patch]"
type="checkbox"
value="1"
/>
<label for="update_patch">{{ __("Patch version changes") }} (<code>1.5.2 -> 1.6.0</code>)</label>
</div>
</div>
</fieldset>
</div>
</div>
<div class="table-row">
<div class="table-min-width table-pad-right text-right table-cell">
<label for="ledger_driver">
{{ __("Application Logs") }}:
</label>
</div>
<div class="table-cell">
<select id="ledger_driver" name="universal[ledger][driver]">
<option
{% if universal.ledger.driver == "file" %} selected{% endif %}
value="file"
>{{ __("Store logs in the filesystem") }}</option>
<option
{% if universal.ledger.driver == "database" %} selected{% endif %}
value="database"
>{{ __("Store logs in a database table") }}</option>
</select>
</div>
</div>
<div class="table-row">
<div class="table-min-width table-pad-right text-right table-cell">
<label for="ledger_details" id="ledger_details_label">
{{ __("Log Directory") }}:
</label>
</div>
<div class="table-cell">
<input id="ledger_details" type="text" name="universal[ledger][path]" value="{{ universal.ledger.path|e('html_attr') }}" />
</div>
</div>
<div class="table-row">
<div class="table-min-width table-pad-right text-right table-cell">
<label for="session_domain">
{{ __("Session Domain") }}:
</label>
</div>
<div class="table-cell">
<input
id="session_domain"
type="text"
name="universal[session_config][cookie_domain]"
value="{{ universal['session_config']['cookie_domain']|e('html_attr') }}"
/>
({{ __("Blank defaults to current host") }})
</div>
</div>
<div class="table-row">
<div class="table-min-width table-pad-right text-right table-cell align-top">
<label for="guest_groups">
{{ __("Guest Groups") }}:
</label>
</div>
<div class="table-cell">
<select id="guest_groups" name="universal[guest_groups][]" id="guest_groups" multiple="multiple">
{% for g in groups %}
{{
grpmac.selectBox(g, universal["guest_groups"])
}}
{% endfor %}
</select>
</div>
</div>
<div class="table-row">
<div class="table-min-width table-pad-right text-right table-cell align-top">
<label for="default-groups">
{{ __("New Users' Groups") }}:
</label>
</div>
<div class="table-cell">
<select id="guest_groups" name="universal[default-groups][]" id="default-groups" multiple="multiple">
{% for g in groups %}
{{
grpmac.selectBox(g, universal["default-groups"])
}}
{% endfor %}
</select>
</div>
</div>
<div class="table-row">
<div class="table-min-width table-pad-right text-right table-cell">
{{ __("Authentication Rate-Limiting") }}:
</div>
<div class="table-cell">
<!-- Begin Rate-Limiting Table -->
<div class="table full-width">
<div class="table-row">
<div class="table-min-width table-pad-right text-right table-cell align-top">
{{ __("Options") }}:
</div>
<div class="table-cell full-width">
<div class="multiline_checkbox_container">
<div class="multiline_checkbox">
<input
id="rate-limiting-expire"
type="checkbox"
name="universal[rate-limiting][expire]"
value="1"
{% if universal['rate-limiting']['expire'] %}
checked="checked"
{% endif %}
/>
<label for="rate-limiting-expire">
{{ __("Fast Exit? This is better for security, but worse for usability.") }}
</label>
</div>
</div>
</div>
</div>
<div class="table-row">
<div class="table-min-width table-pad-right text-right table-cell align-top">
<label for="rate-limiting-expire">{{ __("Expiration") }}:</label>
</div>
<div class="table-cell full-width">
<input
id="rate-limiting-expire"
type="text"
name="universal[rate-limiting][expire]"
placeholder="{{ __("43200 = 12 hours")|e('html_attr') }}"
value="{{ universal['rate-limiting']['expire']|e('html_attr') }}"
/> ({{ __("seconds") }})
</div>
</div>
<div class="table-row">
<div class="table-min-width table-pad-right text-right table-cell align-top">
<label for="rate-limiting-first-delay">{{ __("First Delay") }}:</label>
</div>
<div class="table-cell full-width">
<input
id="rate-limiting-first-delay"
type="text"
placeholder="0.25"
name="universal[rate-limiting][first-delay]"
value="{{ universal['rate-limiting']['first-delay']|e('html_attr') }}"
/> ({{ __("seconds") }})
</div>
</div>
<div class="table-row">
<div class="table-min-width table-pad-right text-right table-cell align-top">
<label for="rate-limiting-max-delay">{{ __("Maximum Delay") }}:</label>
</div>
<div class="table-cell full-width">
<input
id="rate-limiting-max-delay"
type="text"
placeholder="0.25"
name="universal[rate-limiting][max-delay]"
value="{{ universal['rate-limiting']['max-delay']|e('html_attr') }}"
/> ({{ __("seconds") }})
</div>
</div>
<div class="table-row">
<div class="table-min-width table-pad-right text-right table-cell align-top">
<label for="rate-limiting-ipv4-subnet">{{ __("IPv4 Subnet") }}:</label>
</div>
<div class="table-cell full-width">
<input
id="rate-limiting-ipv4-subnet"
type="text"
name="universal[rate-limiting][ipv4-subnet]"
pattern="^[0-9]+$"
placeholder="32"
size="4"
value="{{ universal['rate-limiting']['ipv4-subnet']|e('html_attr') }}"
/>
</div>
</div>
<div class="table-row">
<div class="table-min-width table-pad-right text-right table-cell align-top">
<label for="rate-limiting-ipv6-subnet">{{ __("IPv6 Subnet") }}:</label>
</div>
<div class="table-cell full-width">
<input
id="rate-limiting-ipv6-subnet"
type="text"
name="universal[rate-limiting][ipv6-subnet]"
pattern="^[0-9]+$"
placeholder="128"
size="4"
value="{{ universal['rate-limiting']['ipv6-subnet']|e('html_attr') }}"
/>
</div>
</div>
<div class="table-row">
<div class="table-min-width table-pad-right text-right table-cell align-top">
<label for="rate-limiting-log-after">{{ __("Log Threshold") }}:</label>
</div>
<div class="table-cell full-width">
<input
id="rate-limiting-log-after"
type="text"
name="universal[rate-limiting][log-after]"
value="{{ universal['rate-limiting']['log-after']|e('html_attr') }}"
/> ({{ __("failed attempts") }})
</div>
</div>
<div class="table-row">
<div class="table-min-width table-pad-right text-right table-cell align-top">
<label for="rate-limiting-log-public-key">{{ __("Log Public Key") }}:</label>
</div>
<div class="table-cell full-width">
<input
id="rate-limiting-log-public-key"
class="full-width"
type="text"
pattern="^[0-9A-Fa-f]{64}$"
name="universal[rate-limiting][log-public-key]"
value="{{ universal['rate-limiting']['log-public-key']|e('html_attr') }}"
/>
</div>
</div>
</div>
<!-- End Rate-Limiting Table -->
</div>
</div>
{% set transports = ["Sendmail", "SMTP", "File"] %}
<div class="table-row">
<div class="table-min-width table-pad-right text-right table-cell">
{{ __("Email Configuration") }}:
</div>
<div class="table-cell">
<!-- Begin email configuration table -->
<div class="table full-width" id="email_config_table">
<div class="table-row">
<div class="table-min-width table-pad-right text-right table-cell align-top">
<label for="email_from">
{{ __("Send Emails From") }}:
</label>
</div>
<div class="table-cell full-width">
<input
id="email_from"
type="text"
name="universal[email][from]"
value="{{ universal['email']['from']|e('html_attr') }}"
/>
</div>
</div>
<div class="table-row">
<div class="table-min-width table-pad-right text-right table-cell align-top">
<label for="email_transport">
{{ __("Transport") }}:
</label>
</div>
<div class="table-cell full-width">
<select id="email_transport" name="universal[email][transport]">
{% for tr in transports %}
<option value="{{ __(tr)|e('html_attr') }}" {% if universal['email']['transport'] == tr %} selected="selected"{% endif %}>
{{ __(tr) }}
</option>
{% endfor %}
</select>
</div>
</div>
{#
-- Email options --
Visibility is managed by the data-transport attribute
and is processed in the admin_settings.js file.
#}
<div class="table-row config-email-toggled" data-transport="{{ ["File"]|json_encode|e('html_attr') }}">
<div class="table-min-width table-pad-right text-right table-cell align-top">
<label for="email_file_path">
{{ __("File Path") }}:
</label>
</div>
<div class="table-cell full-width">
<input
id="email_file_path"
class="full-width"
type="text"
name="universal[email][file][path]"
placeholder="/home/user/mail"
value="{{ universal['email']['file']['path']|e('html_attr') }}"
/>
</div>
</div>
<div class="table-row config-email-toggled" data-transport="{{ ["Sendmail"]|json_encode|e('html_attr') }}">
<div class="table-min-width table-pad-right text-right table-cell align-top">
<label for="email_sendmail_parameters">
{{ __("Sendmail Parameters") }}:
</label>
</div>
<div class="table-cell full-width">
<input
id="email_sendmail_parameters"
class="full-width"
type="text"
name="universal[email][sendmail][parameters]"
placeholder="-freturn_to_me@example.com"
value="{{ universal['email']['sendmail']['parameters']|e('html_attr') }}"
/>
</div>
</div>
<div class="table-row config-email-toggled" data-transport="{{ ["SMTP"]|json_encode|e('html_attr') }}">
<div class="table-min-width table-pad-right text-right table-cell align-top">
<label for="email_smtp_name">
{{ __("SMTP Name") }}:
</label>
</div>
<div class="table-cell full-width">
<input
id="email_smtp_name"
type="text"
name="universal[email][smtp][name]"
placeholder="localhost.localdomain"
value="{{ universal['email']['smtp']['name']|e('html_attr') }}"
/>
</div>
</div>
<div class="table-row config-email-toggled" data-transport="{{ ["SMTP"]|json_encode|e('html_attr') }}">
<div class="table-min-width table-pad-right text-right table-cell align-top">
<label for="email_smtp_host">
{{ __("SMTP Host") }}:
</label>
</div>
<div class="table-cell full-width">
<input
id="email_smtp_host"
type="text"
name="universal[email][smtp][host]"
placeholder="127.0.0.1"
value="{{ universal['email']['smtp']['host']|e('html_attr') }}"
/>
</div>
</div>
<div class="table-row config-email-toggled" data-transport="{{ ["SMTP"]|json_encode|e('html_attr') }}">
<div class="table-min-width table-pad-right text-right table-cell align-top">
<label for="email_smtp_port">
{{ __("SMTP Port") }}:
</label>
</div>
<div class="table-cell full-width">
<input
id="email_smtp_port"
type="text"
name="universal[email][smtp][port]"
placeholder="25"
value="{{ universal['email']['smtp']['port']|e('html_attr') }}"
/>
</div>
</div>
<div class="table-row config-email-toggled" data-transport="{{ ["SMTP"]|json_encode|e('html_attr') }}">
<div class="table-min-width table-pad-right text-right table-cell align-top">
<label for="email_smtp_connection_class">
{{ __("Connection Class") }}:
</label>
</div>
<div class="table-cell full-width">
<select
id="email_smtp_connection_class"
name="universal[email][smtp][connection_class]"
>{% for key, label in {
"smtp": "SMTP (No username or password needed)",
"plain": "PLAIN Authentication",
"login": "LOGIN Authentication",
"cdammd5": "CRAM-MD5 Authentication"
} %}
<option
{% if key == universal['email']['smtp']['connection_class'] %}
selected="selected"
{% endif %}
value="{{ key|e('html_attr') }}"
>
{{ __(label) }}
</option>
{% endfor %}
</select>
</div>
</div>
<div class="table-row config-email-toggled" data-transport="{{ ["SMTP"]|json_encode|e('html_attr') }}">
<div class="table-min-width table-pad-right text-right table-cell align-top">
<label for="email_smtp_username">
{{ __("SMTP Username") }}:
</label>
</div>
<div class="table-cell full-width">
<input
id="email_smtp_username"
type="text"
name="universal[email][smtp][username]"
value="{{ universal['email']['smtp']['username']|e('html_attr') }}"
/>
</div>
</div>
<div class="table-row config-email-toggled" data-transport="{{ ["SMTP"]|json_encode|e('html_attr') }}">
<div class="table-min-width table-pad-right text-right table-cell align-top">
<label for="email_smtp_password">
{{ __("SMTP Password") }}:
</label>
</div>
<div class="table-cell full-width">
<input
id="email_smtp_password"
type="text"
name="universal[email][smtp][password]"
value="{{ universal['email']['smtp']['password']|e('html_attr') }}"
/>
</div>
</div>
<div class="table-row config-email-toggled" data-transport="{{ ["SMTP"]|json_encode|e('html_attr') }}">
<div class="table-min-width table-pad-right text-right table-cell align-top">
<label for="email_smtp_options">
{{ __("SMTP Options") }}:
</label>
</div>
<div class="table-cell full-width">
<div class="multiline_checkbox">
<input
id="email_smtp_disable_tls"
type="checkbox"
name="universal[email][smtp][disable_tls]"
value="1"
{% if universal['email']['smtp']['disable_tls'] %}
checked="checked"
{% endif %}
/>
<label for="email_smtp_disable_tls">
{{ __("Disable SSL/TLS for Sending Emails? (Degrades security, often needed for compatibility.)") }}
</label>
</div>
</div>
</div>
</div>
<!-- End email configuration table -->
</div>
</div>
<div class="table-row">
<div class="table-min-width table-pad-right text-right table-cell">
<label for="ledger_driver">
{{ __("Optional Features") }}:
</label>
</div>
<div class="table-cell">
<div class="multiline_checkbox_container">
<div class="multiline_checkbox">
<input
{% if universal["tor-only"] %} checked="checked"{% endif %}
id="network-tor"
name="universal[tor-only]"
type="checkbox"
value="1"
/>
<label for="network-tor">
{{ __(
"Proxy all requests over %s?", "default" ,
"<a href=\"https://www.torproject.org/about/overview\">Tor</a>"
) }}
</label>
</div>
<div class="multiline_checkbox">
<input
{% if universal["twig-cache"] %} checked="checked"{% endif %}
id="twig-cache"
name="universal[twig-cache]"
type="checkbox"
value="1"
/>
<label for="twig-cache">
{{ __("Cache templates?") }}
</label>
</div>
<div class="multiline_checkbox">
<input
{% if universal["debug"] %} checked="checked"{% endif %}
id="debug-mode"
name="universal[debug]"
type="checkbox"
value="1"
/>
<label for="debug-mode">
{{ __("Debug Mode (not recommended in production environments)") }}
</label>
</div>
<div class="multiline_checkbox">
<input
{% if universal["notary"]["enabled"] %} checked="checked"{% endif %}
id="notary-enabled"
name="universal[notary][enabled]"
type="checkbox"
value="1"
/>
<label for="notary-enabled">
{{ __("Notarize Updates for other Airships?") }}
</label>
</div>
</div>
</div>
</div>
</div>
|