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