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