]> git.agnieray.net Git - galette.git/blob - galette/templates/default/pages/preferences.html.twig
Messages refine
[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 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>
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 {% if constant('GALETTE_MODE') == constant('\\Galette\\Core\\Galette::MODE_DEMO') %}
369 <div class="ui icon negative message">
370 <i class="ban icon"></i>
371 <div class="content">
372 {{ _T("Application runs under demo mode. This functionnality is not enabled, sorry.") }}
373 </div>
374 </div>
375 {% else %}
376 <div class="ui stackable two column grid">
377 <div class="column">
378 <div class="field">
379 <label for="pref_email_nom">{{ _T("Sender name:") }}</label>
380 <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 %}/>
381 </div>
382 <div class="{% if required.pref_email is defined and required.pref_email == 1 %}required {% endif %}field">
383 <label for="pref_email">{{ _T("Sender Email:") }}</label>
384 {% set pref_email = preferences.vpref_email|join(',') %}
385 <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 %}/>
386 <span class="exemple">{{ _T("(You can enter several emails separated with a comma. First address will be the default one.)") }}</span>
387 </div>
388 <div class="field">
389 <label for="pref_email_reply_to">{{ _T("Reply-To Email:") }}</label>
390 <div class="ui right corner labeled input">
391 <div class="ui corner label">
392 <i class="circular inverted primary icon info tooltip" title="{{ _T("Leave empty to use Sender Email as reply address") }}"></i>
393 </div>
394 <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 %}/>
395 </div>
396 </div>
397 <div class="field">
398 {% set pref_email = preferences.vpref_email_newadh|join(',') %}
399 <label for="pref_email_newadh">{{ _T("Members administrator's Email:") }}</label>
400 <div class="ui right corner labeled input">
401 <div class="ui corner label">
402 <i class="circular inverted primary icon info tooltip" title="{{ _T("Recipient of new online registation and edition emails") }}"></i>
403 </div>
404 <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 %}/>
405 </div>
406 <span class="exemple">{{ _T("(You can enter several emails separated with a comma. First address will be the default one.)") }}</span>
407 </div>
408 <div class="field inline">
409 <div class="ui right aligned toggle checkbox">
410 <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 %}/>
411 <label for="pref_bool_mailadh">{{ _T("Send email to administrators?") }}</label>
412 </div>
413 <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>
414 </div>
415 <div class="field inline">
416 <div class="ui right aligned toggle checkbox">
417 <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 %}/>
418 <label for="pref_bool_wrap_mails">{{ _T("Wrap emails text?") }}</label>
419 </div>
420 <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>
421 </div>
422 <div class="field inline">
423 <div class="ui right aligned toggle checkbox">
424 <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 %}/>
425 <label for="pref_bool_mailowner">{{ _T("Send email to members?") }}</label>
426 </div>
427 <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>
428 </div>
429 <div class="field inline">
430 <div class="ui right aligned toggle checkbox">
431 <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 %}/>
432 <label for="pref_editor_enabled">{{ _T("Activate HTML editor?") }}</label>
433 </div>
434 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Should HTML editor be activated on page load ?") }}"></i>
435 </div>
436 <div class="field mail_sign">
437 <label for="pref_mail_sign">{{ _T("Mail signature") }}</label>
438 <div class="ui right corner labeled input">
439 <div class="ui corner label" id="mail_sign">
440 </div>
441 <textarea name="pref_mail_sign" id="pref_mail_sign" rows="5">{{ pref.pref_mail_sign }}</textarea>
442 </div>
443 </div>
444 </div>{# /column #}
445 <div class="column">
446 <div class="grouped fields">
447 <label{% if required.pref_mail_method is defined and required.pref_mail_method == 1 %} required="required"{% endif %}>{{ _T("Emailing method:") }}</label>
448 <div class="field">
449 <div class="ui radio checkbox">
450 <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>
451 </div>
452 </div>
453 <div class="field">
454 <div class="ui radio checkbox">
455 <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>
456 </div>
457 </div>
458 <div class="field">
459 <div class="ui radio checkbox">
460 <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>
461 </div>
462 </div>
463 <div class="field">
464 <div class="ui radio checkbox">
465 <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>
466 </div>
467 </div>
468 <div class="field">
469 <div class="ui radio checkbox">
470 <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>
471 </div>
472 </div>
473 <div class="field">
474 <div class="ui radio checkbox">
475 <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>
476 </div>
477 </div>
478 <br/>
479 <a
480 href="{{ url_for('testEmail') }}#mail"
481 id="btnmail"
482 class="ui labeled icon button"
483 >
484 <i class="rocket icon" aria-hidden="true"></i>
485 {{ _T("Test email settings") }}
486 </a>
487 </div>
488 <div id="smtp_parameters" class="field">
489 <div class="field">
490 <label for="pref_mail_smtp_host">{{ _T("SMTP server:") }}</label>
491 <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 %}/>
492 </div>
493 <div class="field">
494 <label for="pref_mail_smtp_port">{{ _T("SMTP port:") }}</label>
495 <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 %}/>
496 </div>
497 <div class="grouped fields">
498 <div class="field inline">
499 <div class="ui right aligned toggle checkbox">
500 <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 %}/>
501 <label for="pref_mail_smtp_auth">{{ _T("Use SMTP authentication?") }}</label>
502 </div>
503 <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>
504 </div>
505 <div class="field inline">
506 <div class="ui right aligned toggle checkbox">
507 <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 %}/>
508 <label for="pref_mail_smtp_secure">{{ _T("Use TLS for SMTP?") }}</label>
509 </div>
510 <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>
511 </div>
512 <div class="field inline">
513 <div class="ui right aligned toggle checkbox">
514 <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 %}/>
515 <label for="pref_mail_allow_unsecure">{{ _T("Allow unsecure TLS?") }}</label>
516 </div>
517 <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>
518 </div>
519 </div>
520 </div>
521 <div id="smtp_auth" class="field">
522 <div class="field">
523 <label for="pref_mail_smtp_user">{{ _T("SMTP (or GMail) user:") }}</label>
524 <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 %}/>
525 </div>
526 <div class="field">
527 <label for="pref_mail_smtp_password">{{ _T("SMTP (or GMail) password:") }}</label>
528 <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 %}/>
529 </div>
530 </div>
531 </div>{# /column #}
532 </div>{# /column grid #}
533 {% endif %}
534 </div>{# /tab segment #}
535 <div class="ui{{ tab == 'labels' ? ' active' }} tab segment" data-tab="labels">
536 <div class="ui two column grid">
537 <div class="column">
538 <div class="field">
539 <label for="pref_etiq_marges_v">{{ _T("Vertical margins:") }}</label>
540 <div class="ui right labeled input">
541 <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 %}/>
542 <div class="ui basic label">mm</div>
543 </div>
544 </div>
545 <div class="field">
546 <label for="pref_etiq_marges_h">{{ _T("Horizontal margins:") }}</label>
547 <div class="ui right labeled input">
548 <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 %}/>
549 <div class="ui basic label">mm</div>
550 </div>
551 </div>
552 <div class="field">
553 <label for="pref_etiq_hspace">{{ _T("Horizontal spacing:") }}</label>
554 <div class="ui right labeled input">
555 <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 %}/>
556 <div class="ui basic label">mm</div>
557 </div>
558 </div>
559 <div class="field">
560 <label for="pref_etiq_vspace">{{ _T("Vertical spacing:") }}</label>
561 <div class="ui right labeled input">
562 <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 %}/>
563 <div class="ui basic label">mm</div>
564 </div>
565 </div>
566 <div class="field inline">
567 <div class="ui right aligned toggle checkbox">
568 <input type="checkbox" name="pref_etiq_border" id="pref_etiq_border" value="1" {% if pref.pref_etiq_border == 1 %}checked="checked"{% endif %}/>
569 <label for="pref_etiq_border">{{ _T("Print border") }}</label>
570 </div>
571 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Check this box to print a grey border around each label.") }}"></i>
572 </div>
573 </div>{# /column #}
574 <div class="column">
575 <div class="field">
576 <label for="pref_etiq_hsize">{{ _T("Label width:") }}</label>
577 <div class="ui right labeled input">
578 <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 %}/>
579 <div class="ui basic label">mm</div>
580 </div>
581 </div>
582 <div class="field">
583 <label for="pref_etiq_vsize">{{ _T("Label height:") }}</label>
584 <div class="ui right labeled input">
585 <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 %}/>
586 <div class="ui basic label">mm</div>
587 </div>
588 </div>
589 <div class="field">
590 <label for="pref_etiq_cols">{{ _T("Number of label columns:") }}</label>
591 <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 %}/>
592 </div>
593 <div class="field">
594 <label for="pref_etiq_rows">{{ _T("Number of label lines:") }}</label>
595 <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 %}/>
596 </div>
597 <div class="field">
598 <label for="pref_etiq_corps">{{ _T("Font size:") }}</label>
599 <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 %}/>
600 </div>
601 </div>{# /column #}
602 </div>{# /column grid #}
603 </div>{# /tab segment #}
604 <div class="ui{{ tab == 'cards' ? ' active' }} tab segment" data-tab="cards">
605 <div class="ui icon info visible message">
606 <i class="info circle blue icon"></i>
607 <div class="content">
608 {{ _T("Each card is 75mm width and 40mm height. Each page contains 2 columns and 6 rows.<br/>Double check margins and spacings ;)")|raw }}
609 </div>
610 </div>
611 <div class="ui two column grid">
612 <div class="column">
613 <div class="field">
614 <label for="pref_card_abrev">{{ _T("Short Text (Card Center):") }}</label>
615 <div class="ui action input">
616 <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 %}/>
617 <a
618 href="{{ url_for("dynamicTranslations", {"text_orig": pref.pref_card_abrev|escape}) }}"
619 class="tooltip ui icon button"
620 title="{{ _T("Translate '%s'")|replace({"%s": pref.pref_card_abrev}) }}"
621 >
622 <i class="language icon"></i>
623 <span class="displaynone">{{ _T("Translate '%s'")|replace({'%s': pref.pref_card_abrev}) }}</span>
624 </a>
625 </div>
626 <span class="exemple">{{ _T("(10 characters max)") }}</span>
627 </div>
628 <div class="field">
629 <label for="pref_card_strip">{{ _T("Long Text (Bottom Line):") }}</label>
630 <div class="ui action input">
631 <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 %}/>
632 <a
633 href="{{ url_for("dynamicTranslations", {"text_orig": pref.pref_card_strip|escape}) }}"
634 class="tooltip ui icon button "
635 title="{{ _T("Translate '%s'")|replace({"%s": pref.pref_card_strip}) }}"
636 >
637 <i class="language icon"></i>
638 <span class="displaynone">{{ _T("Translate '%s'")|replace({'%s': pref.pref_card_strip}) }}</span>
639 </a>
640 </div>
641 <span class="exemple">{{ _T("(65 characters max)") }}</span>
642 </div>
643 <div class="grouped fields">
644 <div class="inline field">
645 <label for="pref_card_tcol">{{ _T("Strip Text Color:") }}</label>
646 <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 %}/>
647 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Hexadecimal color notation: #RRGGBB") }}"></i>
648 </div>
649 <div class="inline field">
650 <label for="pref_card_scol">{{ _T("Active Member Color:") }}</label>
651 <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 %}/>
652 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Hexadecimal color notation: #RRGGBB") }}"></i>
653 </div>
654 <div class="inline field">
655 <label for="pref_card_bcol">{{ _T("Board Members Color:") }}</label>
656 <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 %}/>
657 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Hexadecimal color notation: #RRGGBB") }}"></i>
658 </div>
659 <div class="inline field">
660 <label for="pref_card_hcol">{{ _T("Honor Members Color:") }}</label>
661 <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 %}/>
662 <i class="circular small inverted primary icon info tooltip" title="{{ _T("Hexadecimal color notation: #RRGGBB") }}"></i>
663 </div>
664 </div>{# /group fields #}
665 <div class="field ui items">
666 <label{% if required.card_logo is defined and required.card_logo == 1 %} required="required"{% endif %}>{{ _T("Logo:") }}</label>
667 <div class="item">
668 {% if print_logo.isCustom() %}
669 <div class="image">
670 <img src="{{ url_for('printLogo') }}" class="picture" width="{{ print_logo.getOptimalWidth() }}" height="{{ print_logo.getOptimalHeight() }}" alt="{{ _T("Current logo for printing") }}"/><br/>
671 </div>
672 {% endif %}
673 <div class="content">
674 <div class="description">
675 <div class="ui file action input">
676 <input type="file" name="card_logo" id="card_logo"{% if constant('GALETTE_MODE') == constant('Galette\\Core\\Galette::MODE_DEMO') %} disabled="disabled"{% endif %}/>
677 <label for="card_logo" class="ui button{% if constant('GALETTE_MODE') == constant('\\Galette\\Core\\Galette::MODE_DEMO') %} disabled{% endif %}">
678 <i class="blue upload icon"></i>
679 {% if print_logo.isCustom() %}{{ _T("Choose another file") }}{% else %}{{ _T("Choose a file") }}{% endif %}
680 </label>
681 </div>
682 </div>
683 <div class="extra ui basic fitted segment">
684 {% if print_logo.isCustom() %}
685 <div class="ui toggle checkbox">
686 <input type="checkbox" name="del_card_logo" id="del_card_logo" value="1" />
687 <label for="del_card_logo">{{ _T("Delete image") }}</label>
688 </div>
689 {% endif %}
690 </div>
691 </div>
692 </div>
693 </div>
694 </div>{# /column #}
695 <div class="column">
696 <div class="field inline">
697 <div class="ui right aligned toggle checkbox">
698 <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 %}/>
699 <label for="pref_card_self">{{ _T("Allow members to print card ?") }}</label>
700 </div>
701 </div>
702 <div class="field inline">
703 <div class="ui right aligned toggle checkbox">
704 <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 %}/>
705 <label for="pref_bool_display_title">{{ _T("Show title ?") }}</label>
706 </div>
707 <i class="circular small inverted primary icon info tooltip" title="{{ _T("(Show or not title in front of name)") }}"></i>
708 </div>
709 <div class="field">
710 <label for="pref_card_address">{{ _T("Address type:") }}</label>
711 <select name="pref_card_address" id="pref_card_address" class="ui search dropdown nochosen">
712 <option value="0" {% if pref.pref_card_address == 0 %}selected="selected"{% endif %}>{{ _T("Email") }}</option>
713 <option value="5" {% if pref.pref_card_address == 5 %}selected="selected"{% endif %}>{{ _T("Zip - Town") }}</option>
714 <option value="6" {% if pref.pref_card_address == 6 %}selected="selected"{% endif %}>{{ _T("Nickname") }}</option>
715 <option value="7" {% if pref.pref_card_address == 7 %}selected="selected"{% endif %}>{{ _T("Profession") }}</option>
716 <option value="8" {% if pref.pref_card_address == 8 %}selected="selected"{% endif %}>{{ _T("Member number") }}</option>
717 </select>
718 <span class="exemple">{{ _T("(Choose address printed below name)") }}</span>
719 </div>
720 <div class="field">
721 <label for="pref_card_year">{{ _T("Year:") }}</label>
722 <div class="ui right corner labeled input">
723 <div class="ui corner label">
724 <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>
725 </div>
726 <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 %}/>
727 </div>
728 </div>
729 <div class="field">
730 <label for="pref_card_marges_v">{{ _T("Vertical margins:") }}</label>
731 <div class="ui right labeled input">
732 <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 %}/>
733 <div class="ui basic label">mm</div>
734 </div>
735 </div>
736 <div class="field">
737 <label for="pref_card_marges_h">{{ _T("Horizontal margins:") }}</label>
738 <div class="ui right labeled input">
739 <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 %}/>
740 <div class="ui basic label">mm</div>
741 </div>
742 </div>
743 <div class="field">
744 <label for="pref_card_vspace">{{ _T("Vertical spacing:") }}</label>
745 <div class="ui right labeled input">
746 <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 %}/>
747 <div class="ui basic label">mm</div>
748 </div>
749 </div>
750 <div class="field">
751 <label for="pref_card_hspace">{{ _T("Horizontal spacing:") }}</label>
752 <div class="ui right labeled input">
753 <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 %}/>
754 <div class="ui basic label">mm</div>
755 </div>
756 </div>
757 </div>{# /column #}
758 </div>{# /column grid #}
759 </div>{# /tab segment #}
760
761 {% if login.isAdmin() %}
762 <div class="ui{{ tab == 'security' ? ' active' }} tab segment" data-tab="security">
763 <div class="inline field">
764 <label for="pref_password_length">{{ _T("Password length:") }}</label>
765 <div class="ui right corner labeled input">
766 <div class="ui corner label">
767 <i class="circular inverted primary icon info tooltip" title="{{ _T("Minimum password length required for all accounts. Minimal size is 6.") }}"></i>
768 </div>
769 <input type="number" name="pref_password_length" id="pref_password_length" value="{{ pref.pref_password_length }}" min="6" size="7" required="required"/>
770 </div>
771 </div>
772 <div class="inline field">
773 <div class="ui right aligned toggle checkbox">
774 <input type="checkbox" name="pref_password_blacklist" id="pref_password_blacklist" value="1"{% if pref.pref_password_blacklist == 1 %} checked="checked"{% endif %}/>
775 <label for="pref_password_blacklist" title="{{ _T("Enable password blacklists") }}">{{ _T("Enable blacklists:") }}</label>
776 </div>
777 <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>
778 </div>
779 <div class="inline field">
780 <label for="pref_password_strength" title="{{ _T("Enforce password strength") }}">{{ _T("Password strength:") }}</label>
781 <select name="pref_password_strength" id="pref_password_strength" class="ui dropdown nochosen">
782 <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>
783 <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>
784 <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>
785 <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>
786 <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>
787 </select>
788 <i class="tooltip circular inverted primary small icon info" data-html="
789 <p>{{ _T("Enforce minimal password strength for all password.") }}<br/>
790 {{ _T("Levels are:") }}</p>
791 <ul>
792 <li><em>* {{ _T("None") }}</em> {{ _T("for no strength enforcement") }}</li>
793 <li><em>* {{ _T("Weak") }}</em> {{ _T("require at least one matched rule") }}</li>
794 <li><em>* {{ _T("Medium") }}</em> {{ _T("require at least two matched rules") }}</li>
795 <li><em>* {{ _T("Strong") }}</em> {{ _T("require at least three matched rules (recommended for most usages)") }}</li>
796 <li><em>* {{ _T("Very Strong") }}</em> {{ _T("requires all rules.") }}</li>
797 </ul>
798 <p>{{ _T("Rules include lower case characters, upper case characters, numbers, and special characters.") }}<br/>
799 {{ _T("Note that with any enforcement level, user cannot use his personal information (name, login, ...) as password.") }}</p>
800 " data-variation="inverted very wide">
801 </i>
802 </div>
803 <div id="test_password_strength_field" class="inline field">
804 <label for="test_password_strength">{{ _T("Test a password:") }}</label>
805 <div class="ui right corner labeled input">
806 <div class="ui corner label">
807 <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>
808 </div>
809 <input type="text" id="test_password_strength"/>
810 </div>
811
812 </div>
813 </div>{# /tab segment #}
814 {% endif %}
815 {% if login.isSuperAdmin() %}
816 <div class="ui{{ tab == 'admin' ? ' active' }} tab red segment" data-tab="admin">
817 {% if constant('GALETTE_MODE') == constant('\\Galette\\Core\\Galette::MODE_DEMO') %}
818 <div class="ui icon negative message">
819 <i class="ban icon"></i>
820 <div class="content">
821 {{ _T("Application runs under demo mode. This functionnality is not enabled, sorry.") }}
822 </div>
823 </div>
824 {% else %}
825 <div class="inline field">
826 <label for="pref_admin_login">{{ _T("Username:") }}</label>
827 <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 %}/>
828 </div>
829 <div id="pref_admin_pass_field" class="inline field">
830 <label for="pref_admin_pass">{{ _T("Password:") }}</label>
831 <div class="ui input">
832 <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 %}/>
833 </div>
834 </div>
835 <div class="inline field">
836 <label for="pref_admin_pass_check">{{ _T("Retype password:") }}</label>
837 <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 %}/>
838 </div>
839 {% endif %}
840 </div>{# /tab segment #}
841 {% endif %}
842 <div class="ui basic center aligned segment">
843 <input type="hidden" name="valid" value="1"/>
844 <input type="hidden" name="pref_theme" value="default"/>
845 <input type="hidden" name="pref_telemetry_date" value="{{ pref.pref_telemetry_date }}"/>
846 <input type="hidden" name="pref_instance_uuid" value="{{ pref.pref_instance_uuid }}"/>
847 <input type="hidden" name="pref_registration_date" value="{{ pref.pref_registration_date }}"/>
848 <input type="hidden" name="pref_registration_uuid" value="{{ pref.pref_registration_uuid }}"/>
849 <input type="hidden" name="tab" id="tab" value="{{ tab }}"/>
850 <button type="submit" class="ui labeled icon primary button action">
851 <i class="save icon"></i> {{ _T("Save") }}
852 </button>
853 </div>
854 {% include "components/forms/csrf.html.twig" %}
855 </form>
856
857 {% include "modals/telemetry.html.twig" with {part: "dialog"} %}
858 {% include "modals/replacements_legend.html.twig" with {legends: preferences.getLegend(), cur_ref: 'prefs'} %}
859 {% endblock %}
860
861 {% block javascripts %}
862 <script type="text/javascript">
863 $(function(){
864 {% if pref.pref_mail_method != constant('Galette\\Core\\GaletteMail::METHOD_SMTP') %}
865 $('#smtp_parameters').addClass('displaynone');
866 {% endif %}
867 {% if pref.pref_mail_method != constant('Galette\\Core\\GaletteMail::METHOD_SMTP') and pref.pref_mail_method != constant('Galette\\Core\\GaletteMail::METHOD_GMAIL') %}
868 $('#smtp_auth').addClass('displaynone');
869 {% endif %}
870 $('.ui.radio.checkbox').checkbox({
871 onChange: function() {
872 var _checked = $(this).closest('input').attr('id');
873 var _smtp_parameters = $(this).closest('.checkbox').parent().parent().siblings('#smtp_parameters');
874 var _smtp_auth = $(this).closest('.checkbox').parent().parent().siblings('#smtp_auth');
875 if ( _checked == 'smtp' ) {
876 _smtp_parameters.removeClass('displaynone');
877 _smtp_auth.removeClass('displaynone');
878 } else if ( _checked == 'gmail' ) {
879 _smtp_parameters.addClass('displaynone');
880 _smtp_auth.removeClass('displaynone');
881 } else {
882 _smtp_parameters.addClass('displaynone');
883 _smtp_auth.addClass('displaynone');
884 }
885 }
886 });
887 /*$('#smtp, #gmail').checkbox({
888 onChecked: function() {
889 console.log($(this).closest('#smtp_parameters'));
890 //$('#smtp_parameters, #smtp_auth').toggleClass('displaynone');
891 }
892 });*/
893
894 $('.pointing.menu .item').tab({
895 onVisible: function(tabPath) {
896 document.getElementById('tab').value = tabPath;
897 }
898 });
899
900 $('#pref_bool_publicpages').change(function(){
901 $('#publicpages_visibility').toggleClass('displaynone');
902 });
903
904 $('#btnmail').on('click', function(e) {
905 e.preventDefault();
906 var _this = $(this);
907 var _value = $('#pref_email_newadh').val();
908 var _input = '<div class="ui input"><input type="text" name="email_adress" id="email_adress" value="' + _value + '"/></div>';
909 $('body').modal({
910 title: '{{ _T("Enter the email adress")|e('js') }}',
911 class: 'tiny',
912 content: _input,
913 actions: [{
914 text : '{{ _T("Send")|e('js') }}',
915 icon : 'rocket',
916 class : 'icon labeled green approve',
917 click : function() {
918 $.ajax({
919 url: _this.attr('href'),
920 type: 'GET',
921 data: {
922 adress: $('#email_adress').val()
923 },
924 {% include "elements/js/loader.js.twig" with {
925 selector: '#btnmail',
926 loader: 'button'
927 } %},
928 success: function(res) {
929 //display message
930 $.ajax({
931 url: '{{ url_for('ajaxMessages') }}',
932 method: "GET",
933 success: function (message) {
934 $('#testEmail').prepend(message);
935 }
936 });
937 },
938 error: function () {
939 {% include "elements/js/modal.js.twig" with {
940 modal_title_twig: _T("An error occurred sending test email :(")|e("js"),
941 modal_without_content: true,
942 modal_class: "mini",
943 modal_deny_only: true,
944 modal_cancel_text: _T("Close")|e("js"),
945 modal_classname: "redalert",
946 } %}
947 }
948 });
949 }
950 }, {
951 text : '{{ _T("Cancel")|e('js') }}',
952 icon : 'times',
953 class : 'icon labeled cancel'
954 }]
955 }).modal('show');
956 });
957
958 _addLegendButton('#mail_sign');
959 _handleLegend();
960
961 {% include "elements/js/pwdcheck.js.twig" with {
962 selector: "#pref_admin_pass",
963 loader: "inline mini"
964 } %}
965 {% include "elements/js/pwdcheck.js.twig" with {
966 selector: "#test_password_strength",
967 loader: "inline mini",
968 extra_data: "pref_password_length: \$('#pref_password_length').val(),pref_password_blacklist: \$('#pref_password_blacklist').is(':checked'),pref_password_strength: \$('#pref_password_strength').val(),"
969 } %}
970
971 {% include "modals/telemetry.html.twig" with {part: "jsdialog"} %}
972 {% include "modals/telemetry.html.twig" with {part: "jsregister"} %}
973
974 });
975 </script>
976 {% endblock %}