1 {% extends 'page.html.twig' %}
4 <form action="{{ url_for('store-preferences') }}" method="post" enctype="multipart/form-data" class="ui form">
5 <div class="ui stackable pointing inverted wrapping centered fluid menu tabbed">
6 <a href="{{ url_for('preferences') }}?tab=general" class="item{{ tab == 'general' ? ' active' }}" data-tab="general">{{ _T("General") }}</a>
7 <a href="{{ url_for('preferences') }}?tab=social" class="item{{ tab == 'social' ? ' active' }}" data-tab="social">{{ _T("Social networks") }}</a>
8 <a href="{{ url_for('preferences') }}?tab=parameters" class="item{{ tab == 'parameters' ? ' active' }}" data-tab="parameters">{{ _T("Parameters") }}</a>
9 <a href="{{ url_for('preferences') }}?tab=rights" class="item{{ tab == 'rights' ? ' active' }}" data-tab="rights">{{ _T("Rights") }}</a>
10 <a href="{{ url_for('preferences') }}?tab=mail" class="item{{ tab == 'mail' ? ' active' }}" data-tab="mail">{{ _T("E-Mail") }}</a>
11 <a href="{{ url_for('preferences') }}?tab=labels" class="item{{ tab == 'labels' ? ' active' }}" data-tab="labels">{{ _T("Labels") }}</a>
12 <a href="{{ url_for('preferences') }}?tab=cards" class="item{{ tab == 'cards' ? ' active' }}" data-tab="cards">{{ _T("Cards") }}</a>
13 {% if login.isAdmin() %}
14 <a href="{{ url_for('preferences') }}?tab=security" class="item{{ tab == 'security' ? ' active' }}" data-tab="security">{{ _T("Security parameters") }}</a>
16 {% if login.isSuperAdmin() %}
17 <a href="{{ url_for('preferences') }}?tab=admin" class="item{{ tab == 'admin' ? ' active' }}" data-tab="admin">{{ _T("Admin") }}</a>
20 <div class="ui{{ tab == 'general' ? ' active' }} tab segment" data-tab="general">
21 <div class="ui stackable two column grid">
23 <div class="{% if required.pref_nom is defined and required.pref_nom == 1 %}required {% endif %} field">
24 <label for="pref_nom">{{ _T("Name of the association:") }}</label>
25 <input type="text" name="pref_nom" id="pref_nom" value="{{ pref.pref_nom }}" maxlength="190"{% if required.pref_nom is defined and required.pref_nom == 1 %} required="required"{% endif %}/>
28 <label for="pref_slogan">{{ _T("Association's short description:") }}
29 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Enter here a short description for your association, it will be displayed on the index page and into pages' title.") }}" aria-hidden="true"></i>
31 <div class="ui action input">
32 <input type="text" name="pref_slogan" id="pref_slogan" value="{{ pref.pref_slogan }}"/>
34 href="{{ url_for("dynamicTranslations", {"text_orig": pref.pref_slogan|escape}) }}"
35 class="tooltip ui icon button"
36 title="{{ _T("Translate '%s'")|replace({'%s': pref.pref_slogan}) }}"
38 <i class="language icon" aria-hidden="true"></i>
39 <span class="visually-hidden">{{ _T("Translate '%s'")|replace({'%s': pref.pref_slogan}) }}</span>
45 <div class="field wide ui items">
46 <label>{{ _T("Logo:") }}</label>
48 {% if logo.isCustom() %}
50 <img src="{{ url_for('logo') }}" class="picture" width="{{ logo.getOptimalWidth() }}" height="{{ logo.getOptimalHeight() }}" alt="{{ _T("Current logo") }}"/>
54 <div class="description">
55 <div class="ui file action input">
56 <input type="file" name="logo" id="logo_picture"{% if callstatic('\\Galette\\Core\\Galette', 'isDemo') %} disabled="disabled"{% endif %}/>
57 <label for="logo_picture" class="ui button{% if callstatic('\\Galette\\Core\\Galette', 'isDemo') %} disabled{% endif %}">
58 <i class="blue upload icon" aria-hidden="true"></i>
59 {% if logo.isCustom() %}{{ _T("Choose another file") }}{% else %}{{ _T("Choose a file") }}{% endif %}
63 <div class="extra ui basic fitted segment">
64 {% if logo.isCustom() %}
65 <div class="ui toggle checkbox">
66 <input type="checkbox" name="del_logo" id="del_logo" value="1"/>
67 <label for="del_logo" class="labelalign">{{ _T("Delete image") }}</label>
76 <div class="ui stackable two column grid">
79 <label for="pref_adresse">{{ _T("Address:") }}</label>
80 <input type="text" name="pref_adresse" id="pref_adresse" value="{{ pref.pref_adresse }}" maxlength="190"/><br/>
83 <label for="pref_adresse2" class="libelle">{{ _T("Address:") }} {{ _T(" (continuation)") }}</label>
84 <input type="text" name="pref_adresse2" id="pref_adresse2" value="{{ pref.pref_adresse2 }}" maxlength="190"/>
87 <label for="pref_cp">{{ _T("Zip Code:") }}</label>
88 <input type="text" name="pref_cp" id="pref_cp" value="{{ pref.pref_cp }}" maxlength="10"/>
91 <label for="pref_ville">{{ _T("City:") }}</label>
92 <input type="text" name="pref_ville" id="pref_ville" value="{{ pref.pref_ville }}" maxlength="100"/>
95 <label for="pref_pays">{{ _T("Country:") }}</label>
96 <input type="text" name="pref_pays" id="pref_pays" value="{{ pref.pref_pays }}" maxlength="50"/>
99 <label for="pref_website">{{ _T("Website:") }}</label>
100 <input type="text" name="pref_website" id="pref_website" value="{{ pref.pref_website }}" maxlength="100"/>
106 {{ _T("Postal address:") }}
107 <i class="circular inverted primary small icon info tooltip" title="{{ _T("Use either the address setted below or select a staff member to retrieve he's address.") }}" aria-hidden="true"></i>
109 <div class="inline fields">
111 <label for="pref_postal_adress_0">{{ _T("from preferences") }}</label>
112 <input type="radio" name="pref_postal_adress" id="pref_postal_adress_0" value="{{ constant('Galette\\Core\\Preferences::POSTAL_ADDRESS_FROM_PREFS') }}" {% if pref.pref_postal_adress == constant('Galette\\Core\\Preferences::POSTAL_ADDRESS_FROM_PREFS') %}checked="checked"{% endif %}/>
115 <label for="pref_postal_adress_1">{{ _T("from a staff user") }}</label>
116 <input type="radio" name="pref_postal_adress" id="pref_postal_adress_1" value="{{ constant('Galette\\Core\\Preferences::POSTAL_ADDRESS_FROM_STAFF') }}" {% if pref.pref_postal_adress == constant('Galette\\Core\\Preferences::POSTAL_ADDRESS_FROM_STAFF') %}checked="checked"{% endif %}/>
119 <label for="pref_postal_staff_member">{{ _T("Staff member") }}</label>
120 <select name="pref_postal_staff_member" id="pref_postal_staff_member" class="ui search dropdown">
121 <option value="-1">{{ _T("-- Choose a staff member --") }}</option>
122 {% for staff in staff_members %}
123 <option value="{{ staff.id }}"{% if staff.id == pref.pref_postal_staff_member %} selected="selected"{% endif %}>{{ staff.name }} ({{ staff.sstatus }})</option>
128 <label for="pref_footer">{{ _T("Footer text:") }}</label>
129 <div class="ui right corner labeled input">
130 <div class="ui corner label">
131 <i class="circular inverted primary icon info tooltip" title="{{ _T("Enter a text (HTML allowed) that will be displayed in the footer of every page") }}" aria-hidden="true"></i>
133 <textarea name="pref_footer" id="pref_footer" rows="2">{{ pref.pref_footer }}</textarea>
138 {{ _T("Telemetry date:") }}
139 <i class="circular inverted primary small icon info tooltip" title="{{ _T("Last telemetry sent date.") }}" aria-hidden="true"></i>
142 {{ preferences.getTelemetryDate() }}
143 - <a href="#" id="telemetry" class="ui labeled icon button"><i class="chart bar icon" aria-hidden="true"></i> {{ _T("send") }}</a>
148 {{ _T("Registration date:") }}
149 <i class="circular inverted primary small icon info tooltip" title="{{ _T("Date on which you registered your Galette instance.") }}" aria-hidden="true"></i>
152 {% if pref.pref_registration_date %}
153 {% set regtxt = _T("Update your information") %}
154 {{ preferences.getRegistrationDate() }}
156 {% set regtxt = _T("Register") %}
157 {{ _T("Not registered") }}
159 - <a href="{{ constant('GALETTE_TELEMETRY_URI') }}reference?showmodal&uuid={{ pref.pref_registration_uuid }}" id="register" target="_blank" class="ui labeled icon button"><i class="pen alternate icon" aria-hidden="true"></i>{{ regtxt }}</a>
163 </div>{# /column grid #}
164 </div>{# /tab segment #}
165 {% set socials = preferences.socials %}
166 {% include "elements/edit_socials.html.twig" with {tabbed: true} %}
167 <div class="ui{{ tab == 'parameters' ? ' active' }} tab segment" data-tab="parameters">
168 <div class="ui stackable two column grid">
170 <div class="{% if required.pref_lang is defined and required.pref_lang == 1 %}required {% endif %}field">
171 <label for="pref_lang" >{{ _T("Default language:") }}</label>
172 <select name="pref_lang" id="pref_lang" class="lang ui search dropdown"{% if required.pref_lang is defined and required.pref_lang == 1 %} required="required"{% endif %}>
173 {% for langue in languages %}
174 <option value="{{ langue.getID() }}" {% if pref.pref_lang == langue.getID() %}selected="selected"{% endif %}>{{ langue.getName()|capitalize }}</option>
178 {#<div class="field">
179 <label for="pref_theme">{{ _T("Default theme:") }}</label>
180 <select name="pref_theme" id="pref_theme" class="ui search dropdown">
181 {% for theme in themes %}
182 <option value="{{ theme }}" {% if pref.pref_theme == theme %}selected="selected"{% endif %}>{{ theme|capitalize }}</option>
186 <div class="{% if required.pref_numrows is defined and required.pref_numrows == 1 %}required {% endif %}field">
187 <label for="pref_numrows">{{ _T("Lines / Page:") }}</label>
188 <select name="pref_numrows" id="pref_numrows" class="ui search dropdown"{% if required.pref_numrows is defined and required.pref_numrows == 1 %} required="required"{% endif %}>
189 {% for key, value in pref_numrows_options %}
190 <option value="{{ key }}"{% if key == pref.pref_numrows %} selected="selected"{% endif %}>{{ value }}</option>
195 <label for="pref_redirect_on_create">{{ _T("After member creation:") }}</label>
196 <select name="pref_redirect_on_create" id="pref_redirect_on_create" class="ui search dropdown">
197 <option value="{{ constant('Galette\\Entity\\Adherent::AFTER_ADD_DEFAULT') }}"{% if pref.pref_redirect_on_create == constant('Galette\\Entity\\Adherent::AFTER_ADD_DEFAULT') %} selected="selected"{% endif %}>{{ _T("create a new contribution (default action)") }}</option>
198 <option value="{{ constant('Galette\\Entity\\Adherent::AFTER_ADD_TRANS') }}"{% if pref.pref_redirect_on_create == constant('Galette\\Entity\\Adherent::AFTER_ADD_TRANS') %} selected="selected"{% endif %}>{{ _T("create a new transaction") }}</option>
199 <option value="{{ constant('Galette\\Entity\\Adherent::AFTER_ADD_NEW') }}"{% if pref.pref_redirect_on_create == constant('Galette\\Entity\\Adherent::AFTER_ADD_NEW') %} selected="selected"{% endif %}>{{ _T("create another new member") }}</option>
200 <option value="{{ constant('Galette\\Entity\\Adherent::AFTER_ADD_SHOW') }}"{% if pref.pref_redirect_on_create == constant('Galette\\Entity\\Adherent::AFTER_ADD_SHOW') %} selected="selected"{% endif %}>{{ _T("show member") }}</option>
201 <option value="{{ constant('Galette\\Entity\\Adherent::AFTER_ADD_LIST') }}"{% if pref.pref_redirect_on_create == constant('Galette\\Entity\\Adherent::AFTER_ADD_LIST') %} selected="selected"{% endif %}>{{ _T("go to members list") }}</option>
202 <option value="{{ constant('Galette\\Entity\\Adherent::AFTER_ADD_HOME') }}"{% if pref.pref_redirect_on_create == constant('Galette\\Entity\\Adherent::AFTER_ADD_HOME') %} selected="selected"{% endif %}>{{ _T("go to main page") }}</option>
205 <div class="{% if required.pref_log is defined and required.pref_log == 1 %}required {% endif %}field">
206 <label for="pref_log">{{ _T("Logging level:") }}</label>
207 <select name="pref_log" id="pref_log" class="ui search dropdown"{% if required.pref_log is defined and required.pref_log == 1 %} required="required"{% endif %}>
208 <option value="{{ constant('Galette\\Core\\Preferences::LOG_DISABLED') }}" {% if pref.pref_log == constant('Galette\\Core\\Preferences::LOG_DISABLED') %}selected="selected"{% endif %}>{{ _T("Disabled") }}</option>
209 <option value="{{ constant('Galette\\Core\\Preferences::LOG_ENABLED') }}" {% if pref.pref_log == constant('Galette\\Core\\Preferences::LOG_ENABLED') %}selected="selected"{% endif %}>{{ _T("Enabled") }}</option>
213 <label for="pref_filter_account">{{ _T("Default account filter:") }}</label>
214 <select name="pref_filter_account" id="pref_filter_account" class="ui search dropdown">
215 {% for key, value in accounts_options %}
216 <option value="{{ key }}"{% if key == pref.pref_filter_account %} selected="selected"{% endif %}>{{ value }}</option>
221 <label for="pref_default_paymenttype">{{ _T("Default payment type:") }}</label>
222 <select name="pref_default_paymenttype" id="pref_default_paymenttype" class="ui search dropdown">
223 {% for key, value in paymenttypes %}
224 <option value="{{ key }}"{% if key == pref.pref_default_paymenttype %} selected="selected"{% endif %}>{{ value }}</option>
230 <div class="field inline">
231 <div class="ui right aligned toggle checkbox">
232 <input type="checkbox" name="pref_bool_publicpages" id="pref_bool_publicpages" value="1" {% if pref.pref_bool_publicpages %} checked="checked"{% endif %}/>
233 <label for="pref_bool_publicpages">{{ _T("Public pages enabled?") }}</label>
236 <div id="publicpages_visibility" class="field{% if not pref.pref_bool_publicpages %} displaynone{% endif %}">
237 <label for="pref_publicpages_visibility">{{ _T("Show public pages for") }}</label>
238 <select name="pref_publicpages_visibility" id="pref_publicpages_visibility" class="ui search dropdown">
239 <option value="{{ constant('Galette\\Core\\Preferences::PUBLIC_PAGES_VISIBILITY_PUBLIC') }}"{% if pref.pref_publicpages_visibility == constant('Galette\\Core\\Preferences::PUBLIC_PAGES_VISIBILITY_PUBLIC') %} selected="selected"{% endif %}>{{ _T("Everyone") }}</option>
240 <option value="{{ constant('Galette\\Core\\Preferences::PUBLIC_PAGES_VISIBILITY_RESTRICTED') }}"{% if pref.pref_publicpages_visibility == constant('Galette\\Core\\Preferences::PUBLIC_PAGES_VISIBILITY_RESTRICTED') %} selected="selected"{% endif %}>{{ _T("Up to date members") }}</option>
241 <option value="{{ constant('Galette\\Core\\Preferences::PUBLIC_PAGES_VISIBILITY_PRIVATE') }}"{% if pref.pref_publicpages_visibility == constant('Galette\\Core\\Preferences::PUBLIC_PAGES_VISIBILITY_PRIVATE') %} selected="selected"{% endif %}>{{ _T("Admin and staff only") }}</option>
244 <div class="field inline">
245 <div class="ui right aligned toggle checkbox">
246 <input type="checkbox" name="pref_force_picture_ratio" id="pref_force_picture_ratio" value="1" {% if pref.pref_force_picture_ratio == 1 %}checked="checked"{% endif %}/>
247 <label for="pref_force_picture_ratio">{{ _T("Force member picture ratio") }}</label>
249 <i class="tooltip circular inverted primary small icon info" data-html="{{ _T("If checked, the members's picture will be resized and cropped to the ratio selected below.") }}" data-variation="inverted wide" aria-hidden="true"></i>
251 <div id="pref_member_picture_ratio_field" class="inline field{% if pref.pref_force_picture_ratio != 1 %} displaynone{% endif %}">
252 <label for="pref_member_picture_ratio">{{ _T("Select a ratio") }}</label>
253 <select name="pref_member_picture_ratio" id="pref_member_picture_ratio" class="ui dropdown">
254 <option value="square_ratio"{% if pref.pref_member_picture_ratio == 'square_ratio' %} selected="selected"{% endif %}>{{ _T("Square (1:1)") }}</option>
255 <option value="portrait_ratio"{% if pref.pref_member_picture_ratio == 'portrait_ratio' %} selected="selected"{% endif %}>{{ _T("Portrait (3:4)") }}</option>
256 <option value="landscape_ratio"{% if pref.pref_member_picture_ratio == 'landscape_ratio' %} selected="selected"{% endif %}>{{ _T("Landscape (4:3)") }}</option>
259 <div class="field inline">
260 <div class="ui right aligned toggle checkbox">
261 <input type="checkbox" name="pref_bool_selfsubscribe" id="pref_bool_selfsubscribe" value="1"{% if pref.pref_bool_selfsubscribe %} checked="checked"{% endif %}/>
262 <label for="pref_bool_selfsubscribe">{{ _T("Self subscription enabled?") }}</label>
266 <label for="pref_new_contrib_script">{{ _T("Post new contribution script URI") }}</label>
267 <div class="ui right corner labeled input">
268 <div class="ui corner label">
269 <i class="circular inverted primary icon info tooltip" data-html="{{ _T("Enter a script URI that would be called after adding a new contribution.<br/>Script URI must be prefixed by one of '<em>galette://</em>' for Galette internal call. '<em>file://</em>' for a direct file call, '<em>get://</em>' or '<em>post://</em>' for HTTP calls (prefix will be replaced by http:// in those cases).") }}" aria-hidden="true"></i>
271 <input type="text" name="pref_new_contrib_script" id="pref_new_contrib_script" value="{{ pref.pref_new_contrib_script }}"/>
275 <label for="pref_rss_url">{{ _T("RSS feed URL") }}</label>
276 <div class="ui right corner labeled input">
277 <div class="ui corner label">
278 <i class="circular inverted primary icon info tooltip" title="{{ _T("Enter the full URL to the RSS feed. It will be displayed on Galette desktop.") }}" aria-hidden="true"></i>
280 <input type="text" name="pref_rss_url" id="pref_rss_url" value="{{ pref.pref_rss_url }}"/>
284 <label for="pref_galette_url">{{ _T("Galette base URL") }}</label>
285 <div class="ui right corner labeled input">
286 <div class="ui corner label">
287 <i class="circular inverted primary icon info tooltip" data-html="{{ _T("Enter the base URL to your Galette instance. You should only change this parameter if the current page URL is not:<br/>%galette_url")|replace({"%galette_url": preferences.getDefaultURL() ~ url_for('preferences')}) }}" aria-hidden="true"></i>
289 <input type="text" name="pref_galette_url" id="pref_galette_url" placeholder="{{ preferences.getDefaultURL() }}" value="{{ pref.pref_galette_url }}"/>
292 <div class="field inline">
293 <div class="ui right aligned toggle checkbox">
294 <input type="checkbox" name="pref_show_id" id="pref_show_id" value="1" {% if pref.pref_show_id %} checked="checked"{% endif %}/>
295 <label for="pref_show_id">{{ _T("Show identifiers") }}</label>
297 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Display database identifiers in related windows") }}" aria-hidden="true"></i>
300 </div>{# /column grid #}
301 <div class="ui stackable two column grid">
303 <div class="field{% if required.pref_statut is defined and required.pref_statut == 1 %} required{% endif %}">
304 <label for="pref_statut">{{ _T("Default membership status:") }}</label>
305 <select name="pref_statut" id="pref_statut" class="ui search dropdown"{% if required.pref_statut is defined and required.pref_statut == 1 %} required="required"{% endif %}>
306 {% for key, value in statuts %}
307 <option value="{{ key }}"{% if key == pref.pref_statut %} selected="selected"{% endif %}>{{ value }}</option>
312 <label for="pref_membership_ext">{{ _T("Default membership extension:") }}</label>
313 <div class="ui right labeled input">
314 <input type="text" name="pref_membership_ext" id="pref_membership_ext" value="{{ pref.pref_membership_ext }}" maxlength="2"/>
315 <div class="ui basic label">
323 <label for="pref_beg_membership">{{ _T("Beginning of membership:") }}</label>
324 <input type="text" name="pref_beg_membership" id="pref_beg_membership" value="{{ pref.pref_beg_membership }}" maxlength="5"/>
325 <span class="exemple">{{ _T("(dd/mm)") }}</span>
328 <label for="pref_membership_offermonths">{{ _T("Number of months offered:") }}</label>
329 <div class="ui right corner labeled input">
330 <div class="ui corner label">
331 <i class="circular inverted primary icon info tooltip" data-html="{{ _T("When using the beginning of membership option; you can offer the last months of the year.") }}<br/>{{ _T("Let's say you offer last 2 months, and have a renewal on 31th of December. All created contributions in current year will be valid until this date, but as of October, they will be valid for the entire next year.") }}" aria-hidden="true"></i>
333 <input type="number" name="pref_membership_offermonths" min="0" id="pref_membership_offermonths" value="{{ pref.pref_membership_offermonths }}" maxlength="5"/>
337 </div>{# /column grid #}
338 </div>{# /tab segment #}
339 <div class="ui{{ tab == 'rights' ? ' active' }} tab segment" data-tab="rights">
340 <div class="ui stackable two column grid">
342 <div class="field inline">
343 <div class="ui right aligned toggle checkbox">
344 <input type="checkbox" name="pref_bool_create_member" id="pref_bool_create_member" value="1" {% if pref.pref_bool_create_member == 1 %}checked="checked"{% endif %}/>
345 <label for="pref_bool_create_member">{{ _T("Can members create child?") }}</label>
348 <div class="field inline">
349 <div class="ui right aligned toggle checkbox">
350 <input type="checkbox" name="pref_bool_groupsmanagers_edit_groups" id="pref_bool_groupsmanagers_edit_groups" value="1" {% if pref.pref_bool_groupsmanagers_edit_groups == 1 %}checked="checked"{% endif %}/>
351 <label for="pref_bool_groupsmanagers_edit_groups">{{ _T("Can group managers edit their groups?") }}</label>
354 <div class="field inline">
355 <div class="ui right aligned toggle checkbox">
356 <input type="checkbox" name="pref_bool_groupsmanagers_create_member" id="pref_bool_groupsmanagers_create_member" value="1" {% if pref.pref_bool_groupsmanagers_create_member == 1 %}checked="checked"{% endif %}/>
357 <label for="pref_bool_groupsmanagers_create_member">{{ _T("Can group managers create members?") }}</label>
360 <div class="field inline">
361 <div class="ui right aligned toggle checkbox">
362 <input type="checkbox" name="pref_bool_groupsmanagers_edit_member" id="pref_bool_groupsmanagers_edit_member" value="1" {% if pref.pref_bool_groupsmanagers_edit_member == 1 %}checked="checked"{% endif %}/>
363 <label for="pref_bool_groupsmanagers_edit_member">{{ _T("Can group managers edit members?") }}</label>
366 <div class="field inline">
367 <div class="ui right aligned toggle checkbox">
368 <input type="checkbox" name="pref_bool_groupsmanagers_mailings" id="pref_bool_groupsmanagers_mailings" value="1" {% if pref.pref_bool_groupsmanagers_mailings == 1 %}checked="checked"{% endif %}/>
369 <label for="pref_bool_groupsmanagers_mailings">{{ _T("Can group managers send mailings?") }}</label>
372 <div class="field inline">
373 <div class="ui right aligned toggle checkbox">
374 <input type="checkbox" name="pref_bool_groupsmanagers_exports" id="pref_bool_groupsmanagers_exports" value="1" {% if pref.pref_bool_groupsmanagers_exports == 1 %}checked="checked"{% endif %}/>
375 <label for="pref_bool_groupsmanagers_exports">{{ _T("Can group managers do exports?") }}</label>
377 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Groups managers will be allowed to export members as csv, pdf cards, attendence sheetss and groups pdf") }}" aria-hidden="true"></i>
381 </div>{# /tab segment #}
382 <div class="ui{{ tab == 'mail' ? ' active' }} tab segment" data-tab="mail">
383 {% if callstatic('\\Galette\\Core\\Galette', 'isDemo') %}
384 <div class="ui icon negative message">
385 <i class="ban icon" aria-hidden="true"></i>
386 <div class="content">
387 {{ _T("Application runs under demo mode. This functionnality is not enabled, sorry.") }}
391 <div class="ui stackable two column grid">
394 <label for="pref_email_nom">{{ _T("Sender name:") }}</label>
395 <input type="text" name="pref_email_nom" id="pref_email_nom" value="{{ pref.pref_email_nom }}" maxlength="50"/>
398 <label for="pref_email">{{ _T("Sender Email:") }}</label>
399 <input type="text" name="pref_email" id="pref_email" value="{{ pref.pref_email }}" maxlength="100" size="30"/>
402 <label for="pref_email_reply_to">{{ _T("Reply-To Email:") }}</label>
403 <div class="ui right corner labeled input">
404 <div class="ui corner label">
405 <i class="circular inverted primary icon info tooltip" title="{{ _T("Leave empty to use Sender Email as reply address") }}" aria-hidden="true"></i>
407 <input type="text" name="pref_email_reply_to" id="pref_email_reply_to" value="{{ pref.pref_email_reply_to }}" maxlength="100" size="30"/>
411 {% set pref_email_newadh = preferences.vpref_email_newadh|join(',') %}
412 <label for="pref_email_newadh">{{ _T("Members administrator's Email:") }}</label>
413 <div class="ui right corner labeled input">
414 <div class="ui corner label">
415 <i class="circular inverted primary icon info tooltip" title="{{ _T("Recipient of new online registation and edition emails") }}" aria-hidden="true"></i>
417 <input type="text" name="pref_email_newadh" id="pref_email_newadh" value="{{ pref_email_newadh }}" maxlength="100" size="30"/>
419 <span class="exemple">{{ _T("(You can enter several emails separated with a comma. First address will be the default one.)") }}</span>
421 <div class="field inline">
422 <div class="ui right aligned toggle checkbox">
423 <input type="checkbox" name="pref_bool_mailadh" id="pref_bool_mailadh" value="1" {% if pref.pref_bool_mailadh == 1 %}checked="checked"{% endif %}/>
424 <label for="pref_bool_mailadh">{{ _T("Send email to administrators?") }}</label>
426 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Sends an email each time a new member registers online or edit his/her account") }}" aria-hidden="true"></i>
428 <div class="field inline">
429 <div class="ui right aligned toggle checkbox">
430 <input type="checkbox" name="pref_bool_wrap_mails" id="pref_bool_wrap_mails" value="1" {% if pref.pref_bool_wrap_mails == 1 %}checked="checked"{% endif %}/>
431 <label for="pref_bool_wrap_mails">{{ _T("Wrap emails text?") }}</label>
433 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Automatically wrap emails texts before sending. Make sure to wrap yourself if you disable that. Please note that current editing mailing will not be affected by a change.") }}" aria-hidden="true"></i>
435 <div class="field inline">
436 <div class="ui right aligned toggle checkbox">
437 <input type="checkbox" name="pref_bool_mailowner" id="pref_bool_mailowner" value="1" {% if pref.pref_bool_mailowner == 1 %}checked="checked"{% endif %}/>
438 <label for="pref_bool_mailowner">{{ _T("Send email to members?") }}</label>
440 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Sends an email each time a member card or a contribution has been added or edited. This can be disabled for each case.") }}" aria-hidden="true"></i>
442 <div class="field inline">
443 <div class="ui right aligned toggle checkbox">
444 <input type="checkbox" name="pref_editor_enabled" id="pref_editor_enabled" value="1" {% if pref.pref_editor_enabled == 1 %}checked="checked"{% endif %}/>
445 <label for="pref_editor_enabled">{{ _T("Activate HTML editor?") }}</label>
447 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Should HTML editor be activated on page load ?") }}" aria-hidden="true"></i>
449 <div class="field mail_sign">
450 <label for="pref_mail_sign">{{ _T("Mail signature") }}</label>
451 <div class="ui right corner labeled input">
452 <div class="ui corner label" id="mail_sign">
454 <textarea name="pref_mail_sign" id="pref_mail_sign" rows="5">{{ pref.pref_mail_sign }}</textarea>
459 <div class="grouped fields">
460 <label>{{ _T("Emailing method:") }}</label>
462 <div class="ui radio checkbox">
463 <input type="radio" name="pref_mail_method" id="no" value="{{ constant('Galette\\Core\\GaletteMail::METHOD_DISABLED') }}" {% if pref.pref_mail_method == constant('Galette\\Core\\GaletteMail::METHOD_DISABLED') %}checked="checked"{% endif %}/><label for="no">{{ _T("Emailing disabled") }}</label>
467 <div class="ui radio checkbox">
468 <input type="radio" name="pref_mail_method" id="php" value="{{ constant('Galette\\Core\\GaletteMail::METHOD_PHPMAIL') }}" {% if pref.pref_mail_method == constant('Galette\\Core\\GaletteMail::METHOD_PHPMAIL') %}checked="checked"{% endif %}/><label for="php">{{ _T("PHP mail() function") }}</label>
472 <div class="ui radio checkbox">
473 <input type="radio" name="pref_mail_method" id="smtp" value="{{ constant('Galette\\Core\\GaletteMail::METHOD_SMTP') }}" {% if pref.pref_mail_method == constant('Galette\\Core\\GaletteMail::METHOD_SMTP') %}checked="checked"{% endif %}/><label for="smtp">{{ _T("Using a SMTP server (slower)") }}</label>
477 <div class="ui radio checkbox">
478 <input type="radio" name="pref_mail_method" id="gmail" value="{{ constant('Galette\\Core\\GaletteMail::METHOD_GMAIL') }}" {% if pref.pref_mail_method == constant('Galette\\Core\\GaletteMail::METHOD_GMAIL') %}checked="checked"{% endif %}/><label for="gmail">{{ _T("Using GMAIL as SMTP server (slower)") }}</label>
482 <div class="ui radio checkbox">
483 <input type="radio" name="pref_mail_method" id="sendmail" value="{{ constant('Galette\\Core\\GaletteMail::METHOD_SENDMAIL') }}" {% if pref.pref_mail_method == constant('Galette\\Core\\GaletteMail::METHOD_SENDMAIL') %}checked="checked"{% endif %}/><label for="sendmail">{{ _T("Using Sendmail server") }}</label>
487 <div class="ui radio checkbox">
488 <input type="radio" name="pref_mail_method" id="qmail" value="{{ constant('Galette\\Core\\GaletteMail::METHOD_QMAIL') }}" {% if pref.pref_mail_method == constant('Galette\\Core\\GaletteMail::METHOD_QMAIL') %}checked="checked"{% endif %}/><label for="qmail">{{ _T("Using QMAIL server") }}</label>
493 href="{{ url_for('testEmail') }}"
495 class="ui labeled icon button"
497 <i class="rocket icon" aria-hidden="true"></i>
498 {{ _T("Test email settings") }}
501 <div id="smtp_parameters" class="field">
503 <label for="pref_mail_smtp_host">{{ _T("SMTP server:") }}</label>
504 <input type="text" name="pref_mail_smtp_host" id="pref_mail_smtp_host" value="{{ pref.pref_mail_smtp_host }}" maxlength="100" size="30"/>
507 <label for="pref_mail_smtp_port">{{ _T("SMTP port:") }}</label>
508 <input type="text" name="pref_mail_smtp_port" id="pref_mail_smtp_port" value="{{ pref.pref_mail_smtp_port }}" size="10"/>
510 <div class="grouped fields">
511 <div class="field inline">
512 <div class="ui right aligned toggle checkbox">
513 <input type="checkbox" name="pref_mail_smtp_auth" id="pref_mail_smtp_auth" value="1" {% if pref.pref_mail_smtp_auth == 1 %}checked="checked"{% endif %}/>
514 <label for="pref_mail_smtp_auth">{{ _T("Use SMTP authentication?") }}</label>
516 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Would emailing use any SMTP authentication? You'll have to provide username and password below. For GMail, authentication will always be on.") }}" aria-hidden="true"></i>
518 <div class="field inline">
519 <div class="ui right aligned toggle checkbox">
520 <input type="checkbox" name="pref_mail_smtp_secure" id="pref_mail_smtp_secure" value="1" {% if pref.pref_mail_smtp_secure == 1 %}checked="checked"{% endif %}/>
521 <label for="pref_mail_smtp_secure">{{ _T("Use TLS for SMTP?") }}</label>
523 <i class="circular small inverted primary icon info tooltip" data-html="{{ _T("Do you want to use server's TLS capabilities?<br/>For GMail, this will always be on.") }}" aria-hidden="true"></i>
525 <div class="field inline">
526 <div class="ui right aligned toggle checkbox">
527 <input type="checkbox" name="pref_mail_allow_unsecure" id="pref_mail_allow_unsecure" value="1" {% if pref.pref_mail_allow_unsecure == 1 %}checked="checked"{% endif %}/>
528 <label for="pref_mail_allow_unsecure">{{ _T("Allow unsecure TLS?") }}</label>
530 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Do you want to allow 'unsecure' connections? This may be usefull if you server uses a self-signed certificate, and on some other cases.") }}" aria-hidden="true"></i>
534 <div id="smtp_auth" class="field">
536 <label for="pref_mail_smtp_user">{{ _T("SMTP (or GMail) user:") }}</label>
537 <input type="text" name="pref_mail_smtp_user" id="pref_mail_smtp_user" value="{{ pref.pref_mail_smtp_user }}" maxlength="100" size="30"/>
540 <label for="pref_mail_smtp_password">{{ _T("SMTP (or GMail) password:") }}</label>
541 <input type="password" name="pref_mail_smtp_password" id="pref_mail_smtp_password" value="{{ pref.pref_mail_smtp_password }}" autocomplete="off" maxlength="100" size="30"/>
545 </div>{# /column grid #}
547 </div>{# /tab segment #}
548 <div class="ui{{ tab == 'labels' ? ' active' }} tab segment" data-tab="labels">
549 <div class="ui stackable two column grid">
551 <div class="{% if required.pref_etiq_marges_v is defined and required.pref_etiq_marges_v == 1 %}required {% endif %}field">
552 <label for="pref_etiq_marges_v">{{ _T("Vertical margins:") }}</label>
553 <div class="ui right labeled input">
554 <input type="number" name="pref_etiq_marges_v" id="pref_etiq_marges_v" value="{{ pref.pref_etiq_marges_v }}" maxlength="4"{% if required.pref_etiq_marges_v is defined and required.pref_etiq_marges_v == 1 %} required="required"{% endif %}/>
555 <div class="ui basic label">mm</div>
558 <div class="{% if required.pref_etiq_marges_h is defined and required.pref_etiq_marges_h == 1 %}required {% endif %}field">
559 <label for="pref_etiq_marges_h">{{ _T("Horizontal margins:") }}</label>
560 <div class="ui right labeled input">
561 <input type="number" name="pref_etiq_marges_h" id="pref_etiq_marges_h" value="{{ pref.pref_etiq_marges_h }}" maxlength="4"{% if required.pref_etiq_marges_h is defined and required.pref_etiq_marges_h == 1 %} required="required"{% endif %}/>
562 <div class="ui basic label">mm</div>
565 <div class="{% if required.pref_etiq_hspace is defined and required.pref_etiq_hspace == 1 %}required {% endif %}field">
566 <label for="pref_etiq_hspace">{{ _T("Horizontal spacing:") }}</label>
567 <div class="ui right labeled input">
568 <input type="number" name="pref_etiq_hspace" id="pref_etiq_hspace" value="{{ pref.pref_etiq_hspace }}" maxlength="4"{% if required.pref_etiq_hspace is defined and required.pref_etiq_hspace == 1 %} required="required"{% endif %}/>
569 <div class="ui basic label">mm</div>
572 <div class="{% if required.pref_etiq_vspace is defined and required.pref_etiq_vspace == 1 %}required {% endif %}field">
573 <label for="pref_etiq_vspace">{{ _T("Vertical spacing:") }}</label>
574 <div class="ui right labeled input">
575 <input type="number" name="pref_etiq_vspace" id="pref_etiq_vspace" value="{{ pref.pref_etiq_vspace }}" maxlength="4"{% if required.pref_etiq_vspace is defined and required.pref_etiq_vspace == 1 %} required="required"{% endif %}/>
576 <div class="ui basic label">mm</div>
579 <div class="field inline">
580 <div class="ui right aligned toggle checkbox">
581 <input type="checkbox" name="pref_etiq_border" id="pref_etiq_border" value="1" {% if pref.pref_etiq_border == 1 %}checked="checked"{% endif %}/>
582 <label for="pref_etiq_border">{{ _T("Print border") }}</label>
584 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Check this box to print a grey border around each label.") }}" aria-hidden="true"></i>
588 <div class="{% if required.pref_etiq_hsize is defined and required.pref_etiq_hsize == 1 %}required {% endif %}field">
589 <label for="pref_etiq_hsize">{{ _T("Label width:") }}</label>
590 <div class="ui right labeled input">
591 <input type="number" name="pref_etiq_hsize" id="pref_etiq_hsize" value="{{ pref.pref_etiq_hsize }}" maxlength="4"{% if required.pref_etiq_hsize is defined and required.pref_etiq_hsize == 1 %} required="required"{% endif %}/>
592 <div class="ui basic label">mm</div>
595 <div class="{% if required.pref_etiq_vsize is defined and required.pref_etiq_vsize == 1 %}required {% endif %}field">
596 <label for="pref_etiq_vsize">{{ _T("Label height:") }}</label>
597 <div class="ui right labeled input">
598 <input type="number" name="pref_etiq_vsize" id="pref_etiq_vsize" value="{{ pref.pref_etiq_vsize }}" maxlength="4"{% if required.pref_etiq_vsize is defined and required.pref_etiq_vsize == 1 %} required="required"{% endif %}/>
599 <div class="ui basic label">mm</div>
602 <div class="{% if required.pref_etiq_cols is defined and required.pref_etiq_cols == 1 %}required {% endif %}field">
603 <label for="pref_etiq_cols">{{ _T("Number of label columns:") }}</label>
604 <input type="number" name="pref_etiq_cols" id="pref_etiq_cols" value="{{ pref.pref_etiq_cols }}" maxlength="4"{% if required.pref_etiq_cols is defined and required.pref_etiq_cols == 1 %} required="required"{% endif %}/>
606 <div class="{% if required.pref_etiq_rows is defined and required.pref_etiq_rows == 1 %}required {% endif %}field">
607 <label for="pref_etiq_rows">{{ _T("Number of label lines:") }}</label>
608 <input type="number" name="pref_etiq_rows" id="pref_etiq_rows" value="{{ pref.pref_etiq_rows }}" maxlength="4"{% if required.pref_etiq_rows is defined and required.pref_etiq_rows == 1 %} required="required"{% endif %}/>
610 <div class="{% if required.pref_etiq_corps is defined and required.pref_etiq_corps == 1 %}required {% endif %}field">
611 <label for="pref_etiq_corps">{{ _T("Font size:") }}</label>
612 <input type="number" name="pref_etiq_corps" id="pref_etiq_corps" value="{{ pref.pref_etiq_corps }}" maxlength="4"{% if required.pref_etiq_corps is defined and required.pref_etiq_corps == 1 %} required="required"{% endif %}/>
615 </div>{# /column grid #}
616 </div>{# /tab segment #}
617 <div class="ui{{ tab == 'cards' ? ' active' }} tab segment" data-tab="cards">
618 <div class="ui icon info visible message">
619 <i class="info circle blue icon" aria-hidden="true"></i>
620 <div class="content">
621 {{ _T("Each card is 75mm width and 40mm height. Each page contains 2 columns and 6 rows.<br/>Double check margins and spacings ;)")|raw }}
624 <div class="ui stackable two column grid">
627 <label for="pref_card_abrev">{{ _T("Short Text (Card Center):") }}</label>
628 <div class="ui action input">
629 <input type="text" name="pref_card_abrev" id="pref_card_abrev" value="{{ pref.pref_card_abrev }}" maxlength="10"/>
631 href="{{ url_for("dynamicTranslations", {"text_orig": pref.pref_card_abrev|escape}) }}"
632 class="tooltip ui icon button{% if pref.pref_card_abrev is empty %} disabled{% endif %}"
633 title="{{ _T("Translate '%s'")|replace({"%s": pref.pref_card_abrev}) }}"
635 <i class="language icon" aria-hidden="true"></i>
636 <span class="visually-hidden">{{ _T("Translate '%s'")|replace({'%s': pref.pref_card_abrev}) }}</span>
639 <span class="exemple">{{ _T("(10 characters max)") }}</span>
642 <label for="pref_card_strip">{{ _T("Long Text (Bottom Line):") }}</label>
643 <div class="ui action input">
644 <input type="text" name="pref_card_strip" id="pref_card_strip" value="{{ pref.pref_card_strip }}" maxlength="65"/>
646 href="{{ url_for("dynamicTranslations", {"text_orig": pref.pref_card_strip|escape}) }}"
647 class="tooltip ui icon button{% if pref.pref_card_strip is empty %} disabled{% endif %}"
648 title="{{ _T("Translate '%s'")|replace({"%s": pref.pref_card_strip}) }}"
650 <i class="language icon" aria-hidden="true"></i>
651 <span class="visually-hidden">{{ _T("Translate '%s'")|replace({'%s': pref.pref_card_strip}) }}</span>
654 <span class="exemple">{{ _T("(65 characters max)") }}</span>
656 <div class="grouped fields">
657 <div class="inline field">
658 <label for="pref_card_tcol">{{ _T("Strip Text Color:") }}</label>
659 <input type="color" name="pref_card_tcol" id="pref_card_tcol" value="{{ pref.pref_card_tcol }}" size="7" maxlength="7"/>
660 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Hexadecimal color notation: #RRGGBB") }}" aria-hidden="true"></i>
662 <div class="inline field">
663 <label for="pref_card_scol">{{ _T("Active Member Color:") }}</label>
664 <input type="color" name="pref_card_scol" id="pref_card_scol" value="{{ pref.pref_card_scol }}" size="7" maxlength="7"/>
665 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Hexadecimal color notation: #RRGGBB") }}" aria-hidden="true"></i>
667 <div class="inline field">
668 <label for="pref_card_bcol">{{ _T("Board Members Color:") }}</label>
669 <input type="color" name="pref_card_bcol" id="pref_card_bcol" value="{{ pref.pref_card_bcol }}" size="7" maxlength="7"/>
670 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Hexadecimal color notation: #RRGGBB") }}" aria-hidden="true"></i>
672 <div class="inline field">
673 <label for="pref_card_hcol">{{ _T("Honor Members Color:") }}</label>
674 <input type="color" name="pref_card_hcol" id="pref_card_hcol" value="{{ pref.pref_card_hcol }}" size="7" maxlength="7"/>
675 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Hexadecimal color notation: #RRGGBB") }}" aria-hidden="true"></i>
677 </div>{# /group fields #}
678 <div class="field wide ui items">
679 <label>{{ _T("Logo:") }}</label>
681 {% if print_logo.isCustom() %}
683 <img src="{{ url_for('printLogo') }}" class="picture" width="{{ print_logo.getOptimalWidth() }}" height="{{ print_logo.getOptimalHeight() }}" alt="{{ _T("Current logo for printing") }}"/><br/>
686 <div class="content">
687 <div class="description">
688 <div class="ui file action input">
689 <input type="file" name="card_logo" id="card_logo"{% if callstatic('\\Galette\\Core\\Galette', 'isDemo') %} disabled="disabled"{% endif %}/>
690 <label for="card_logo" class="ui button{% if callstatic('\\Galette\\Core\\Galette', 'isDemo') %} disabled{% endif %}">
691 <i class="blue upload icon" aria-hidden="true"></i>
692 {% if print_logo.isCustom() %}{{ _T("Choose another file") }}{% else %}{{ _T("Choose a file") }}{% endif %}
696 <div class="extra ui basic fitted segment">
697 {% if print_logo.isCustom() %}
698 <div class="ui toggle checkbox">
699 <input type="checkbox" name="del_card_logo" id="del_card_logo" value="1" />
700 <label for="del_card_logo">{{ _T("Delete image") }}</label>
709 <div class="field inline">
710 <div class="ui right aligned toggle checkbox">
711 <input type="checkbox" name="pref_card_self" id="pref_card_self" value="1" {% if pref.pref_card_self == 1 %}checked="checked"{% endif %}/>
712 <label for="pref_card_self">{{ _T("Allow members to print card ?") }}</label>
715 <div class="field inline">
716 <div class="ui right aligned toggle checkbox">
717 <input type="checkbox" name="pref_bool_display_title" id="pref_bool_display_title" value="1" {% if pref.pref_bool_display_title == 1 %}checked="checked"{% endif %}/>
718 <label for="pref_bool_display_title">{{ _T("Show title ?") }}</label>
720 <i class="circular small inverted primary icon info tooltip" title="{{ _T("(Show or not title in front of name)") }}" aria-hidden="true"></i>
723 <label for="pref_card_address">{{ _T("Address type:") }}</label>
724 <select name="pref_card_address" id="pref_card_address" class="ui search dropdown">
725 <option value="0" {% if pref.pref_card_address == 0 %}selected="selected"{% endif %}>{{ _T("Email") }}</option>
726 <option value="5" {% if pref.pref_card_address == 5 %}selected="selected"{% endif %}>{{ _T("Zip - Town") }}</option>
727 <option value="6" {% if pref.pref_card_address == 6 %}selected="selected"{% endif %}>{{ _T("Nickname") }}</option>
728 <option value="7" {% if pref.pref_card_address == 7 %}selected="selected"{% endif %}>{{ _T("Profession") }}</option>
729 <option value="8" {% if pref.pref_card_address == 8 %}selected="selected"{% endif %}>{{ _T("Member number") }}</option>
731 <span class="exemple">{{ _T("(Choose address printed below name)") }}</span>
734 <label for="pref_card_year">{{ _T("Year:") }}</label>
735 <div class="ui right corner labeled input">
736 <div class="ui corner label">
737 <i class="circular inverted primary icon info tooltip" data-html="{{ _T("You can enter either:<br/>- a year,<br/>- two years with a slash as separator,<br/>- the string 'DEADLINE' to use member deadline") }}" aria-hidden="true"></i>
739 <input type="text" name="pref_card_year" id="pref_card_year" value="{{ pref.pref_card_year }}" maxlength="9"/>
742 <div class="{% if required.pref_card_marges_v is defined and required.pref_card_marges_v == 1 %}required {% endif %}field">
743 <label for="pref_card_marges_v">{{ _T("Vertical margins:") }}</label>
744 <div class="ui right labeled input">
745 <input type="number" name="pref_card_marges_v" id="pref_card_marges_v" value="{{ pref.pref_card_marges_v }}" maxlength="4"{% if required.pref_card_marges_v is defined and required.pref_card_marges_v == 1 %} required="required"{% endif %}/>
746 <div class="ui basic label">mm</div>
749 <div class="{% if required.pref_card_marges_h is defined and required.pref_card_marges_h == 1 %}required {% endif %}field">
750 <label for="pref_card_marges_h">{{ _T("Horizontal margins:") }}</label>
751 <div class="ui right labeled input">
752 <input type="number" name="pref_card_marges_h" id="pref_card_marges_h" value="{{ pref.pref_card_marges_h }}" maxlength="4"{% if required.pref_card_marges_h is defined and required.pref_card_marges_h == 1 %} required="required"{% endif %}/>
753 <div class="ui basic label">mm</div>
756 <div class="{% if required.pref_card_vspace is defined and required.pref_card_vspace == 1 %}required {% endif %}field">
757 <label for="pref_card_vspace">{{ _T("Vertical spacing:") }}</label>
758 <div class="ui right labeled input">
759 <input type="number" name="pref_card_vspace" id="pref_card_vspace" value="{{ pref.pref_card_vspace }}" maxlength="4"{% if required.pref_card_vspace is defined and required.pref_card_vspace == 1 %} required="required"{% endif %}/>
760 <div class="ui basic label">mm</div>
763 <div class="{% if required.pref_card_hspace is defined and required.pref_card_hspace == 1 %}required {% endif %}field">
764 <label for="pref_card_hspace">{{ _T("Horizontal spacing:") }}</label>
765 <div class="ui right labeled input">
766 <input type="number" name="pref_card_hspace" id="pref_card_hspace" value="{{ pref.pref_card_hspace }}" maxlength="4"{% if required.pref_card_hspace is defined and required.pref_card_hspace == 1 %} required="required"{% endif %}/>
767 <div class="ui basic label">mm</div>
771 </div>{# /column grid #}
772 </div>{# /tab segment #}
774 {% if login.isAdmin() %}
775 <div class="ui{{ tab == 'security' ? ' active' }} tab segment" data-tab="security">
776 <div class="inline field required">
777 <label for="pref_password_length">{{ _T("Password length:") }}</label>
778 <div class="ui right corner labeled input">
779 <div class="ui corner label">
780 <i class="circular inverted primary icon info tooltip" title="{{ _T("Minimum password length required for all accounts. Minimal size is 6.") }}" aria-hidden="true"></i>
782 <input type="number" name="pref_password_length" id="pref_password_length" value="{{ pref.pref_password_length }}" min="6" size="7" required="required"/>
785 <div class="inline field">
786 <div class="ui right aligned toggle checkbox">
787 <input type="checkbox" name="pref_password_blacklist" id="pref_password_blacklist" value="1"{% if pref.pref_password_blacklist == 1 %} checked="checked"{% endif %}/>
788 <label for="pref_password_blacklist" title="{{ _T("Enable password blacklists") }}">{{ _T("Enable blacklists:") }}</label>
790 <i class="circular small inverted primary icon info tooltip" title="{{ _T("If you enable blacklists; it will not be possible to use any of blacklisted passwords. A list is provided along with Galette, but you can add you owns.") }}" aria-hidden="true"></i>
792 <div class="inline field">
793 <label for="pref_password_strength" title="{{ _T("Enforce password strength") }}">{{ _T("Password strength:") }}</label>
794 <select name="pref_password_strength" id="pref_password_strength" class="ui dropdown">
795 <option value="{{ constant('Galette\\Core\\Preferences::PWD_NONE') }}"{% if pref.pref_password_strength == constant('Galette\\Core\\Preferences::PWD_NONE') %} selected="selected"{% endif %}>{{ _T("None (default)") }}</option>
796 <option value="{{ constant('Galette\\Core\\Preferences::PWD_WEAK') }}"{% if pref.pref_password_strength == constant('Galette\\Core\\Preferences::PWD_WEAK') %} selected="selected"{% endif %}>{{ _T("Weak") }}</option>
797 <option value="{{ constant('Galette\\Core\\Preferences::PWD_MEDIUM') }}"{% if pref.pref_password_strength == constant('Galette\\Core\\Preferences::PWD_MEDIUM') %} selected="selected"{% endif %}>{{ _T("Medium") }}</option>
798 <option value="{{ constant('Galette\\Core\\Preferences::PWD_STRONG') }}"{% if pref.pref_password_strength == constant('Galette\\Core\\Preferences::PWD_STRONG') %} selected="selected"{% endif %}>{{ _T("Strong") }}</option>
799 <option value="{{ constant('Galette\\Core\\Preferences::PWD_VERY_STRONG') }}"{% if pref.pref_password_strength == constant('Galette\\Core\\Preferences::PWD_VERY_STRONG') %} selected="selected"{% endif %}>{{ _T("Very strong") }}</option>
801 <i class="tooltip circular inverted primary small icon info" data-html="
802 <p>{{ _T("Enforce minimal password strength for all password.") }}<br/>
803 {{ _T("Levels are:") }}</p>
805 <li><em>* {{ _T("None") }}</em> {{ _T("for no strength enforcement") }}</li>
806 <li><em>* {{ _T("Weak") }}</em> {{ _T("require at least one matched rule") }}</li>
807 <li><em>* {{ _T("Medium") }}</em> {{ _T("require at least two matched rules") }}</li>
808 <li><em>* {{ _T("Strong") }}</em> {{ _T("require at least three matched rules (recommended for most usages)") }}</li>
809 <li><em>* {{ _T("Very strong") }}</em> {{ _T("requires all rules.") }}</li>
811 <p>{{ _T("Rules include lower case characters, upper case characters, numbers, and special characters.") }}<br/>
812 {{ _T("Note that with any enforcement level, user cannot use his personal information (name, login, ...) as password.") }}</p>
813 " data-variation="inverted very wide">
816 <div id="test_password_strength_field" class="inline field">
817 <label for="test_password_strength">{{ _T("Test a password:") }}</label>
818 <div class="ui right corner labeled input">
819 <div class="ui corner label">
820 <i class="circular inverted primary icon info tooltip" data-html="{{ _T("Test a password with current selected values.") }}<br/>{{ _T("Do not forget to save your preferences if you're happy with the result ;)") }}" aria-hidden="true"></i>
822 <input type="text" id="test_password_strength"/>
826 </div>{# /tab segment #}
828 {% if login.isSuperAdmin() %}
829 <div class="ui{{ tab == 'admin' ? ' active' }} tab red segment" data-tab="admin">
830 {% if callstatic('\\Galette\\Core\\Galette', 'isDemo') %}
831 <div class="ui icon negative message">
832 <i class="ban icon" aria-hidden="true"></i>
833 <div class="content">
834 {{ _T("Application runs under demo mode. This functionnality is not enabled, sorry.") }}
838 <div class="inline field{% if required.pref_admin_login is defined and required.pref_admin_login == 1 %} required{% endif %}">
839 <label for="pref_admin_login">{{ _T("Username:") }}</label>
840 <input type="text" name="pref_admin_login" id="pref_admin_login" value="{{ pref.pref_admin_login }}" maxlength="20"{% if required.pref_admin_login is defined and required.pref_admin_login == 1 %} required="required"{% endif %}/>
842 <div id="pref_admin_pass_field" class="inline field">
843 <label for="pref_admin_pass">{{ _T("Password:") }}</label>
844 <div class="ui input">
845 <input type="password" name="pref_admin_pass" id="pref_admin_pass" value="" maxlength="20" autocomplete="off"/>
848 <div class="inline field">
849 <label for="pref_admin_pass_check">{{ _T("Retype password:") }}</label>
850 <input type="password" name="pref_admin_pass_check" id="pref_admin_pass_check" value="" maxlength="20"/>
853 </div>{# /tab segment #}
855 <div class="ui basic center aligned segment">
856 <input type="hidden" name="valid" value="1"/>
857 <input type="hidden" name="pref_theme" value="default"/>
858 <input type="hidden" name="pref_telemetry_date" value="{{ pref.pref_telemetry_date }}"/>
859 <input type="hidden" name="pref_instance_uuid" value="{{ pref.pref_instance_uuid }}"/>
860 <input type="hidden" name="pref_registration_date" value="{{ pref.pref_registration_date }}"/>
861 <input type="hidden" name="pref_registration_uuid" value="{{ pref.pref_registration_uuid }}"/>
862 <input type="hidden" name="tab" id="tab" value="{{ tab }}"/>
863 <button type="submit" class="ui labeled icon primary button action">
864 <i class="save icon" aria-hidden="true"></i> {{ _T("Save") }}
867 {% include "components/forms/csrf.html.twig" %}
870 {% include "modals/telemetry.html.twig" with {part: "dialog"} %}
871 {% include "modals/replacements_legend.html.twig" with {legends: preferences.getLegend(), cur_ref: 'prefs'} %}
874 {% block javascripts %}
875 <script type="text/javascript">
876 {% include "elements/js/choose_social.js.twig" %}
879 {% if pref.pref_mail_method != constant('Galette\\Core\\GaletteMail::METHOD_SMTP') %}
880 $('#smtp_parameters').addClass('displaynone');
882 {% if pref.pref_mail_method != constant('Galette\\Core\\GaletteMail::METHOD_SMTP') and pref.pref_mail_method != constant('Galette\\Core\\GaletteMail::METHOD_GMAIL') %}
883 $('#smtp_auth').addClass('displaynone');
885 $('.ui.radio.checkbox').checkbox({
886 onChange: function() {
887 var _checked = $(this).closest('input').attr('id');
888 var _smtp_parameters = $(this).closest('.checkbox').parent().parent().siblings('#smtp_parameters');
889 var _smtp_auth = $(this).closest('.checkbox').parent().parent().siblings('#smtp_auth');
890 if ( _checked == 'smtp' ) {
891 _smtp_parameters.removeClass('displaynone');
892 _smtp_auth.removeClass('displaynone');
893 } else if ( _checked == 'gmail' ) {
894 _smtp_parameters.addClass('displaynone');
895 _smtp_auth.removeClass('displaynone');
897 _smtp_parameters.addClass('displaynone');
898 _smtp_auth.addClass('displaynone');
903 $('.pointing.menu .item').tab({
904 onVisible: function(tabPath) {
905 document.getElementById('tab').value = tabPath;
909 let _publicpages_status = document.getElementById('pref_bool_publicpages');
910 let _publicpages_visibility = document.getElementById('publicpages_visibility');
911 _publicpages_status.addEventListener('change', function () {
912 _publicpages_visibility.classList.toggle('displaynone');
916 let _crop_status = document.getElementById('pref_force_picture_ratio');
917 let _crop_ratio = document.getElementById('pref_member_picture_ratio_field');
918 _crop_status.addEventListener('change', function () {
919 _crop_ratio.classList.toggle('displaynone');
923 $('#btnmail').on('click', function(e) {
926 var _input = '<div class="ui input"><input type="text" name="email_adress" id="email_adress" value=""/></div>';
928 title: '{{ _T("Enter the email adress")|e('js') }}',
931 onApprove: function() {
933 url: _this.attr('href'),
936 adress: $('#email_adress').val()
938 {% include "elements/js/loader.js.twig" with {
939 selector: '#btnmail',
942 success: function(res) {
945 url: '{{ url_for('ajaxMessages') }}',
947 success: function (values) {
948 for (var type in values) {
950 if (type == 'success') {
956 minDisplayTime: 5000,
958 showProgress: 'bottom',
960 position: 'top attached',
961 title: values[type]['title'],
962 message: values[type]['messages'].join('<br/>'),
963 showIcon: values[type]['icon'],
972 {% include "elements/js/modal.js.twig" with {
973 modal_title_twig: _T("An error occurred sending test email :(")|e("js"),
974 modal_without_content: true,
976 modal_deny_only: true,
977 modal_cancel_text: _T("Close")|e("js"),
978 modal_classname: "redalert",
984 text : '{{ _T("Send")|e('js') }}',
986 class : 'icon labeled green approve'
988 text : '{{ _T("Cancel")|e('js') }}',
990 class : 'icon labeled cancel'
995 _addLegendButton('#mail_sign');
998 {% include "elements/js/pwdcheck.js.twig" with {
999 selector: "#pref_admin_pass",
1000 loader: "inline mini"
1002 {% include "elements/js/pwdcheck.js.twig" with {
1003 selector: "#test_password_strength",
1004 loader: "inline mini",
1005 extra_data: "pref_password_length: \$('#pref_password_length').val(),pref_password_blacklist: \$('#pref_password_blacklist').is(':checked'),pref_password_strength: \$('#pref_password_strength').val(),"
1008 {% include "modals/telemetry.html.twig" with {part: "jsdialog"} %}
1009 {% include "modals/telemetry.html.twig" with {part: "jsregister"} %}