]> git.agnieray.net Git - galette.git/blob - galette/templates/default/pages/preferences.html.twig
Restore missing tooltips
[galette.git] / galette / templates / default / pages / preferences.html.twig
1 {% extends 'page.html.twig' %}
2
3 {% block content %}
4 <form action="{{ url_for('store-preferences') }}" method="post" enctype="multipart/form-data" class="ui form">
5 <div class="ui stackable pointing inverted 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>
15 {% endif %}
16 {% if login.isSuperAdmin() %}
17 <a href="{{ url_for('preferences') }}?tab=admin" class="item{{ tab == 'admin' ? ' active' }}" data-tab="admin">{{ _T("Admin") }}</a>
18 {% endif %}
19 </div>
20 <div class="ui{{ tab == 'general' ? ' active' }} tab segment" data-tab="general">
21 <div class="ui stackable two column grid">
22 <div class="column">
23 <div class="{% if required.pref_nom == 1 %}required {% endif %} field">
24 <label for="pref_nom">{{ _T("Name of the association:") }}</label>
25 <input{% if required.pref_nom == 1 %} required="required"{% endif %} type="text" name="pref_nom" id="pref_nom" value="{{ pref.pref_nom }}" maxlength="190"/>
26 </div>
27 <div class="{% if required.pref_slogan is defined and required.pref_slogan == 1 %}required {% endif %} field">
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.") }}"></i>
30 </label>
31 <div class="ui action input">
32 <input{% if required.pref_slogan is defined and required.pref_slogan == 1 %} required="required"{% endif %} type="text" name="pref_slogan" id="pref_slogan" value="{{ pref.pref_slogan }}"/>
33 <a
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}) }}"
37 >
38 <i class="language icon"></i>
39 <span class="displaynone">{{ _T("Translate '%s'")|replace({'%s': pref.pref_slogan}) }}</span>
40 </a>
41 </div>
42 </div>
43 </div>
44 <div class="column">
45 <div class="field ui items">
46 <label>{{ _T("Logo:") }}</label>
47 <div class="item">
48 {% if logo.isCustom() %}
49 <div class="image">
50 <img src="{{ url_for('logo') }}" class="picture" width="{{ logo.getOptimalWidth() }}" height="{{ logo.getOptimalHeight() }}" alt="{{ _T("Current logo") }}"/>
51 </div>
52 {% endif %}
53 <div class="content">
54 <div class="description">
55 <div class="ui file action input">
56 <input type="file" name="logo" id="logo_picture"{% if constant('GALETTE_MODE') == constant('\\Galette\\Core\\Galette::MODE_DEMO') %} disabled="disabled"{% endif %}/>
57 <label for="logo_picture" class="ui button{% if constant('GALETTE_MODE') == constant('\\Galette\\Core\\Galette::MODE_DEMO') %} disabled{% endif %}">
58 <i class="blue upload icon"></i>
59 {% if logo.isCustom() %}{{ _T("Choose another file") }}{% else %}{{ _T("Choose a file") }}{% endif %}
60 </label>
61 </div>
62 </div>
63 <div class="extra">
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>
68 </div>
69 {% endif %}
70 </div>
71 </div>
72 </div>
73 </div>
74 </div>
75 </div>
76 <div class="ui stackable two column grid">
77 <div class="column">
78 <div class="{% if required.pref_adresse is defined and required.pref_adresse == 1 %}required {% endif %} field">
79 <label for="pref_adresse">{{ _T("Address:") }}</label>
80 <input{% if required.pref_adresse is defined and required.pref_adresse == 1 %} required="required"{% endif %} type="text" name="pref_adresse" id="pref_adresse" value="{{ pref.pref_adresse }}" maxlength="190"/><br/>
81 </div>
82 <div class="field">
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"/>
85 </div>
86 <div class="{% if required.pref_cp is defined and required.pref_cp == 1 %}required {% endif %} field">
87 <label for="pref_cp">{{ _T("Zip Code:") }}</label>
88 <input{% if required.pref_cp is defined and required.pref_cp == 1 %} required="required"{% endif %} type="text" name="pref_cp" id="pref_cp" value="{{ pref.pref_cp }}" maxlength="10"/>
89 </div>
90 <div class="{% if required.pref_ville is defined and required.pref_ville == 1 %}required {% endif %} field">
91 <label for="pref_ville">{{ _T("City:") }}</label>
92 <input{% if required.pref_ville is defined and required.pref_ville == 1 %} required="required"{% endif %} type="text" name="pref_ville" id="pref_ville" value="{{ pref.pref_ville }}" maxlength="100"/>
93 </div>
94 <div class="{% if required.pref_pays is defined and required.pref_pays == 1 %}required {% endif %} field">
95 <label for="pref_pays">{{ _T("Country:") }}</label>
96 <input{% if required.pref_pays is defined and required.pref_pays == 1 %} required="required"{% endif %} type="text" name="pref_pays" id="pref_pays" value="{{ pref.pref_pays }}" maxlength="50"/>
97 </div>
98 <div class="{% if required.pref_website is defined and required.pref_website == 1 %}required {% endif %} field">
99 <label for="pref_website">{{ _T("Website:") }}</label>
100 <input{% if required.pref_website is defined and required.pref_website == 1 %} required="required"{% endif %} type="text" name="pref_website" id="pref_website" value="{{ pref.pref_website }}" maxlength="100"/>
101 </div>
102 </div>{# /column #}
103 <div class="column">
104 <div class="field">
105 <label>
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.") }}"></i>
108 </label>
109 <div class="inline fields">
110 <div class="field">
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 %}/>
113 </div>
114 <div class="field">
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 %}/>
117 </div>
118 </div>
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 nochosen">
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>
124 {% endfor %}
125 </select>
126 </div>
127 <div class="field">
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") }}"></i>
132 </div>
133 <textarea name="pref_footer" id="pref_footer" rows="2">{{ pref.pref_footer }}</textarea>
134 </div>
135 </div>
136 <div class="field">
137 <label>
138 {{ _T("Telemetry date:") }}
139 <i class="circular inverted primary small icon info tooltip" title="{{ _T("Last telemetry sent date.") }}"></i>
140 </label>
141 <span>
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>
144 </span>
145 </div>
146 <div class="field">
147 <label>
148 {{ _T("Registration date:") }}
149 <i class="circular inverted primary small icon info tooltip" title="{{ _T("Date on which you registered your Galette instance.") }}"></i>
150 </label>
151 <span>
152 {% if pref.pref_registration_date %}
153 {% set regtxt = _T("Update your information") %}
154 {{ preferences.getRegistrationDate() }}
155 {% else %}
156 {% set regtxt = _T("Register") %}
157 {{ _T("Not registered") }}
158 {% endif %}
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"></i>{{ regtxt }}</a>
160 </span>
161 </div>
162 </div>{# /column #}
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">
169 <div class="column">
170 <div class="field">
171 <label for="pref_lang" >{{ _T("Default language:") }}</label>
172 <select name="pref_lang" id="pref_lang" class="lang ui search dropdown nochosen">
173 {% for langue in languages %}
174 <option value="{{ langue.getID() }}" {% if pref.pref_lang == langue.getID() %}selected="selected"{% endif %}>{{ langue.getName()|capitalize }}</option>
175 {% endfor %}
176 </select>
177 </div>
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 nochosen">
181 {% for theme in themes %}
182 <option value="{{ theme }}" {% if pref.pref_theme == theme %}selected="selected"{% endif %}>{{ theme|capitalize }}</option>
183 {% endfor %}
184 </select>
185 </div>#}
186 <div class="field">
187 <label for="pref_numrows">{{ _T("Lines / Page:") }}</label>
188 <select name="pref_numrows" id="pref_numrows" class="ui search dropdown nochosen">
189 {% for key, value in pref_numrows_options %}
190 <option value="{{ key }}"{% if key == pref.pref_numrows %} selected="selected"{% endif %}>{{ value }}</option>
191 {% endfor %}
192 </select>
193 </div>
194 <div class="field">
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 nochosen">
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>
203 </select>
204 </div>
205 <div class="field">
206 <label for="pref_log">{{ _T("Logging level:") }}</label>
207 <select name="pref_log" id="pref_log" class="ui search dropdown nochosen">
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>
210 </select>
211 </div>
212 <div class="field">
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 nochosen">
215 {% for key, value in accounts_options %}
216 <option value="{{ key }}"{% if key == pref.pref_filter_account %} selected="selected"{% endif %}>{{ value }}</option>
217 {% endfor %}
218 </select>
219 </div>
220 <div class="field">
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 nochosen">
223 {% for key, value in paymenttypes %}
224 <option value="{{ key }}"{% if key == pref.pref_default_paymenttype %} selected="selected"{% endif %}>{{ value }}</option>
225 {% endfor %}
226 </select>
227 </div>
228 </div>{# /column #}
229 <div class="column">
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>
234 </div>
235 </div>
236 <div class="field" id="publicpages_visibility"{% if not pref.pref_bool_publicpages %} class="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 nochosen">
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>
242 </select>
243 </div>
244 <div class="field inline">
245 <div class="ui right aligned toggle checkbox">
246 <input type="checkbox" name="pref_bool_selfsubscribe" id="pref_bool_selfsubscribe" value="1"{% if pref.pref_bool_selfsubscribe %} checked="checked"{% endif %}/>
247 <label for="pref_bool_selfsubscribe">{{ _T("Self subscription enabled?") }}</label>
248 </div>
249 </div>
250 <div class="field">
251 <label for="pref_new_contrib_script">{{ _T("Post new contribution script URI") }}</label>
252 <div class="ui right corner labeled input">
253 <div class="ui corner label">
254 <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).") }}"></i>
255 </div>
256 <input type="text" name="pref_new_contrib_script" id="pref_new_contrib_script" value="{{ pref.pref_new_contrib_script }}"/>
257 </div>
258 </div>
259 <div class="field">
260 <label for="pref_rss_url">{{ _T("RSS feed URL") }}</label>
261 <div class="ui right corner labeled input">
262 <div class="ui corner label">
263 <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.") }}"></i>
264 </div>
265 <input type="text" name="pref_rss_url" id="pref_rss_url" value="{{ pref.pref_rss_url }}"{% if required.pref_rss_url is defined and required.pref_rss_url == 1 %} required="required"{% endif %}/>
266 </div>
267 </div>
268 <div class="field">
269 <label for="pref_galette_url">{{ _T("Galette base URL") }}</label>
270 <div class="ui right corner labeled input">
271 <div class="ui corner label">
272 <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')}) }}"></i>
273 </div>
274 <input type="text" name="pref_galette_url" id="pref_galette_url" placeholder="{{ preferences.getDefaultURL() }}" value="{{ pref.pref_galette_url }}"{% if required.pref_galette_url is defined and required.pref_galette_url == 1 %} required="required"{% endif %}/>
275 </div>
276 </div>
277 <div class="field inline">
278 <div class="ui right aligned toggle checkbox">
279 <input type="checkbox" name="pref_show_id" id="pref_show_id" value="1" {% if pref.pref_show_id %} checked="checked"{% endif %}/>
280 <label for="pref_show_id">{{ _T("Show identifiers") }}</label>
281 </div>
282 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Display database identifiers in related windows") }}"></i>
283 </div>
284 </div>{# /column #}
285 </div>{# /column grid #}
286 <div class="ui stackable two column grid">
287 <div class="column">
288 <div class="field">
289 <label for="pref_statut">{{ _T("Default membership status:") }}</label>
290 <select name="pref_statut" id="pref_statut" class="ui search dropdown nochosen">
291 {% for key, value in statuts %}
292 <option value="{{ key }}"{% if key == pref.pref_statut %} selected="selected"{% endif %}>{{ value }}</option>
293 {% endfor %}
294 </select>
295 </div>
296 <div class="field">
297 <label for="pref_membership_ext">{{ _T("Default membership extension:") }}</label>
298 <div class="ui right labeled input">
299 <input type="text" name="pref_membership_ext" id="pref_membership_ext" value="{{ pref.pref_membership_ext }}" maxlength="2"{% if required.pref_membership_ext is defined and required.pref_membership_ext == 1 %} required="required"{% endif %}/>
300 <div class="ui basic label">
301 {{ _T("(Months)") }}
302 </div>
303 </div>
304 </div>
305 </div>{# /column #}
306 <div class="column">
307 <div class="field">
308 <label for="pref_beg_membership">{{ _T("Beginning of membership:") }}</label>
309 <input type="text" name="pref_beg_membership" id="pref_beg_membership" value="{{ pref.pref_beg_membership }}" maxlength="5"{% if required.pref_beg_membership is defined and required.pref_beg_membership == 1 %} required="required"{% endif %}/>
310 <span class="exemple">{{ _T("(dd/mm)") }}</span>
311 </div>
312 <div class="field">
313 <label for="pref_membership_offermonths">{{ _T("Number of months offered:") }}</label>
314 <div class="ui right corner labeled input">
315 <div class="ui corner label">
316 <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.") }}"></i>
317 </div>
318 <input type="number" name="pref_membership_offermonths" min="0" id="pref_membership_offermonths" value="{{ pref.pref_membership_offermonths }}" maxlength="5"{% if required.pref_membership_offermonths is defined and required.pref_membership_offermonths == 1 %} required="required"{% endif %}/>
319 </div>
320 </div>
321 </div>{# /column #}
322 </div>{# /column grid #}
323 </div>{# /tab segment #}
324 <div class="ui{{ tab == 'rights' ? ' active' }} tab segment" data-tab="rights">
325 <div class="ui stackable two column grid">
326 <div class="column">
327 <div class="field inline">
328 <div class="ui right aligned toggle checkbox">
329 <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 %}/>
330 <label for="pref_bool_create_member">{{ _T("Can members create child?") }}</label>
331 </div>
332 </div>
333 <div class="field inline">
334 <div class="ui right aligned toggle checkbox">
335 <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 %}/>
336 <label for="pref_bool_groupsmanagers_edit_groups">{{ _T("Can group managers edit their groups?") }}</label>
337 </div>
338 </div>
339 <div class="field inline">
340 <div class="ui right aligned toggle checkbox">
341 <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 %}/>
342 <label for="pref_bool_groupsmanagers_create_member">{{ _T("Can group managers create members?") }}</label>
343 </div>
344 </div>
345 <div class="field inline">
346 <div class="ui right aligned toggle checkbox">
347 <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 %}/>
348 <label for="pref_bool_groupsmanagers_edit_member">{{ _T("Can group managers edit members?") }}</label>
349 </div>
350 </div>
351 <div class="field inline">
352 <div class="ui right aligned toggle checkbox">
353 <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 %}/>
354 <label for="pref_bool_groupsmanagers_mailings">{{ _T("Can group managers send mailings?") }}</label>
355 </div>
356 </div>
357 <div class="field inline">
358 <div class="ui right aligned toggle checkbox">
359 <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 %}/>
360 <label for="pref_bool_groupsmanagers_exports">{{ _T("Can group managers do exports?") }}</label>
361 </div>
362 <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") }}"></i>
363 </div>
364 </div>
365 </div>
366 </div>{# /tab segment #}
367 <div class="ui{{ tab == 'mail' ? ' active' }} tab segment" data-tab="mail">
368 <div class="ui stackable two column grid">
369 <div class="column">
370 {% if constant('GALETTE_MODE') == constant('\\Galette\\Core\\Galette::MODE_DEMO') %}
371 <div class="ui negative message">
372 <p>{{ _T("Application runs under demo mode. This functionnality is not enabled, sorry.") }}</p>
373 </div>
374 {% else %}
375 <div class="field">
376 <label for="pref_email_nom">{{ _T("Sender name:") }}</label>
377 <input type="text" name="pref_email_nom" id="pref_email_nom" value="{{ pref.pref_email_nom }}" maxlength="50"{% if required.pref_email_nom is defined and required.pref_email_nom == 1 %} required="required"{% endif %}/>
378 </div>
379 <div class="{% if required.pref_email is defined and required.pref_email == 1 %}required {% endif %}field">
380 <label for="pref_email">{{ _T("Sender Email:") }}</label>
381 {% set pref_email = preferences.vpref_email|join(',') %}
382 <input type="text" name="pref_email" id="pref_email" value="{{ pref_email }}" maxlength="100" size="30"{% if required.pref_email is defined and required.pref_email == 1 %} required="required"{% endif %}/>
383 <span class="exemple">{{ _T("(You can enter several emails separated with a comma. First address will be the default one.)") }}</span>
384 </div>
385 <div class="field">
386 <label for="pref_email_reply_to">{{ _T("Reply-To Email:") }}</label>
387 <div class="ui right corner labeled input">
388 <div class="ui corner label">
389 <i class="circular inverted primary icon info tooltip" title="{{ _T("Leave empty to use Sender Email as reply address") }}"></i>
390 </div>
391 <input type="text" name="pref_email_reply_to" id="pref_email_reply_to" value="{{ pref.pref_email_reply_to }}" maxlength="100" size="30"{% if required.pref_email_reply_to is defined and required.pref_email_reply_to == 1 %} required="required"{% endif %}/>
392 </div>
393 </div>
394 <div class="field">
395 {% set pref_email = preferences.vpref_email_newadh|join(',') %}
396 <label for="pref_email_newadh">{{ _T("Members administrator's Email:") }}</label>
397 <div class="ui right corner labeled input">
398 <div class="ui corner label">
399 <i class="circular inverted primary icon info tooltip" title="{{ _T("Recipient of new online registation and edition emails") }}"></i>
400 </div>
401 <input type="text" name="pref_email_newadh" id="pref_email_newadh" value="{{ pref.pref_email_newadh }}" maxlength="100" size="30"{% if required.pref_email_newadh is defined and required.pref_email_newadh == 1 %} required="required"{% endif %}/>
402 </div>
403 <span class="exemple">{{ _T("(You can enter several emails separated with a comma. First address will be the default one.)") }}</span>
404 </div>
405 <div class="field inline">
406 <div class="ui right aligned toggle checkbox">
407 <input type="checkbox" name="pref_bool_mailadh" id="pref_bool_mailadh" value="1" {% if pref.pref_bool_mailadh == 1 %}checked="checked"{% endif %}{% if required.pref_bool_mailadh is defined and required.pref_bool_mailadh == 1 %} required="required"{% endif %}/>
408 <label for="pref_bool_mailadh">{{ _T("Send email to administrators?") }}</label>
409 </div>
410 <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") }}"></i>
411 </div>
412 <div class="field inline">
413 <div class="ui right aligned toggle checkbox">
414 <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 %}{% if required.pref_bool_wrap_mails is defined and required.pref_bool_wrap_mails == 1 %} required="required"{% endif %}/>
415 <label for="pref_bool_wrap_mails">{{ _T("Wrap emails text?") }}</label>
416 </div>
417 <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.") }}"></i>
418 </div>
419 <div class="field inline">
420 <div class="ui right aligned toggle checkbox">
421 <input type="checkbox" name="pref_bool_mailowner" id="pref_bool_mailowner" value="1" {% if pref.pref_bool_mailowner == 1 %}checked="checked"{% endif %}{% if required.pref_bool_mailowner is defined and required.pref_bool_mailowner == 1 %} required="required"{% endif %}/>
422 <label for="pref_bool_mailowner">{{ _T("Send email to members?") }}</label>
423 </div>
424 <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.") }}"></i>
425 </div>
426 <div class="field inline">
427 <div class="ui right aligned toggle checkbox">
428 <input type="checkbox" name="pref_editor_enabled" id="pref_editor_enabled" value="1" {% if pref.pref_editor_enabled == 1 %}checked="checked"{% endif %}{% if required.pref_editor_enabled is defined and required.pref_editor_enabled == 1 %} required="required"{% endif %}/>
429 <label for="pref_editor_enabled">{{ _T("Activate HTML editor?") }}</label>
430 </div>
431 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Should HTML editor be activated on page load ?") }}"></i>
432 </div>
433 <div class="field mail_sign">
434 <label for="pref_mail_sign">{{ _T("Mail signature") }}</label>
435 <div class="ui right corner labeled input">
436 <div class="ui corner label" id="mail_sign">
437 </div>
438 <textarea name="pref_mail_sign" id="pref_mail_sign" rows="5">{{ pref.pref_mail_sign }}</textarea>
439 </div>
440 </div>
441 </div>{# /column #}
442 <div class="column">
443 <div class="grouped fields">
444 <label{% if required.pref_mail_method is defined and required.pref_mail_method == 1 %} required="required"{% endif %}>{{ _T("Emailing method:") }}</label>
445 <div class="field">
446 <div class="ui radio checkbox">
447 <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>
448 </div>
449 </div>
450 <div class="field">
451 <div class="ui radio checkbox">
452 <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>
453 </div>
454 </div>
455 <div class="field">
456 <div class="ui radio checkbox">
457 <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>
458 </div>
459 </div>
460 <div class="field">
461 <div class="ui radio checkbox">
462 <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>
463 </div>
464 </div>
465 <div class="field">
466 <div class="ui radio checkbox">
467 <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>
468 </div>
469 </div>
470 <div class="field">
471 <div class="ui radio checkbox">
472 <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>
473 </div>
474 </div>
475 <br/>
476 <a
477 href="{{ url_for('testEmail') }}#mail"
478 id="btnmail"
479 class="ui labeled icon button"
480 >
481 <i class="rocket icon" aria-hidden="true"></i>
482 {{ _T("Test email settings") }}
483 </a>
484 </div>
485 <div id="smtp_parameters" class="field">
486 <div class="field">
487 <label for="pref_mail_smtp_host">{{ _T("SMTP server:") }}</label>
488 <input type="text" name="pref_mail_smtp_host" id="pref_mail_smtp_host" value="{{ pref.pref_mail_smtp_host }}" maxlength="100" size="30"{% if required.pref_mail_smtp_host is defined and required.pref_mail_smtp_host == 1 %} required="required"{% endif %}/>
489 </div>
490 <div class="field">
491 <label for="pref_mail_smtp_port">{{ _T("SMTP port:") }}</label>
492 <input type="text" name="pref_mail_smtp_port" id="pref_mail_smtp_port" value="{{ pref.pref_mail_smtp_port }}" size="10"{% if required.pref_mail_smtp_port is defined and required.pref_mail_smtp_port == 1 %} required="required"{% endif %}/>
493 </div>
494 <div class="grouped fields">
495 <div class="field inline">
496 <div class="ui right aligned toggle checkbox">
497 <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 %}{% if required.pref_mail_smtp_auth is defined and required.pref_mail_smtp_auth == 1 %} required="required"{% endif %}/>
498 <label for="pref_mail_smtp_auth">{{ _T("Use SMTP authentication?") }}</label>
499 </div>
500 <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.") }}"></i>
501 </div>
502 <div class="field inline">
503 <div class="ui right aligned toggle checkbox">
504 <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 %}{% if required.pref_mail_smtp_secure is defined and required.pref_mail_smtp_secure == 1 %} required="required"{% endif %}/>
505 <label for="pref_mail_smtp_secure">{{ _T("Use TLS for SMTP?") }}</label>
506 </div>
507 <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.") }}"></i>
508 </div>
509 <div class="field inline">
510 <div class="ui right aligned toggle checkbox">
511 <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 %}{% if required.pref_mail_allow_unsecure is defined and required.pref_mail_allow_unsecure == 1 %} required="required"{% endif %}/>
512 <label for="pref_mail_allow_unsecure">{{ _T("Allow unsecure TLS?") }}</label>
513 </div>
514 <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.") }}"></i>
515 </div>
516 </div>
517 </div>
518 <div id="smtp_auth" class="field">
519 <div class="field">
520 <label for="pref_mail_smtp_user">{{ _T("SMTP (or GMail) user:") }}</label>
521 <input type="text" name="pref_mail_smtp_user" id="pref_mail_smtp_user" value="{{ pref.pref_mail_smtp_user }}" maxlength="100" size="30"{% if required.pref_mail_smtp_user is defined and required.pref_mail_smtp_user == 1 %} required="required"{% endif %}/>
522 </div>
523 <div class="field">
524 <label for="pref_mail_smtp_password">{{ _T("SMTP (or GMail) password:") }}</label>
525 <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"{% if required.pref_mail_smtp_password is defined and required.pref_mail_smtp_password == 1 %} required="required"{% endif %}/>
526 </div>
527 </div>
528 {% endif %}
529 </div>{# /column #}
530 </div>{# /column grid #}
531 </div>{# /tab segment #}
532 <div class="ui{{ tab == 'labels' ? ' active' }} tab segment" data-tab="labels">
533 <div class="ui two column grid">
534 <div class="column">
535 <div class="field">
536 <label for="pref_etiq_marges_v">{{ _T("Vertical margins:") }}</label>
537 <div class="ui right labeled input">
538 <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 %}/>
539 <div class="ui basic label">mm</div>
540 </div>
541 </div>
542 <div class="field">
543 <label for="pref_etiq_marges_h">{{ _T("Horizontal margins:") }}</label>
544 <div class="ui right labeled input">
545 <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 %}/>
546 <div class="ui basic label">mm</div>
547 </div>
548 </div>
549 <div class="field">
550 <label for="pref_etiq_hspace">{{ _T("Horizontal spacing:") }}</label>
551 <div class="ui right labeled input">
552 <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 %}/>
553 <div class="ui basic label">mm</div>
554 </div>
555 </div>
556 <div class="field">
557 <label for="pref_etiq_vspace">{{ _T("Vertical spacing:") }}</label>
558 <div class="ui right labeled input">
559 <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 %}/>
560 <div class="ui basic label">mm</div>
561 </div>
562 </div>
563 <div class="field inline">
564 <div class="ui right aligned toggle checkbox">
565 <input type="checkbox" name="pref_etiq_border" id="pref_etiq_border" value="1" {% if pref.pref_etiq_border == 1 %}checked="checked"{% endif %}/>
566 <label for="pref_etiq_border">{{ _T("Print border") }}</label>
567 </div>
568 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Check this box to print a grey border around each label.") }}"></i>
569 </div>
570 </div>{# /column #}
571 <div class="column">
572 <div class="field">
573 <label for="pref_etiq_hsize">{{ _T("Label width:") }}</label>
574 <div class="ui right labeled input">
575 <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 %}/>
576 <div class="ui basic label">mm</div>
577 </div>
578 </div>
579 <div class="field">
580 <label for="pref_etiq_vsize">{{ _T("Label height:") }}</label>
581 <div class="ui right labeled input">
582 <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 %}/>
583 <div class="ui basic label">mm</div>
584 </div>
585 </div>
586 <div class="field">
587 <label for="pref_etiq_cols">{{ _T("Number of label columns:") }}</label>
588 <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 %}/>
589 </div>
590 <div class="field">
591 <label for="pref_etiq_rows">{{ _T("Number of label lines:") }}</label>
592 <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 %}/>
593 </div>
594 <div class="field">
595 <label for="pref_etiq_corps">{{ _T("Font size:") }}</label>
596 <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 %}/>
597 </div>
598 </div>{# /column #}
599 </div>{# /column grid #}
600 </div>{# /tab segment #}
601 <div class="ui{{ tab == 'cards' ? ' active' }} tab segment" data-tab="cards">
602 <div class="ui message">
603 <p>{{ _T("Each card is 75mm width and 40mm height. Each page contains 2 columns and 6 rows.<br/>Double check margins and spacings ;)") }}</p>
604 </div>
605 <div class="ui two column grid">
606 <div class="column">
607 <div class="field">
608 <label for="pref_card_abrev">{{ _T("Short Text (Card Center):") }}</label>
609 <div class="ui action input">
610 <input type="text" name="pref_card_abrev" id="pref_card_abrev" value="{{ pref.pref_card_abrev }}" size="10" maxlength="10"{% if required.pref_card_abrev is defined and required.pref_card_abrev == 1 %} required="required"{% endif %}/>
611 <a
612 href="{{ url_for("dynamicTranslations", {"text_orig": pref.pref_card_abrev|escape}) }}"
613 class="tooltip ui icon button"
614 title="{{ _T("Translate '%s'")|replace({"%s": pref.pref_card_abrev}) }}"
615 >
616 <i class="language icon"></i>
617 <span class="displaynone">{{ _T("Translate '%s'")|replace({'%s': pref.pref_card_abrev}) }}</span>
618 </a>
619 </div>
620 <span class="exemple">{{ _T("(10 characters max)") }}</span>
621 </div>
622 <div class="field">
623 <label for="pref_card_strip">{{ _T("Long Text (Bottom Line):") }}</label>
624 <div class="ui action input">
625 <input type="text" name="pref_card_strip" id="pref_card_strip" value="{{ pref.pref_card_strip }}" size="40" maxlength="65"{% if required.pref_card_strip is defined and required.pref_card_strip == 1 %} required="required"{% endif %}/>
626 <a
627 href="{{ url_for("dynamicTranslations", {"text_orig": pref.pref_card_strip|escape}) }}"
628 class="tooltip ui icon button "
629 title="{{ _T("Translate '%s'")|replace({"%s": pref.pref_card_strip}) }}"
630 >
631 <i class="language icon"></i>
632 <span class="displaynone">{{ _T("Translate '%s'")|replace({'%s': pref.pref_card_strip}) }}</span>
633 </a>
634 </div>
635 <span class="exemple">{{ _T("(65 characters max)") }}</span>
636 </div>
637 <div class="grouped fields">
638 <div class="inline field">
639 <label for="pref_card_tcol">{{ _T("Strip Text Color:") }}</label>
640 <input type="color" name="pref_card_tcol" id="pref_card_tcol" value="{{ pref.pref_card_tcol }}" size="7" maxlength="7"{% if required.pref_card_tcol is defined and required.pref_card_tcol == 1 %} required="required"{% endif %}/>
641 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Hexadecimal color notation: #RRGGBB") }}"></i>
642 </div>
643 <div class="inline field">
644 <label for="pref_card_scol">{{ _T("Active Member Color:") }}</label>
645 <input type="color" name="pref_card_scol" id="pref_card_scol" value="{{ pref.pref_card_scol }}" size="7" maxlength="7"{% if required.pref_card_scol is defined and required.pref_card_scol == 1 %} required="required"{% endif %}/>
646 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Hexadecimal color notation: #RRGGBB") }}"></i>
647 </div>
648 <div class="inline field">
649 <label for="pref_card_bcol">{{ _T("Board Members Color:") }}</label>
650 <input type="color" name="pref_card_bcol" id="pref_card_bcol" value="{{ pref.pref_card_bcol }}" size="7" maxlength="7"{% if required.pref_card_bcol is defined and required.pref_card_bcol == 1 %} required="required"{% endif %}/>
651 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Hexadecimal color notation: #RRGGBB") }}"></i>
652 </div>
653 <div class="inline field">
654 <label for="pref_card_hcol">{{ _T("Honor Members Color:") }}</label>
655 <input type="color" name="pref_card_hcol" id="pref_card_hcol" value="{{ pref.pref_card_hcol }}" size="7" maxlength="7"{% if required.pref_card_hcol is defined and required.pref_card_hcol == 1 %} required="required"{% endif %}/>
656 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Hexadecimal color notation: #RRGGBB") }}"></i>
657 </div>
658 </div>{# /group fields #}
659 <div class="field ui items">
660 <label{% if required.card_logo is defined and required.card_logo == 1 %} required="required"{% endif %}>{{ _T("Logo:") }}</label>
661 <div class="item">
662 {% if print_logo.isCustom() %}
663 <div class="image">
664 <img src="{{ url_for('printLogo') }}" class="picture" width="{{ print_logo.getOptimalWidth() }}" height="{{ print_logo.getOptimalHeight() }}" alt="{{ _T("Current logo for printing") }}"/><br/>
665 </div>
666 {% endif %}
667 <div class="content">
668 <div class="description">
669 <div class="ui file action input">
670 <input type="file" name="card_logo" id="card_logo"{% if constant('GALETTE_MODE') == constant('Galette\\Core\\Galette::MODE_DEMO') %} disabled="disabled"{% endif %}/>
671 <label for="card_logo" class="ui button{% if constant('GALETTE_MODE') == constant('\\Galette\\Core\\Galette::MODE_DEMO') %} disabled{% endif %}">
672 <i class="blue upload icon"></i>
673 {% if print_logo.isCustom() %}{{ _T("Choose another file") }}{% else %}{{ _T("Choose a file") }}{% endif %}
674 </label>
675 </div>
676 </div>
677 <div class="extra">
678 {% if print_logo.isCustom() %}
679 <div class="ui toggle checkbox">
680 <input type="checkbox" name="del_card_logo" id="del_card_logo" value="1" />
681 <label for="del_card_logo">{{ _T("Delete image") }}</label>
682 </div>
683 {% endif %}
684 </div>
685 </div>
686 </div>
687 </div>
688 </div>{# /column #}
689 <div class="column">
690 <div class="field inline">
691 <div class="ui right aligned toggle checkbox">
692 <input type="checkbox" name="pref_card_self" id="pref_card_self" value="1" {% if pref.pref_card_self == 1 %}checked="checked"{% endif %}{% if required.pref_bool_display_title is defined and required.pref_bool_display_title == 1 %} required="required"{% endif %}/>
693 <label for="pref_card_self">{{ _T("Allow members to print card ?") }}</label>
694 </div>
695 </div>
696 <div class="field inline">
697 <div class="ui right aligned toggle checkbox">
698 <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 %}{% if required.pref_bool_display_title is defined and required.pref_bool_display_title == 1 %} required="required"{% endif %}/>
699 <label for="pref_bool_display_title">{{ _T("Show title ?") }}</label>
700 </div>
701 <i class="circular small inverted primary icon info tooltip" title="{{ _T("(Show or not title in front of name)") }}"></i>
702 </div>
703 <div class="field">
704 <label for="pref_card_address">{{ _T("Address type:") }}</label>
705 <select name="pref_card_address" id="pref_card_address" class="ui search dropdown nochosen">
706 <option value="0" {% if pref.pref_card_address == 0 %}selected="selected"{% endif %}>{{ _T("Email") }}</option>
707 <option value="5" {% if pref.pref_card_address == 5 %}selected="selected"{% endif %}>{{ _T("Zip - Town") }}</option>
708 <option value="6" {% if pref.pref_card_address == 6 %}selected="selected"{% endif %}>{{ _T("Nickname") }}</option>
709 <option value="7" {% if pref.pref_card_address == 7 %}selected="selected"{% endif %}>{{ _T("Profession") }}</option>
710 <option value="8" {% if pref.pref_card_address == 8 %}selected="selected"{% endif %}>{{ _T("Member number") }}</option>
711 </select>
712 <span class="exemple">{{ _T("(Choose address printed below name)") }}</span>
713 </div>
714 <div class="field">
715 <label for="pref_card_year">{{ _T("Year:") }}</label>
716 <div class="ui right corner labeled input">
717 <div class="ui corner label">
718 <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") }}"></i>
719 </div>
720 <input type="text" name="pref_card_year" id="pref_card_year" value="{{ pref.pref_card_year }}" maxlength="9"{% if required.pref_card_year is defined and required.pref_card_year == 1 %} required="required"{% endif %}/>
721 </div>
722 </div>
723 <div class="field">
724 <label for="pref_card_marges_v">{{ _T("Vertical margins:") }}</label>
725 <div class="ui right labeled input">
726 <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 %}/>
727 <div class="ui basic label">mm</div>
728 </div>
729 </div>
730 <div class="field">
731 <label for="pref_card_marges_h">{{ _T("Horizontal margins:") }}</label>
732 <div class="ui right labeled input">
733 <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 %}/>
734 <div class="ui basic label">mm</div>
735 </div>
736 </div>
737 <div class="field">
738 <label for="pref_card_vspace">{{ _T("Vertical spacing:") }}</label>
739 <div class="ui right labeled input">
740 <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 %}/>
741 <div class="ui basic label">mm</div>
742 </div>
743 </div>
744 <div class="field">
745 <label for="pref_card_hspace">{{ _T("Horizontal spacing:") }}</label>
746 <div class="ui right labeled input">
747 <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 %}/>
748 <div class="ui basic label">mm</div>
749 </div>
750 </div>
751 </div>{# /column #}
752 </div>{# /column grid #}
753 </div>{# /tab segment #}
754
755 {% if login.isAdmin() %}
756 <div class="ui{{ tab == 'security' ? ' active' }} tab segment" data-tab="security">
757 <div class="inline field">
758 <label for="pref_password_length">{{ _T("Password length:") }}</label>
759 <div class="ui right corner labeled input">
760 <div class="ui corner label">
761 <i class="circular inverted primary icon info tooltip" title="{{ _T("Minimum password length required for all accounts. Minimal size is 6.") }}"></i>
762 </div>
763 <input type="number" name="pref_password_length" id="pref_password_length" value="{{ pref.pref_password_length }}" min="6" size="7" required="required"/>
764 </div>
765 </div>
766 <div class="inline field">
767 <div class="ui right aligned toggle checkbox">
768 <input type="checkbox" name="pref_password_blacklist" id="pref_password_blacklist" value="1"{% if pref.pref_password_blacklist == 1 %} checked="checked"{% endif %}/>
769 <label for="pref_password_blacklist" title="{{ _T("Enable password blacklists") }}">{{ _T("Enable blacklists:") }}</label>
770 </div>
771 <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.") }}"></i>
772 </div>
773 <div class="inline field">
774 <label for="pref_password_strength" title="{{ _T("Enforce password strength") }}">{{ _T("Password strength:") }}</label>
775 <select name="pref_password_strength" id="pref_password_strength" class="ui dropdown nochosen">
776 <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>
777 <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>
778 <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>
779 <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>
780 <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>
781 </select>
782 <i class="tooltip circular inverted primary small icon info" data-html="
783 <p>{{ _T("Enforce minimal password strength for all password.") }}<br/>
784 {{ _T("Levels are:") }}</p>
785 <ul>
786 <li><em>* {{ _T("None") }}</em> {{ _T("for no strength enforcement") }}</li>
787 <li><em>* {{ _T("Weak") }}</em> {{ _T("require at least one matched rule") }}</li>
788 <li><em>* {{ _T("Medium") }}</em> {{ _T("require at least two matched rules") }}</li>
789 <li><em>* {{ _T("Strong") }}</em> {{ _T("require at least three matched rules (recommended for most usages)") }}</li>
790 <li><em>* {{ _T("Very Strong") }}</em> {{ _T("requires all rules.") }}</li>
791 </ul>
792 <p>{{ _T("Rules include lower case characters, upper case characters, numbers, and special characters.") }}<br/>
793 {{ _T("Note that with any enforcement level, user cannot use his personal information (name, login, ...) as password.") }}</p>
794 " data-variation="inverted very wide">
795 </i>
796 </div>
797 <div id="test_password_strength_field" class="inline field">
798 <label for="test_password_strength">{{ _T("Test a password:") }}</label>
799 <div class="ui right corner labeled input">
800 <div class="ui corner label">
801 <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 ;)") }}"></i>
802 </div>
803 <input type="text" id="test_password_strength"/>
804 </div>
805
806 </div>
807 </div>{# /tab segment #}
808 {% endif %}
809 {% if login.isSuperAdmin() %}
810 <div class="ui{{ tab == 'admin' ? ' active' }} tab red segment" data-tab="admin">
811 {% if constant('GALETTE_MODE') == constant('\\Galette\\Core\\Galette::MODE_DEMO') %}
812 <div class="ui negative message">
813 {{ _T("Application runs under demo mode. This functionnality is not enabled, sorry.") }}
814 </div>
815 {% else %}
816 <div class="inline field">
817 <label for="pref_admin_login">{{ _T("Username:") }}</label>
818 <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 %}/>
819 </div>
820 <div id="pref_admin_pass_field" class="inline field">
821 <label for="pref_admin_pass">{{ _T("Password:") }}</label>
822 <div class="ui input">
823 <input type="password" name="pref_admin_pass" id="pref_admin_pass" value="" maxlength="20" autocomplete="off"{% if required.pref_admin_pass is defined and required.pref_admin_pass == 1 %} required="required"{% endif %}/>
824 </div>
825 </div>
826 <div class="inline field">
827 <label for="pref_admin_pass_check">{{ _T("Retype password:") }}</label>
828 <input type="password" name="pref_admin_pass_check" id="pref_admin_pass_check" value="" maxlength="20"{% if required.pref_admin_pass_check is defined and required.pref_admin_pass_check == 1 %} required="required"{% endif %}/>
829 </div>
830 {% endif %}
831 </div>{# /tab segment #}
832 {% endif %}
833 <div class="ui basic center aligned segment">
834 <input type="hidden" name="valid" value="1"/>
835 <input type="hidden" name="pref_theme" value="default"/>
836 <input type="hidden" name="pref_telemetry_date" value="{{ pref.pref_telemetry_date }}"/>
837 <input type="hidden" name="pref_instance_uuid" value="{{ pref.pref_instance_uuid }}"/>
838 <input type="hidden" name="pref_registration_date" value="{{ pref.pref_registration_date }}"/>
839 <input type="hidden" name="pref_registration_uuid" value="{{ pref.pref_registration_uuid }}"/>
840 <input type="hidden" name="tab" id="tab" value="{{ tab }}"/>
841 <button type="submit" class="ui labeled icon primary button action">
842 <i class="save icon"></i> {{ _T("Save") }}
843 </button>
844 </div>
845 {% include "components/forms/csrf.html.twig" %}
846 </form>
847
848 {% include "modals/telemetry.html.twig" with {part: "dialog"} %}
849 {% include "modals/replacements_legend.html.twig" with {legends: preferences.getLegend(), cur_ref: 'prefs'} %}
850 {% endblock %}
851
852 {% block javascripts %}
853 <script type="text/javascript">
854 $(function(){
855 {% if pref.pref_mail_method != constant('Galette\\Core\\GaletteMail::METHOD_SMTP') %}
856 $('#smtp_parameters').addClass('displaynone');
857 {% endif %}
858 {% if pref.pref_mail_method != constant('Galette\\Core\\GaletteMail::METHOD_SMTP') and pref.pref_mail_method != constant('Galette\\Core\\GaletteMail::METHOD_GMAIL') %}
859 $('#smtp_auth').addClass('displaynone');
860 {% endif %}
861 $('.ui.radio.checkbox').checkbox({
862 onChange: function() {
863 var _checked = $(this).closest('input').attr('id');
864 var _smtp_parameters = $(this).closest('.checkbox').parent().parent().siblings('#smtp_parameters');
865 var _smtp_auth = $(this).closest('.checkbox').parent().parent().siblings('#smtp_auth');
866 if ( _checked == 'smtp' ) {
867 _smtp_parameters.removeClass('displaynone');
868 _smtp_auth.removeClass('displaynone');
869 } else if ( _checked == 'gmail' ) {
870 _smtp_parameters.addClass('displaynone');
871 _smtp_auth.removeClass('displaynone');
872 } else {
873 _smtp_parameters.addClass('displaynone');
874 _smtp_auth.addClass('displaynone');
875 }
876 }
877 });
878 /*$('#smtp, #gmail').checkbox({
879 onChecked: function() {
880 console.log($(this).closest('#smtp_parameters'));
881 //$('#smtp_parameters, #smtp_auth').toggleClass('displaynone');
882 }
883 });*/
884
885 $('.pointing.menu .item').tab({
886 onVisible: function(tabPath) {
887 document.getElementById('tab').value = tabPath;
888 }
889 });
890
891 $('#pref_bool_publicpages').change(function(){
892 $('#publicpages_visibility').toggleClass('displaynone');
893 });
894
895 $('#btnmail').on('click', function(e) {
896 e.preventDefault();
897 var _this = $(this);
898 var _value = $('#pref_email_newadh').val();
899 var _input = '<div class="ui input"><input type="text" name="email_adress" id="email_adress" value="' + _value + '"/></div>';
900 $('body').modal({
901 title: '{{ _T("Enter the email adress")|e('js') }}',
902 class: 'tiny',
903 content: _input,
904 actions: [{
905 text : '{{ _T("Send")|e('js') }}',
906 class : 'green approve',
907 icon : 'rocket',
908 click : function() {
909 $.ajax({
910 url: _this.attr('href'),
911 type: 'GET',
912 data: {
913 adress: $('#email_adress').val()
914 },
915 {% include "elements/js/loader.js.twig" with {
916 selector: '#btnmail',
917 loader: 'button'
918 } %},
919 success: function(res) {
920 //display message
921 $.ajax({
922 url: '{{ url_for('ajaxMessages') }}',
923 method: "GET",
924 success: function (message) {
925 $('#testEmail').prepend(message);
926 }
927 });
928 },
929 error: function () {
930 alert('{{ _T("An error occurred sending test email :(")|e('js') }}');
931 }
932 });
933 }
934 }, {
935 text : '{{ _T("Cancel")|e('js') }}',
936 class : 'cancel'
937 }]
938 }).modal('show');
939 });
940
941 _addLegendButton('#mail_sign');
942 _handleLegend();
943
944 {% include "elements/js/pwdcheck.js.twig" with {
945 selector: "#pref_admin_pass",
946 loader: "inline mini"
947 } %}
948 {% include "elements/js/pwdcheck.js.twig" with {
949 selector: "#test_password_strength",
950 loader: "inline mini",
951 extra_data: "pref_password_length: \$('#pref_password_length').val(),pref_password_blacklist: \$('#pref_password_blacklist').is(':checked'),pref_password_strength: \$('#pref_password_strength').val(),"
952 } %}
953
954 {% include "modals/telemetry.html.twig" with {part: "jsdialog"} %}
955 {% include "modals/telemetry.html.twig" with {part: "jsregister"} %}
956
957 });
958 </script>
959 {% endblock %}