]> git.agnieray.net Git - galette.git/blob - galette/templates/default/preferences.tpl
782cffabd440cd761c107b95e459186ca5a59b02
[galette.git] / galette / templates / default / preferences.tpl
1 {extends file="page.tpl"}
2 {block name="content"}
3 <form action="{path_for name="store-preferences"}" method="post" enctype="multipart/form-data" class="tabbed">
4 <div id="prefs_tabs">
5 <ul>
6 <li><a href="#general">{_T string="General"}</a></li>
7 <li><a href="#social">{_T string="Social networks"}</a></li>
8 <li><a href="#parameters">{_T string="Parameters"}</a></li>
9 <li><a href="#mail">{_T string="E-Mail"}</a></li>
10 <li><a href="#labels">{_T string="Labels"}</a></li>
11 <li><a href="#cards">{_T string="Cards"}</a></li>
12 {if $login->isAdmin()}
13 <li><a href="#security">{_T string="Security"}</a></li>
14 {/if}
15 {if $login->isSuperAdmin()}
16 <li><a href="#admin">{_T string="Admin"}</a></li>
17 {/if}
18 </ul>
19 <fieldset class="cssform" id="general">
20 <legend>{_T string="General information"}</legend>
21 <p>
22 <label for="pref_nom" class="bline">{_T string="Name of the association:"}</label>
23 <input{if $required.pref_nom eq 1} required="required"{/if} type="text" name="pref_nom" id="pref_nom" value="{$pref.pref_nom}" maxlength="190"/>
24 </p>
25 <p>
26 <label for="pref_slogan" class="bline tooltip">{_T string="Association's short description:"}</label>
27 <span class="tip">{_T string="Enter here a short description for your association, it will be displayed on the index page and into pages' title."}</span>
28 <input{if isset($required.pref_slogan) and $required.pref_slogan eq 1} required="required"{/if} type="text" class="large" name="pref_slogan" id="pref_slogan" value="{$pref.pref_slogan}"/>
29 <a
30 href="{path_for name="dynamicTranslations" data=["text_orig" => {$pref.pref_slogan|escape}]}"
31 class="tooltip"
32 >
33 <i class="fas fa-language"></i>
34 <span class="sr-only">{_T string="Translate '%s'" pattern="/%s/" replace=$pref.pref_slogan}</span>
35 </a>
36
37 </p>
38 <p>
39 <label for="pref_footer" class="bline tooltip">{_T string="Footer text:"}</label>
40 <span class="tip">{_T string="Enter a text (HTML allowed) that will be displayed in the footer of every page"}</span>
41 <input{if isset($required.pref_footer) and $required.pref_footer eq 1} required="required"{/if} type="text" class="large" name="pref_footer" id="pref_footer" value="{$pref.pref_footer|escape}"/>
42 </p>
43 <p>
44 <label for="logo_picture" class="bline">{_T string="Logo:"}</label>
45 {if $logo->isCustom()}
46 <img src="{path_for name="logo"}" class="picture" width="{$logo->getOptimalWidth()}" height="{$logo->getOptimalHeight()}" alt="{_T string="Current logo"}"/><br/>
47 <label for="del_logo">{_T string="Delete image"}</label><input type="checkbox" name="del_logo" id="del_logo" value="1" /><br />
48 {/if}
49 <input type="file" name="logo" id="logo_picture"{if $GALETTE_MODE eq 'DEMO'} disabled="disabled"{/if}/>
50 </p>
51 <p>
52 <label for="pref_adresse" class="bline">{_T string="Address:"}</label>
53 <input{if isset($required.pref_adresse) and $required.pref_adresse eq 1} required="required"{/if} type="text" name="pref_adresse" id="pref_adresse" value="{$pref.pref_adresse}" maxlength="190" class="large"/><br/>
54 <label for="pref_adresse2" class="bline libelle">{_T string="Address:"} {_T string=" (continuation)"}</label>
55 <input{if isset($required.pref_adresse) and $required.pref_adresse eq 1} required="required"{/if} type="text" name="pref_adresse2" id="pref_adresse2" value="{$pref.pref_adresse2}" maxlength="190" class="large"/>
56 </p>
57 <p>
58 <label for="pref_cp" class="bline">{_T string="Zip Code:"}</label>
59 <input{if isset($required.pref_cp) and $required.pref_cp eq 1} required="required"{/if} type="text" name="pref_cp" id="pref_cp" value="{$pref.pref_cp}" maxlength="10"/>
60 </p>
61 <p>
62 <label for="pref_ville" class="bline">{_T string="City:"}</label>
63 <input{if isset($required.pref_ville) and $required.pref_ville eq 1} required="required"{/if} type="text" name="pref_ville" id="pref_ville" value="{$pref.pref_ville}" maxlength="100"/>
64 </p>
65 <p>
66 <label for="pref_pays" class="bline">{_T string="Country:"}</label>
67 <input{if isset($required.pref_pays) and $required.pref_pays eq 1} required="required"{/if} type="text" name="pref_pays" id="pref_pays" value="{$pref.pref_pays}" maxlength="50"/>
68 </p>
69 <div class="p">
70 <span class="bline tooltip">{_T string="Postal address:"}</span>
71 <span class="tip">{_T string="Use either the address setted below or select a staff member to retrieve he's address."}</span>
72 <label for="pref_postal_adress_0">{_T string="from preferences"}</label>
73 <input type="radio" name="pref_postal_adress" id="pref_postal_adress_0" value="{Galette\Core\Preferences::POSTAL_ADDRESS_FROM_PREFS}" {if $pref.pref_postal_adress eq constant('Galette\Core\Preferences::POSTAL_ADDRESS_FROM_PREFS')}checked="checked"{/if}/>
74 <label for="pref_postal_adress_1">{_T string="from a staff user"}</label>
75 <input type="radio" name="pref_postal_adress" id="pref_postal_adress_1" value="{Galette\Core\Preferences::POSTAL_ADDRESS_FROM_STAFF}" {if $pref.pref_postal_adress eq constant('Galette\Core\Preferences::POSTAL_ADDRESS_FROM_STAFF')}checked="checked"{/if}/>
76 <br/><label for="pref_postal_staff_member">{_T string="Staff member"}</label>
77 <select name="pref_postal_staff_member" id="pref_postal_staff_member">
78 <option value="-1">{_T string="-- Choose a staff member --"}</option>
79 {foreach from=$staff_members item=staff}
80 <option value="{$staff->id}"{if $staff->id eq $pref.pref_postal_staff_member} selected="selected"{/if}>{$staff->sname} ({$staff->sstatus})</option>
81 {/foreach}
82 </select>
83 </div>
84 <p>
85 <label for="pref_website" class="bline">{_T string="Website:"}</label>
86 <input{if isset($required.pref_website) and $required.pref_website eq 1} required="required"{/if} type="text" name="pref_website" id="pref_website" value="{$pref.pref_website}" maxlength="100"/>
87 </p>
88 <div class="p">
89 <span class="bline tooltip">{_T string="Telemetry date:"}</span>
90 <span class="tip">{_T string="Last telemetry sent date."}</span>
91 <span>
92 {if $pref.pref_telemetry_date}
93 {$pref.pref_telemetry_date|date_format:"%a %d/%m/%Y - %R"}
94 {else}
95 {_T string="Never"}
96 {/if}
97 - <a href="#" id="telemetry" class="button"><i class="fas fa-chart-bar" aria-hidden="true"></i> {_T string="send"}</a>
98 </span>
99 </div>
100 <div class="p">
101 <span class="bline tooltip">{_T string="Registration date:"}</span>
102 <span class="tip">{_T string="Date on which you registered your Galette instance."}</span>
103 <span>
104 {if $pref.pref_registration_date}
105 {assign var="regtxt" value={_T string="Update your information"}}
106 {$pref.pref_registration_date|date_format:"%a %d/%m/%Y - %R"}
107 {else}
108 {assign var="regtxt" value={_T string="Register"}}
109 {_T string="Not registered"}
110 {/if}
111 - <a href="{$smarty.const.GALETTE_TELEMETRY_URI}reference?showmodal&uuid={$pref.pref_registration_uuid}" id="register" target="_blank" class="button"><i class="fas fa-marker"></i>{$regtxt}</a>
112 </span>
113 </div>
114
115 </fieldset>
116
117 <fieldset class="cssform" id="social">
118 <legend>{_T string="Social networks"}</legend>
119 <p>
120 <label for="pref_googleplus" class="bline">{_T string="Google+"}</label>
121 <input type="text" name="pref_googleplus" id="pref_googleplus" value="{$pref.pref_googleplus}" class="large"/>
122 </p>
123 <p>
124 <label for="pref_facebook" class="bline">{_T string="Facebook"}</label>
125 <input type="text" name="pref_facebook" id="pref_facebook" value="{$pref.pref_facebook}" class="large"/>
126 </p>
127 <p>
128 <label for="pref_twitter" class="bline">{_T string="Twitter"}</label>
129 <input type="text" name="pref_twitter" id="pref_twitter" value="{$pref.pref_twitter}" class="large"/>
130 </p>
131 <p>
132 <label for="pref_linkedin" class="bline">{_T string="LinkedIn"}</label>
133 <input type="text" name="pref_linkedin" id="pref_linkedin" value="{$pref.pref_linkedin}" class="large"/>
134 </p>
135 <p>
136 <label for="pref_viadeo" class="bline">{_T string="Viadeo"}</label>
137 <input type="text" name="pref_viadeo" id="pref_viadeo" value="{$pref.pref_viadeo}" class="large"/>
138 </p>
139 </fieldset>
140
141 <fieldset class="cssform" id="parameters">
142 <legend>{_T string="Galette's parameters"}</legend>
143 <p>
144 <label for="pref_lang" class="bline">{_T string="Default language:"}</label>
145 <select name="pref_lang" id="pref_lang" class="lang">
146 {foreach item=langue from=$languages}
147 <option value="{$langue->getID()}" {if $pref.pref_lang eq $langue->getID()}selected="selected"{/if}>{$langue->getName()}</option>
148 {/foreach}
149 </select>
150 </p>
151 {*<p>
152 <label for="pref_theme" class="bline">{_T string="Default theme:"}</label>
153 <select name="pref_theme" id="pref_theme">
154 {foreach item=theme from=$themes}
155 <option value="{$theme}" {if $pref.pref_theme eq $theme}selected="selected"{/if}>{$theme|ucfirst}</option>
156 {/foreach}
157 </select>
158 </p>*}
159 <p>
160 <label for="pref_numrows" class="bline">{_T string="Lines / Page:"}</label>
161 <select name="pref_numrows" id="pref_numrows">
162 {html_options options=$pref_numrows_options selected=$pref.pref_numrows}
163 </select>
164 </p>
165 <p>
166
167 <label for="pref_redirect_on_create" class="bline">{_T string="After member creation:"}</label>
168 <select name="pref_redirect_on_create" id="pref_redirect_on_create">
169 <option value="{constant('Galette\Entity\Adherent::AFTER_ADD_DEFAULT')}"{if $pref.pref_redirect_on_create == constant('Galette\Entity\Adherent::AFTER_ADD_DEFAULT')} selected="selected"{/if}>{_T string="create a new contribution (default action)"}</option>
170 <option value="{constant('Galette\Entity\Adherent::AFTER_ADD_TRANS')}"{if $pref.pref_redirect_on_create == constant('Galette\Entity\Adherent::AFTER_ADD_TRANS')} selected="selected"{/if}>{_T string="create a new transaction"}</option>
171 <option value="{constant('Galette\Entity\Adherent::AFTER_ADD_NEW')}"{if $pref.pref_redirect_on_create == constant('Galette\Entity\Adherent::AFTER_ADD_NEW')} selected="selected"{/if}>{_T string="create another new member"}</option>
172 <option value="{constant('Galette\Entity\Adherent::AFTER_ADD_SHOW')}"{if $pref.pref_redirect_on_create == constant('Galette\Entity\Adherent::AFTER_ADD_SHOW')} selected="selected"{/if}>{_T string="show member"}</option>
173 <option value="{constant('Galette\Entity\Adherent::AFTER_ADD_LIST')}"{if $pref.pref_redirect_on_create == constant('Galette\Entity\Adherent::AFTER_ADD_LIST')} selected="selected"{/if}>{_T string="go to members list"}</option>
174 <option value="{constant('Galette\Entity\Adherent::AFTER_ADD_HOME')}"{if $pref.pref_redirect_on_create == constant('Galette\Entity\Adherent::AFTER_ADD_HOME')} selected="selected"{/if}>{_T string="go to main page"}</option>
175 </select>
176 </p>
177 <p>
178 <label for="pref_log" class="bline">{_T string="Logging level:"}</label>
179 <select name="pref_log" id="pref_log">
180 <option value="{Galette\Core\Preferences::LOG_DISABLED}" {if $pref.pref_log eq constant('Galette\Core\Preferences::LOG_DISABLED')}selected="selected"{/if}>{_T string="Disabled"}</option>
181 <option value="{Galette\Core\Preferences::LOG_ENABLED}" {if $pref.pref_log eq constant('Galette\Core\Preferences::LOG_ENABLED')}selected="selected"{/if}>{_T string="Enabled"}</option>
182 </select>
183 </p>
184 <p>
185 <label for="pref_statut" class="bline">{_T string="Default membership status:"}</label>
186 <select name="pref_statut" id="pref_statut">
187 {html_options options=$statuts selected=$pref.pref_statut}
188 </select>
189 </p>
190 <p>
191 <label for="pref_filter_account" class="bline">{_T string="Default account filter:"}</label>
192 <select name="pref_filter_account" id="pref_filter_account">
193 {html_options options=$accounts_options selected=$pref.pref_filter_account}
194 </select>
195 </p>
196 <p>
197 <label for="pref_membership_ext" class="bline">{_T string="Default membership extension:"}</label>
198 <input type="text" name="pref_membership_ext" id="pref_membership_ext" value="{$pref.pref_membership_ext}" maxlength="2"{if isset($required.pref_membership_ext) and $required.pref_membership_ext eq 1} required="required"{/if}/>
199 <span class="exemple">{_T string="(Months)"}</span>
200 </p>
201 <p>
202 <label for="pref_beg_membership" class="bline">{_T string="Beginning of membership:"}</label>
203 <input type="text" name="pref_beg_membership" id="pref_beg_membership" value="{$pref.pref_beg_membership}" maxlength="5"{if isset($required.pref_beg_membership) and $required.pref_beg_membership eq 1} required="required"{/if}/>
204 <span class="exemple">{_T string="(dd/mm)"}</span>
205 </p>
206 <p>
207 <label for="pref_membership_offermonths" class="bline tooltip">{_T string="Number of months offered:"}</label>
208 <span class="tip">{_T string="When using the beginning of membership option; you can offer the last months of the year."}<br/>{_T string="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."}</span>
209 <input type="number" name="pref_membership_offermonths" min="0" id="pref_membership_offermonths" value="{$pref.pref_membership_offermonths}" maxlength="5"{if isset($required.pref_membership_offermonths) and $required.pref_membership_offermonths eq 1} required="required"{/if}/>
210 </p>
211 <p>
212 <label for="pref_bool_publicpages" class="bline">{_T string="Public pages enabled?"}</label>
213 <input type="checkbox" name="pref_bool_publicpages" id="pref_bool_publicpages" value="1" {if $pref.pref_bool_publicpages} checked="checked"{/if}{if isset($required.pref_bool_publicpages) and $required.pref_bool_publicpages eq 1} required="required"{/if}/>
214 </p>
215 <p id="publicpages_visibility"{if !$pref.pref_bool_publicpages} class="hidden"{/if}>
216 <label for="pref_publicpages_visibility" class="bline">{_T string="Show public pages for"}</label>
217 <select name="pref_publicpages_visibility" id="pref_publicpages_visibility">
218 <option value="{Galette\Core\Preferences::PUBLIC_PAGES_VISIBILITY_PUBLIC}"{if $pref.pref_publicpages_visibility eq constant('Galette\Core\Preferences::PUBLIC_PAGES_VISIBILITY_PUBLIC')} selected="selected"{/if}>{_T string="Everyone"}</option>
219 <option value="{Galette\Core\Preferences::PUBLIC_PAGES_VISIBILITY_RESTRICTED}"{if $pref.pref_publicpages_visibility eq constant('Galette\Core\Preferences::PUBLIC_PAGES_VISIBILITY_RESTRICTED')} selected="selected"{/if}>{_T string="Up to date members"}</option>
220 <option value="{Galette\Core\Preferences::PUBLIC_PAGES_VISIBILITY_PRIVATE}"{if $pref.pref_publicpages_visibility eq constant('Galette\Core\Preferences::PUBLIC_PAGES_VISIBILITY_PRIVATE')} selected="selected"{/if}>{_T string="Admin and staff only"}</option>
221 </select>
222 </p>
223 <p>
224 <label for="pref_bool_selfsubscribe" class="bline">{_T string="Self subscription enabled?"}</label>
225 <input type="checkbox" name="pref_bool_selfsubscribe" id="pref_bool_selfsubscribe" value="1"{if $pref.pref_bool_selfsubscribe} checked="checked"{/if} {if isset($required.pref_bool_selfsubscribe) and $required.pref_bool_selfsubscribe eq 1} required="required"{/if}/>
226 </p>
227 <p>
228 <label for="pref_new_contrib_script" class="bline tooltip">{_T string="Post new contribution script URI"}</label>
229 <span class="tip">{_T string="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)."}</span>
230 <input type="text" name="pref_new_contrib_script" id="pref_new_contrib_script" value="{$pref.pref_new_contrib_script}"{if isset($required.pref_new_contrib_script) and $required.pref_new_contrib_script eq 1} required="required"{/if}/>
231 </p>
232 <p>
233 <label for="pref_rss_url" class="bline tooltip">{_T string="RSS feed URL"}</label>
234 <span class="tip">{_T string="Enter the full URL to the RSS feed. It will be displayed on Galette desktop."}</span>
235 <input type="text" name="pref_rss_url" id="pref_rss_url" value="{$pref.pref_rss_url}"{if isset($required.pref_rss_url) and $required.pref_rss_url eq 1} required="required"{/if}/>
236 </p>
237 <p>
238 <label for="pref_galette_url" class="bline tooltip">{_T string="Galette base URL"}</label>
239 <span class="tip">{_T string="Enter the base URL to your Galette instance. You should only change this parameter if the current page URL is not:<br/>%galette_url" pattern="/%galette_url/" replace=$preferences->getDefaultURL()|cat:{path_for name="preferences"}}</span>
240 <input type="text" name="pref_galette_url" id="pref_galette_url" placeholder="{$preferences->getDefaultURL()}" value="{$pref.pref_galette_url}"{if isset($required.pref_galette_url) and $required.pref_galette_url eq 1} required="required"{/if}/>
241 </p>
242 <p>
243 <label for="pref_show_id" class="bline tooltip">{_T string="Show identifiers"}</label>
244 <span class="tip">{_T string="Display database identifiers in related windows"}</span>
245 <input type="checkbox" name="pref_show_id" id="pref_show_id" value="1" {if $pref.pref_show_id} checked="checked"{/if}{if isset($required.pref_show_id) and $required.pref_show_id eq 1} required="required"{/if}/>
246 </p>
247 </fieldset>
248
249 <fieldset class="cssform" id="mail">
250 <legend>{_T string="Mail settings"}</legend>
251 {if $GALETTE_MODE eq 'DEMO'}
252 <div>{_T string="Application runs under demo mode. This functionnality is not enabled, sorry."}</div>
253 {else}
254 <p>
255 <label for="pref_email_nom" class="bline">{_T string="Sender name:"}</label>
256 <input type="text" name="pref_email_nom" id="pref_email_nom" value="{$pref.pref_email_nom}" maxlength="50"{if isset($required.pref_email_nom) and $required.pref_email_nom eq 1} required="required"{/if}/>
257 </p>
258 <p>
259 <label for="pref_email" class="bline">{_T string="Sender Email:"}</label>
260 <input type="text" name="pref_email" id="pref_email" value="{$pref.pref_email}" maxlength="100" size="30"{if isset($required.pref_email) and $required.pref_email eq 1} required="required"{/if}/>
261 </p>
262 <p>
263 <label for="pref_email_reply_to" class="bline tooltip">{_T string="Reply-To Email:"}</label>
264 <span class="tip">{_T string="Leave empty to use Sender Email as reply address"}</span>
265 <input type="text" name="pref_email_reply_to" id="pref_email_reply_to" value="{$pref.pref_email_reply_to}" maxlength="100" size="30"{if isset($required.pref_email_reply_to) and $required.pref_email_reply_to eq 1} required="required"{/if}/>
266 </p>
267 <p>
268 {assign var="pref_email_newadh" value=""}
269 {foreach from=$preferences->vpref_email_newadh item=vmail_newadh}
270 {if $vmail_newadh@first }
271 {assign var="pref_email_newadh" value=$vmail_newadh}
272 {else}
273 {assign var="pref_email_newadh" value=$pref_email_newadh|cat:",{$vmail_newadh}"}
274 {/if}
275 {/foreach}
276
277 <label for="pref_email_newadh" class="bline tooltip">{_T string="Members administrator's Email:"}</label>
278 <span class="tip">{_T string="Recipient of new online registation and edition emails"}</span>
279 <input type="text" name="pref_email_newadh" id="pref_email_newadh" value="{$pref_email_newadh}" maxlength="100" size="30"{if isset($required.pref_email_newadh) and $required.pref_email_newadh eq 1} required="required"{/if}/>
280 <span class="exemple">{_T string="(You can enter several emails separated with a comma. First address will be the default one.)"}</span>
281 </p>
282 <p>
283 <label for="pref_bool_mailadh" class="bline tooltip">{_T string="Send email to administrators?"}</label>
284 <span class="tip">{_T string="Sends an email each time a new member registers online or edit his/her account"}</span>
285 <input type="checkbox" name="pref_bool_mailadh" id="pref_bool_mailadh" value="1" {if $pref.pref_bool_mailadh eq 1}checked="checked"{/if}{if isset($required.pref_bool_mailadh) and $required.pref_bool_mailadh eq 1} required="required"{/if}/>
286 </p>
287 <p>
288 <label for="pref_bool_mailowner" class="bline tooltip">{_T string="Send email to members?"}</label>
289 <span class="tip">{_T string="Sends an email each time a member card or a contribution has been added or edited. This can be disabled for each case."}</span>
290 <input type="checkbox" name="pref_bool_mailowner" id="pref_bool_mailowner" value="1" {if $pref.pref_bool_mailowner eq 1}checked="checked"{/if}{if isset($required.pref_bool_mailowner) and $required.pref_bool_mailowner eq 1} required="required"{/if}/>
291 </p>
292 <p>
293 <label for="pref_bool_wrap_mails" class="bline tooltip">{_T string="Wrap emails text?"}</label>
294 <span class="tip">{_T string="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."}</span>
295 <input type="checkbox" name="pref_bool_wrap_mails" id="pref_bool_wrap_mails" value="1" {if $pref.pref_bool_wrap_mails eq 1}checked="checked"{/if}{if isset($required.pref_bool_wrap_mails) and $required.pref_bool_wrap_mails eq 1} required="required"{/if}/>
296 </p>
297
298 <p>
299 <label for="pref_editor_enabled" class="bline tooltip">{_T string="Activate HTML editor?"}</label>
300 <span class="tip">{_T string="Should HTML editor be activated on page load ?"}</span>
301 <input type="checkbox" name="pref_editor_enabled" id="pref_editor_enabled" value="1" {if $pref.pref_editor_enabled eq 1}checked="checked"{/if}{if isset($required.pref_editor_enabled) and $required.pref_editor_enabled eq 1} required="required"{/if}/>
302 </p>
303 <div class="p">
304 <span class="bline vtop"{if isset($required.pref_mail_method) and $required.pref_mail_method eq 1} required="required"{/if}>{_T string="Emailing method:"}</span>
305 <ul>
306 <li>
307 <input type="radio" name="pref_mail_method" id="no" value="{Galette\Core\GaletteMail::METHOD_DISABLED}" {if $pref.pref_mail_method eq constant('Galette\Core\GaletteMail::METHOD_DISABLED')}checked="checked"{/if}/><label for="no">{_T string="Emailing disabled"}</label>
308 </li>
309 <li>
310 <input type="radio" name="pref_mail_method" id="php" value="{Galette\Core\GaletteMail::METHOD_PHPMAIL}" {if $pref.pref_mail_method eq constant('Galette\Core\GaletteMail::METHOD_PHPMAIL')}checked="checked"{/if}/><label for="php">{_T string="PHP mail() function"}</label>
311 </li>
312 <li>
313 <input type="radio" name="pref_mail_method" id="smtp" value="{Galette\Core\GaletteMail::METHOD_SMTP}" {if $pref.pref_mail_method eq constant('Galette\Core\GaletteMail::METHOD_SMTP')}checked="checked"{/if}/><label for="smtp">{_T string="Using a SMTP server (slower)"}</label>
314 </li>
315 <li>
316 <input type="radio" name="pref_mail_method" id="gmail" value="{Galette\Core\GaletteMail::METHOD_GMAIL}" {if $pref.pref_mail_method eq constant('Galette\Core\GaletteMail::METHOD_GMAIL')}checked="checked"{/if}/><label for="gmail">{_T string="Using GMAIL as SMTP server (slower)"}</label>
317 </li>
318 <li>
319 <input type="radio" name="pref_mail_method" id="sendmail" value="{Galette\Core\GaletteMail::METHOD_SENDMAIL}" {if $pref.pref_mail_method eq constant('Galette\Core\GaletteMail::METHOD_SENDMAIL')}checked="checked"{/if}/><label for="sendmail">{_T string="Using Sendmail server"}</label>
320 </li>
321 <li>
322 <input type="radio" name="pref_mail_method" id="qmail" value="{Galette\Core\GaletteMail::METHOD_QMAIL}" {if $pref.pref_mail_method eq constant('Galette\Core\GaletteMail::METHOD_QMAIL')}checked="checked"{/if}/><label for="qmail">{_T string="Using QMAIL server"}</label>
323 </li>
324 </ul>
325 <br/>
326 <a
327 href="{path_for name="testEmail"}#mail"
328 id="btnmail"
329 class="button"
330 >
331 <i class="fas fa-rocket" aria-hidden="true"></i>
332 {_T string="Test email settings"}
333 </a>
334 </div>
335 <div id="smtp_parameters"{if $pref.pref_mail_method neq constant('Galette\Core\GaletteMail::METHOD_SMTP')} style="display: none;"{/if}>
336 <p>
337 <label for="pref_mail_smtp_host" class="bline">{_T string="SMTP server:"}</label>
338 <input type="text" name="pref_mail_smtp_host" id="pref_mail_smtp_host" value="{$pref.pref_mail_smtp_host}" maxlength="100" size="30"/{if isset($required.pref_mail_smtp_host) and $required.pref_mail_smtp_host eq 1} required="required"{/if}>
339 </p>
340 <p>
341 <label for="pref_mail_smtp_port" class="bline">{_T string="SMTP port:"}</label>
342 <input type="text" name="pref_mail_smtp_port" id="pref_mail_smtp_port" value="{$pref.pref_mail_smtp_port}" size="10"{if isset($required.pref_mail_smtp_port) and $required.pref_mail_smtp_port eq 1} required="required"{/if}/>
343 </p>
344 <p>
345 <label for="pref_mail_smtp_auth" class="bline tooltip">{_T string="Use SMTP authentication?"}</label>
346 <span class="tip">{_T string="Would emailing use any SMTP authentication? You'll have to provide username and password below. For GMail, authentication will always be on."}</span>
347 <input type="checkbox" name="pref_mail_smtp_auth" id="pref_mail_smtp_auth" value="1" {if $pref.pref_mail_smtp_auth eq 1}checked="checked"{/if}{if isset($required.pref_mail_smtp_auth) and $required.pref_mail_smtp_auth eq 1} required="required"{/if}/>
348 </p>
349 <p>
350 <label for="pref_mail_smtp_secure" class="bline tooltip">{_T string="Use TLS for SMTP?"}</label>
351 <span class="tip">{_T string="Do you want to use server's TLS capabilities?<br/>For GMail, this will always be on."}</span>
352 <input type="checkbox" name="pref_mail_smtp_secure" id="pref_mail_smtp_secure" value="1" {if $pref.pref_mail_smtp_secure eq 1}checked="checked"{/if}{if isset($required.pref_mail_smtp_secure) and $required.pref_mail_smtp_secure eq 1} required="required"{/if}/>
353 </p>
354 <p>
355 <label for="pref_mail_allow_unsecure" class="bline tooltip">{_T string="Allow unsecure TLS?"}</label>
356 <span class="tip">{_T string="Do you want to allow 'unsecure' connections? This may be usefull if you server uses a self-signed certificate, and on some other cases."}</span>
357 <input type="checkbox" name="pref_mail_allow_unsecure" id="pref_mail_allow_unsecure" value="1" {if $pref.pref_mail_allow_unsecure eq 1}checked="checked"{/if}{if isset($required.pref_mail_allow_unsecure) and $required.pref_mail_allow_unsecure eq 1} required="required"{/if}/>
358 </p>
359 </div>
360 <div id="smtp_auth"{if $pref.pref_mail_method neq constant('Galette\Core\GaletteMail::METHOD_SMTP') && $pref.pref_mail_method neq constant('Galette\Core\GaletteMail::METHOD_GMAIL')} style="display: none;"{/if}>
361 <p>
362 <label for="pref_mail_smtp_user" class="bline">{_T string="SMTP (or GMail) user:"}</label>
363 <input type="text" name="pref_mail_smtp_user" id="pref_mail_smtp_user" value="{$pref.pref_mail_smtp_user}" maxlength="100" size="30"{if isset($required.pref_mail_smtp_user) and $required.pref_mail_smtp_user eq 1} required="required"{/if}/>
364 </p>
365 <p>
366 <label for="pref_mail_smtp_password" class="bline">{_T string="SMTP (or GMail) password:"}</label>
367 <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 isset($required.pref_mail_smtp_password) and $required.pref_mail_smtp_password eq 1} required="required"{/if}/>
368 </p>
369 </div>
370 <p>
371 <label for="pref_mail_sign" class="bline tooltip vtop">{_T string="Mail signature"}</label>
372 <span class="tip">{_T string="The text that will be automatically set as signature for all outgoing emails.<br/>Variables are quoted with braces, are upper case, and will be replaced automatically.<br/>Refer to the doc to know what variables ara available. "}</span>
373 <textarea name="pref_mail_sign" id="pref_mail_sign">{$pref.pref_mail_sign}</textarea>
374 </p>
375 {/if}
376 </fieldset>
377
378 <fieldset class="cssform" id="labels">
379 <legend>{_T string="Label generation parameters"}</legend>
380 <p>
381 <label for="pref_etiq_marges_v" class="bline">{_T string="Vertical margins:"}</label>
382 <input type="text" name="pref_etiq_marges_v" id="pref_etiq_marges_v" value="{$pref.pref_etiq_marges_v}" maxlength="4"{if isset($required.pref_etiq_marges_v) and $required.pref_etiq_marges_v eq 1} required="required"{/if}/> mm
383 <span class="exemple">{_T string="(Integer)"}</span>
384 </p>
385 <p>
386 <label for="pref_etiq_marges_h" class="bline">{_T string="Horizontal margins:"}</label>
387 <input type="text" name="pref_etiq_marges_h" id="pref_etiq_marges_h" value="{$pref.pref_etiq_marges_h}" maxlength="4"{if isset($required.pref_etiq_marges_h) and $required.pref_etiq_marges_h eq 1} required="required"{/if}/> mm
388 <span class="exemple">{_T string="(Integer)"}</span>
389 </p>
390 <p>
391 <label for="pref_etiq_hspace" class="bline">{_T string="Horizontal spacing:"}</label>
392 <input type="text" name="pref_etiq_hspace" id="pref_etiq_hspace" value="{$pref.pref_etiq_hspace}" maxlength="4"{if isset($required.pref_etiq_hspace) and $required.pref_etiq_hspace eq 1} required="required"{/if}/> mm
393 <span class="exemple">{_T string="(Integer)"}</span>
394 </p>
395 <p>
396 <label for="pref_etiq_vspace" class="bline">{_T string="Vertical spacing:"}</label>
397 <input type="text" name="pref_etiq_vspace" id="pref_etiq_vspace" value="{$pref.pref_etiq_vspace}" maxlength="4"{if isset($required.pref_etiq_vspace) and $required.pref_etiq_vspace eq 1} required="required"{/if}/> mm
398 <span class="exemple">{_T string="(Integer)"}</span>
399 </p>
400 <p>
401 <label for="pref_etiq_hsize" class="bline">{_T string="Label width:"}</label>
402 <input type="text" name="pref_etiq_hsize" id="pref_etiq_hsize" value="{$pref.pref_etiq_hsize}" maxlength="4"{if isset($required.pref_etiq_hsize) and $required.pref_etiq_hsize eq 1} required="required"{/if}/> mm
403 <span class="exemple">{_T string="(Integer)"}</span>
404 </p>
405 <p>
406 <label for="pref_etiq_vsize" class="bline">{_T string="Label height:"}</label>
407 <input type="text" name="pref_etiq_vsize" id="pref_etiq_vsize" value="{$pref.pref_etiq_vsize}" maxlength="4"{if isset($required.pref_etiq_vsize) and $required.pref_etiq_vsize eq 1} required="required"{/if}/> mm
408 <span class="exemple">{_T string="(Integer)"}</span>
409 </p>
410 <p>
411 <label for="pref_etiq_cols" class="bline">{_T string="Number of label columns:"}</label>
412 <input type="text" name="pref_etiq_cols" id="pref_etiq_cols" value="{$pref.pref_etiq_cols}" maxlength="4"{if isset($required.pref_etiq_cols) and $required.pref_etiq_cols eq 1} required="required"{/if}/>
413 <span class="exemple">{_T string="(Integer)"}</span>
414 </p>
415 <p>
416 <label for="pref_etiq_rows" class="bline">{_T string="Number of label lines:"}</label>
417 <input type="text" name="pref_etiq_rows" id="pref_etiq_rows" value="{$pref.pref_etiq_rows}" maxlength="4"{if isset($required.pref_etiq_rows) and $required.pref_etiq_rows eq 1} required="required"{/if}/>
418 </p>
419 <p>
420 <label for="pref_etiq_corps" class="bline">{_T string="Font size:"}</label>
421 <input type="text" name="pref_etiq_corps" id="pref_etiq_corps" value="{$pref.pref_etiq_corps}" maxlength="4"{if isset($required.pref_etiq_corps) and $required.pref_etiq_corps eq 1} required="required"{/if}/>
422 <span class="exemple">{_T string="(Integer)"}</span>
423 </p>
424 </fieldset>
425
426 <fieldset class="cssform" id="cards">
427 <legend>{_T string="Cards generation parameters"}</legend>
428 <p>
429 <label for="pref_card_abrev" class="bline">{_T string="Short Text (Card Center):"}</label>
430 <input type="text" name="pref_card_abrev" id="pref_card_abrev" value="{$pref.pref_card_abrev}" size="10" maxlength="10"{if isset($required.pref_card_abrev) and $required.pref_card_abrev eq 1} required="required"{/if}/>
431
432 <a
433 href="{path_for name="dynamicTranslations" data=["text_orig" => {$pref.pref_card_abrev|escape}]}"
434 class="tooltip"
435 >
436 <i class="fas fa-language"></i>
437 <span class="sr-only">{_T string="Translate '%s'" pattern="/%s/" replace=$pref.pref_card_abrev}</span>
438 </a>
439 <span class="exemple">{_T string="(10 characters max)"}</span>
440 </p>
441 <p>
442 <label for="pref_card_strip" class="bline">{_T string="Long Text (Bottom Line):"}</label>
443 <input type="text" name="pref_card_strip" id="pref_card_strip" value="{$pref.pref_card_strip}" size="40" maxlength="65"{if isset($required.pref_card_strip) and $required.pref_card_strip eq 1} required="required"{/if}/>
444 <a
445 href="{path_for name="dynamicTranslations" data=["text_orig" => {$pref.pref_card_strip|escape}]}"
446 class="tooltip"
447 >
448 <i class="fas fa-language"></i>
449 <span class="sr-only">{_T string="Translate '%s'" pattern="/%s/" replace=$pref.pref_card_strip}</span>
450 </a>
451 <span class="exemple">{_T string="(65 characters max)"}</span>
452 </p>
453 <p>
454 <label for="pref_card_tcol" class="bline tooltip">{_T string="Strip Text Color:"}</label>
455 <span class="tip">{_T string="Hexadecimal color notation: #RRGGBB"}</span>
456 <input type="color" name="pref_card_tcol" id="pref_card_tcol" value="{$pref.pref_card_tcol}" size="7" maxlength="7"{if isset($required.pref_card_tcol) and $required.pref_card_tcol eq 1} required="required"{/if}/>
457 </p>
458 <p>
459 <label for="pref_card_scol" class="bline tooltip">{_T string="Active Member Color:"}</label>
460 <span class="tip">{_T string="Hexadecimal color notation: #RRGGBB"}</span>
461 <input type="color" name="pref_card_scol" id="pref_card_scol" value="{$pref.pref_card_scol}" size="7" maxlength="7"{if isset($required.pref_card_scol) and $required.pref_card_scol eq 1} required="required"{/if}/>
462 </p>
463 <p>
464 <label for="pref_card_bcol" class="bline tooltip">{_T string="Board Members Color:"}</label>
465 <span class="tip">{_T string="Hexadecimal color notation: #RRGGBB"}</span>
466 <input type="color" name="pref_card_bcol" id="pref_card_bcol" value="{$pref.pref_card_bcol}" size="7" maxlength="7"{if isset($required.pref_card_bcol) and $required.pref_card_bcol eq 1} required="required"{/if}/>
467 </p>
468 <p>
469 <label for="pref_card_hcol" class="bline tooltip">{_T string="Honor Members Color:"}</label>
470 <span class="tip">{_T string="Hexadecimal color notation: #RRGGBB"}</span>
471 <input type="color" name="pref_card_hcol" id="pref_card_hcol" value="{$pref.pref_card_hcol}" size="7" maxlength="7"{if isset($required.pref_card_hcol) and $required.pref_card_hcol eq 1} required="required"{/if}/>
472 </p>
473 <p>
474 <label for="card_logo" class="bline"{if isset($required.card_logo) and $required.card_logo eq 1} required="required"{/if}>{_T string="Logo:"}</label>
475 {if $print_logo->isCustom()}
476 <img src="{path_for name="printLogo"}" class="picture" width="{$print_logo->getOptimalWidth()}" height="{$print_logo->getOptimalHeight()}" alt="{_T string="Current logo for printing"}"/><br/>
477 <label for="del_card_logo">{_T string="Delete image"}</label><input type="checkbox" name="del_card_logo" id="del_card_logo" value="1" /><br />
478 {/if}
479 <input type="file" name="card_logo" id="card_logo"{if $GALETTE_MODE eq 'DEMO'} disabled="disabled"{/if}/>
480 </p>
481 <p>
482 <label for="pref_card_self" class="bline">{_T string="Allow members to print card ?"}</label>
483 <input type="checkbox" name="pref_card_self" id="pref_card_self" value="1" {if $pref.pref_card_self eq 1}checked="checked"{/if}{if isset($required.pref_bool_display_title) and $required.pref_bool_display_title eq 1} required="required"{/if}/>
484 <span class="exemple">{_T string="(Members will be able to generate their own member card)"}</span>
485 </p>
486 <p>
487 <label for="pref_bool_display_title" class="bline">{_T string="Show title ?"}</label>
488 <input type="checkbox" name="pref_bool_display_title" id="pref_bool_display_title" value="1" {if $pref.pref_bool_display_title eq 1}checked="checked"{/if}{if isset($required.pref_bool_display_title) and $required.pref_bool_display_title eq 1} required="required"{/if}/>
489 <span class="exemple">{_T string="(Show or not title in front of name)"}</span>
490 </p>
491 <p>
492 <label for="pref_card_address" class="bline">{_T string="Address type:"}</label>
493 <select name="pref_card_address" id="pref_card_address">
494 <option value="0" {if $pref.pref_card_address eq 0}selected="selected"{/if}>{_T string="Email"}</option>
495 <option value="1" {if $pref.pref_card_address eq 1}selected="selected"{/if}>{_T string="MSN"}</option>
496 <option value="2" {if $pref.pref_card_address eq 2}selected="selected"{/if}>{_T string="Jabber"}</option>
497 <option value="3" {if $pref.pref_card_address eq 3}selected="selected"{/if}>{_T string="Web Site"}</option>
498 <option value="4" {if $pref.pref_card_address eq 4}selected="selected"{/if}>{_T string="ICQ"}</option>
499 <option value="5" {if $pref.pref_card_address eq 5}selected="selected"{/if}>{_T string="Zip - Town"}</option>
500 <option value="6" {if $pref.pref_card_address eq 6}selected="selected"{/if}>{_T string="Nickname"}</option>
501 <option value="7" {if $pref.pref_card_address eq 7}selected="selected"{/if}>{_T string="Profession"}</option>
502 </select>
503 <span class="exemple">{_T string="(Choose address printed below name)"}</span>
504 </p>
505 <p>
506 <label for="pref_card_year" class="bline tooltip">{_T string="Year:"}</label>
507 <span class="tip">{_T string="You can enter either:<br/>- a year,<br/>- two years with a slash as separator,<br/>- the string 'DEADLINE' to use member deadline"}</span>
508 <input type="text" name="pref_card_year" id="pref_card_year" value="{$pref.pref_card_year}" maxlength="9"{if isset($required.pref_card_year) and $required.pref_card_year eq 1} required="required"{/if}/>
509 </p>
510 <p class="center">{_T string="Each card is 75mm width and 40mm height. Each page contains 2 columns and 6 rows.<br/>Double check margins and spacings ;)"}</p>
511 <p>
512 <label for="pref_card_marges_v" class="bline">{_T string="Vertical margins:"}</label>
513 <input type="text" name="pref_card_marges_v" id="pref_card_marges_v" value="{$pref.pref_card_marges_v}" maxlength="4"{if isset($required.pref_card_marges_v) and $required.pref_card_marges_v eq 1} required="required"{/if}/> mm
514 <span class="exemple">{_T string="(Integer)"}</span>
515 </p>
516 <p>
517 <label for="pref_card_marges_h" class="bline">{_T string="Horizontal margins:"}</label>
518 <input type="text" name="pref_card_marges_h" id="pref_card_marges_h" value="{$pref.pref_card_marges_h}" maxlength="4"{if isset($required.pref_card_marges_h) and $required.pref_card_marges_h eq 1} required="required"{/if}/> mm
519 <span class="exemple">{_T string="(Integer)"}</span>
520 </p>
521 <p>
522 <label for="pref_card_vspace" class="bline">{_T string="Vertical spacing:"}</label>
523 <input type="text" name="pref_card_vspace" id="pref_card_vspace" value="{$pref.pref_card_vspace}" maxlength="4"{if isset($required.pref_card_vspace) and $required.pref_card_vspace eq 1} required="required"{/if}/> mm
524 <span class="exemple">{_T string="(Integer)"}</span>
525 </p>
526 <p>
527 <label for="pref_card_hspace" class="bline">{_T string="Horizontal spacing:"}</label>
528 <input type="text" name="pref_card_hspace" id="pref_card_hspace" value="{$pref.pref_card_hspace}" maxlength="4"{if isset($required.pref_card_hspace) and $required.pref_card_hspace eq 1} required="required"{/if}/> mm
529 <span class="exemple">{_T string="(Integer)"}</span>
530 </p>
531 </fieldset>
532
533 {if $login->isAdmin()}
534 <fieldset class="cssform" id="security">
535 <legend>{_T string="Security parameters"}</legend>
536 <p>
537 <label for="pref_password_length" class="bline tooltip" title="{_T string="Minimum password length required for all accounts. Minimal size is 6."}">{_T string="Password length:"}</label>
538 <span class="tip">{_T string="Minimum password length required for all accounts. Minimal size is 6."}</span>
539 <input type="number" name="pref_password_length" id="pref_password_length" value="{$pref.pref_password_length}" min="6" size="7" required="required"/>
540 </p>
541 <p>
542 <label for="pref_password_blacklist" class="bline tooltip" title="{_T string="Enable password blacklists"}">{_T string="Enable blacklists:"}</label>
543 <span class="tip">{_T string="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."}</span>
544 <input type="checkbox" name="pref_password_blacklist" id="pref_password_blacklist" value="1"{if $pref.pref_password_blacklist eq 1} checked="checked"{/if}/>
545 </p>
546 <p>
547 <label for="pref_password_strength" class="bline tooltip" title="{_T string="Enforce password strength"}">{_T string="Password strength:"}</label>
548 <span class="tip">
549 {_T string="Enforce minimal password strength for all password."}<br/><br/>
550 {_T string="Levels are:"}<br/>
551 <em>* {_T string="None"}</em> {_T string="for no strength enforcement"}<br/>
552 <em>* {_T string="Weak"}</em> {_T string="require at least one matched rule"}<br/>
553 <em>* {_T string="Medium"}</em> {_T string="require at least two matched rules"}<br/>
554 <em>* {_T string="Strong"}</em> {_T string="require at least three matched rules (recommended for most usages)"}</br/>
555 <em>* {_T string="Very Strong"}</em> {_T string="requires all rules."}<br/><br/>
556 {_T string="Rules include lower case characters, upper case characters, numbers, and special characters."}<br/><br/>
557 {_T string="Note that with any enforcement level, user cannot use his personal information (name, login, ...) as password."}
558 </span>
559 <select name="pref_password_strength" id="pref_password_strength">
560 <option value="{Galette\Core\Preferences::PWD_NONE}"{if $pref.pref_password_strength eq constant('Galette\Core\Preferences::PWD_NONE')} selected="selected"{/if}>{_T string="None (default)"}</option>
561 <option value="{Galette\Core\Preferences::PWD_WEAK}"{if $pref.pref_password_strength eq constant('Galette\Core\Preferences::PWD_WEAK')} selected="selected"{/if}>{_T string="Weak"}</option>
562 <option value="{Galette\Core\Preferences::PWD_MEDIUM}"{if $pref.pref_password_strength eq constant('Galette\Core\Preferences::PWD_MEDIUM')} selected="selected"{/if}>{_T string="Medium"}</option>
563 <option value="{Galette\Core\Preferences::PWD_STRONG}"{if $pref.pref_password_strength eq constant('Galette\Core\Preferences::PWD_STRONG')} selected="selected"{/if}>{_T string="Strong"}</option>
564 <option value="{Galette\Core\Preferences::PWD_VERY_STRONG}"{if $pref.pref_password_strength eq constant('Galette\Core\Preferences::PWD_VERY_STRONG')} selected="selected"{/if}>{_T string="Very strong"}</option>
565 </select>
566 </p>
567 <p>
568 <label for="test_password_strength" class="bline tooltip" title="{_T string="Test a password with current selected values."}">{_T string="Test a password:"}</label>
569 <span class="tip">{_T string="Test a password with current selected values."}<br/>{_T string="Do not forget to save your preferences if you're happy with the result ;)"}</span>
570 <input type="text" id="test_password_strength"/>
571 </p>
572 </fieldset>
573 {/if}
574
575 {if $login->isSuperAdmin()}
576 <fieldset class="cssform" id="admin">
577 <legend>{_T string="Admin account (independant of members)"}</legend>
578 {if $GALETTE_MODE eq 'DEMO'}
579 <div>{_T string="Application runs under demo mode. This functionnality is not enabled, sorry."}</div>
580 {else}
581 <p>
582 <label for="pref_admin_login" class="bline">{_T string="Username:"}</label>
583 <input type="text" name="pref_admin_login" id="pref_admin_login" value="{$pref.pref_admin_login}" maxlength="20"{if isset($required.pref_admin_login) and $required.pref_admin_login eq 1} required="required"{/if}/>
584 </p>
585 <p>
586 <label for="pref_admin_pass" class="bline">{_T string="Password:"}</label>
587 <input type="password" name="pref_admin_pass" id="pref_admin_pass" value="" maxlength="20" autocomplete="off"{if isset($required.pref_admin_pass) and $required.pref_admin_pass eq 1} required="required"{/if}/>
588 </p>
589 <p>
590 <label for="pref_admin_pass_check" class="bline">{_T string="Retype password:"}</label>
591 <input type="password" name="pref_admin_pass_check" id="pref_admin_pass_check" value="" maxlength="20"{if isset($required.pref_admin_pass_check) and $required.pref_admin_pass_check eq 1} required="required"{/if}/>
592 </p>
593 {/if}
594 </fieldset>
595 {/if}
596 </div>
597 <div class="button-container">
598 <input type="hidden" name="valid" value="1"/>
599 <input type="hidden" name="pref_theme" value="default"/>
600 <input type="hidden" name="pref_telemetry_date" value="{$pref.pref_telemetry_date}"/>
601 <input type="hidden" name="pref_instance_uuid" value="{$pref.pref_instance_uuid}"/>
602 <input type="hidden" name="pref_registration_date" value="{$pref.pref_registration_date}"/>
603 <input type="hidden" name="pref_registration_uuid" value="{$pref.pref_registration_uuid}"/>
604 <button type="submit" class="action">
605 <i class="fas fa-save fa-fw"></i> {_T string="Save"}
606 </button>
607 </div>
608 <p>{_T string="NB : The mandatory fields are in"} <span class="required">{_T string="red"}</span></p>
609 </form>
610
611 {include file="telemetry.tpl" part="dialog"}
612 {/block}
613
614 {block name="javascripts"}
615 <script type="text/javascript">
616 $('#prefs_tabs').tabs();
617
618 $('#no,#php,#qmail').click(function(){
619 $('#smtp_parameters,#smtp_auth').hide();
620 });
621 $('#smtp,#gmail').click(function(){
622 $('#smtp_parameters,#smtp_auth').show();
623 });
624 $('#gmail').click(function(){
625 $('#smtp_parameters').hide();
626 $('#smtp_auth').show();
627 });
628
629
630 $(function(){
631 $('#pref_bool_publicpages').change(function(){
632 $('#publicpages_visibility').toggleClass('hidden');
633 });
634
635 $('#btnmail').on('click', function(e) {
636 e.preventDefault();
637 var _this = $(this);
638 var _value = $('#pref_email_newadh').val();
639 $('body').append('<div id="testEmail" title="{_T string="Test email settings" escape="js"}"><label for="email_adress">{_T string="Enter the email adress" escape="js"}</label><input type="text" name="email_adress" id="email_adress" value="' + _value + '"/></div>');
640 $('#testEmail').dialog({
641 'modal': true,
642 'hide': 'fold',
643 'width': '20em',
644 create: function (event, ui) {
645 if ($(window ).width() < 767) {
646 $(this).dialog('option', {
647 'width': '95%',
648 'draggable': false
649 });
650 }
651 },
652 close: function(event, ui) {
653 $('#testEmail').remove();
654 },
655 buttons: {
656 "{_T string="Send" escape="js"}": function() {
657 $.ajax({
658 url: _this.attr('href'),
659 type: 'GET',
660 data: {
661 adress: $('#email_adress').val()
662 },
663 {include file="js_loader.tpl"},
664 success: function(res) {
665 console.log(res);
666 //display message
667 $.ajax({
668 url: '{path_for name="ajaxMessages"}',
669 method: "GET",
670 success: function (message) {
671 $('#testEmail').prepend(message);
672 }
673 });
674 },
675 error: function () {
676 alert('{_T string="An error occurred sending test email :(" escape="js"}');
677 }
678 });
679 }
680 }
681 });
682 });
683
684 {include file="js_pwdcheck.tpl" selector="#pref_admin_pass"}
685 {include file="js_pwdcheck.tpl" selector="#test_password_strength" extra_data="pref_password_length: \$('#pref_password_length').val(),pref_password_blacklist: \$('#pref_password_blacklist').is(':checked'),pref_password_strength: \$('#pref_password_strength').val(),"}
686
687 {include file="telemetry.tpl" part="jsdialog"}
688 {include file="telemetry.tpl" part="jsregister"}
689
690 });
691 </script>
692 {/block}