1 <div class="generic-page-wrapper">
2 {{* include the title template for the settings title *}}
3 {{include file="section_title.tpl" title=$ptitle }}
5 {{$nickname_block nofilter}}
7 <form action="settings" id="settings-form" method="post" autocomplete="off" enctype="multipart/form-data">
8 <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
10 {{* We organize the settings in collapsable panel-groups *}}
11 <div class="panel-group panel-group-settings" id="settings" role="tablist" aria-multiselectable="true">
12 {{* The password setting section *}}
14 <div class="section-subtitle-wrapper" role="tab" id="password-settings">
16 <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#password-settings-collapse" aria-expanded="false" aria-controls="password-settings-collapse">
21 <div id="password-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="password-settings">
22 <div class="section-content-tools-wrapper">
23 {{include file="field_password.tpl" field=$password1}}
24 {{include file="field_password.tpl" field=$password2}}
25 {{include file="field_password.tpl" field=$password3}}
28 {{include file="field_input.tpl" field=$openid}}
29 {{include file="field_checkbox.tpl" field=$delete_openid}}
32 <div class="form-group pull-right settings-submit-wrapper" >
33 <button type="submit" name="submit" class="btn btn-primary" value="{{$submit}}">{{$submit}}</button>
35 <div class="clear"></div>
40 {{* The basic setting section *}}
42 <div class="section-subtitle-wrapper" role="tab" id="basic-settings">
44 <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#basic-settings-collapse" aria-expanded="false" aria-controls="basic-settings-collapse">
49 <div id="basic-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="basic-settings">
50 <div class="section-content-tools-wrapper">
52 {{include file="field_input.tpl" field=$username}}
53 {{include file="field_input.tpl" field=$email}}
54 {{include file="field_password.tpl" field=$password4}}
55 {{include file="field_custom.tpl" field=$timezone}}
56 {{include file="field_select.tpl" field=$language}}
57 {{include file="field_input.tpl" field=$defloc}}
58 {{include file="field_checkbox.tpl" field=$allowloc}}
60 <div class="form-group pull-right settings-submit-wrapper" >
61 <button type="submit" name="submit" class="btn btn-primary" value="{{$submit}}">{{$submit}}</button>
63 <div class="clear"></div>
68 {{* The privacity setting section *}}
70 <div class="section-subtitle-wrapper" role="tab" id="privacy-settings">
72 <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#privacy-settings-collapse" aria-expanded="false" aria-controls="privacy-settings-collapse">
77 <div id="privacy-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="privacy-settings">
78 <div class="section-content-tools-wrapper">
80 <input type="hidden" name="visibility" value="{{$visibility}}" />
82 {{include file="field_input.tpl" field=$maxreq}}
84 {{$profile_in_dir nofilter}}
86 {{$profile_in_net_dir nofilter}}
88 {{$hide_friends nofilter}}
90 {{$hide_wall nofilter}}
92 {{$unlisted nofilter}}
94 {{$blockwall nofilter}}
96 {{$blocktags nofilter}}
100 {{include file="field_input.tpl" field=$cntunkmail}}
102 {{* Block for setting default permissions *}}
103 <div id="settings-default-perms" class="settings-default-perms">
104 <a id="settings-default-perms-menu" class="settings-default-perms" data-toggle="modal" data-target="#aclModal">{{$permissions}} {{$permdesc}}</a>
105 <div id="settings-default-perms-menu-end"></div>
107 {{* We include the aclModal directly into the template since we cant use frio's default modal *}}
108 <div class="modal" id="aclModal">
109 <div class="modal-dialog">
110 <div class="modal-content">
111 <div class="modal-header">
112 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
113 <h4 class="modal-title">{{$permissions}}</h4>
115 <div class="modal-body">
116 {{$aclselect nofilter}}
124 {{$group_select nofilter}}
126 <div class="form-group pull-right settings-submit-wrapper" >
127 <button type="submit" name="submit" class="btn btn-primary" value="{{$submit}}">{{$submit}}</button>
129 <div class="clear"></div>
136 <div class="section-subtitle-wrapper" role="tab" id="expire-settings">
138 <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#expire-settings-collapse" aria-expanded="false" aria-controls="expire-settings-collapse">
143 <div id="expire-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="expire-settings">
144 <div class="section-content-tools-wrapper">
146 {{include file="field_input.tpl" field=$expire.days}}
148 {{include file="field_checkbox.tpl" field=$expire.items}}
149 {{include file="field_checkbox.tpl" field=$expire.notes}}
150 {{include file="field_checkbox.tpl" field=$expire.starred}}
151 {{include file="field_checkbox.tpl" field=$expire.network_only}}
153 <div class="form-group pull-right settings-submit-wrapper" >
154 <button type="submit" name="submit" class="btn btn-primary" value="{{$submit}}">{{$submit}}</button>
156 <div class="clear"></div>
161 {{* The notification setting section *}}
163 <div class="section-subtitle-wrapper" role="tab" id="notification-settings">
165 <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#notification-settings-collapse" aria-expanded="false" aria-controls="notification-settings-collapse">
170 <div id="notification-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="notification-settings">
171 <div class="section-content-tools-wrapper">
172 <div id="settings-notifications">
174 <div id="settings-notification-desc"><h4>{{$lbl_not}}</h4></div>
177 {{include file="field_intcheckbox.tpl" field=$notify1}}
178 {{include file="field_intcheckbox.tpl" field=$notify2}}
179 {{include file="field_intcheckbox.tpl" field=$notify3}}
180 {{include file="field_intcheckbox.tpl" field=$notify4}}
181 {{include file="field_intcheckbox.tpl" field=$notify5}}
182 {{include file="field_intcheckbox.tpl" field=$notify6}}
183 {{include file="field_intcheckbox.tpl" field=$notify7}}
184 {{include file="field_intcheckbox.tpl" field=$notify8}}
187 {{include file="field_checkbox.tpl" field=$email_textonly}}
188 {{include file="field_checkbox.tpl" field=$detailed_notif}}
190 {{* commented out because it was commented out in the original template
192 <button type="button" onclick="javascript:Notification.requestPermission(function(perm){if(perm === 'granted')alert('{{$desktop_notifications_success_message}}');});">{{$desktop_notifications}}</button>
193 <span class="field_help">{{$desktop_notifications_note}}</span>
197 {{include file="field_checkbox.tpl" field=$desktop_notifications}}
198 <script type="text/javascript">
200 let $notificationField = $("#div_id_{{$desktop_notifications.0}}");
201 let $notificationCheckbox = $("#id_{{$desktop_notifications.0}}");
203 if (getNotificationPermission() === 'granted') {
204 $notificationCheckbox.prop('checked', true);
206 if (getNotificationPermission() === null) {
207 $notificationField.hide();
210 $notificationCheckbox.on('change', function(e){
211 if (Notification.permission === 'granted') {
212 localStorage.setItem('notification-permissions', $notificationCheckbox.prop('checked') ? 'granted' : 'denied');
213 } else if (Notification.permission === 'denied') {
214 localStorage.setItem('notification-permissions', 'denied');
216 $notificationCheckbox.prop('checked', false);
217 } else if (Notification.permission === 'default') {
218 Notification.requestPermission(function(choice) {
219 if (choice === 'granted') {
220 localStorage.setItem('notification-permissions', $notificationCheckbox.prop('checked') ? 'granted' : 'denied');
222 localStorage.setItem('notification-permissions', 'denied');
223 $notificationCheckbox.prop('checked', false);
232 <div class="form-group pull-right settings-submit-wrapper" >
233 <button type="submit" name="submit" class="btn btn-primary" value="{{$submit}}">{{$submit}}</button>
235 <div class="clear"></div>
240 {{* The additional account setting section *}}
242 <div class="section-subtitle-wrapper" role="tab" id="additional-account-settings">
244 <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#additional-account-settings-collapse" aria-expanded="false" aria-controls="additional-account-settings-collapse">
249 <div id="additional-account-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="additional-account-settings">
250 <div class="section-content-tools-wrapper">
252 <div id="settings-pagetype-desc">{{$h_descadvn}}</div>
254 {{$pagetype nofilter}}
256 <div class="form-group pull-right settings-submit-wrapper" >
257 <button type="submit" name="submit" class="btn btn-primary" value="{{$submit}}">{{$submit}}</button>
259 <div class="clear"></div>
264 {{* Import contacts CSV *}}
266 <div class="section-subtitle-wrapper" role="tab" id="importcontact-settings">
268 <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#importcontact-settings-collapse" aria-expanded="false" aria-controls="importcontact-settings-collapse">
273 <div id="importcontact-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="importcontact-settings">
274 <div class="section-content-tools-wrapper">
276 <div id="importcontact-relocate-desc">{{$importcontact_text}}</div>
277 <input type="hidden" name="MAX_FILE_SIZE" value="{{$importcontact_maxsize}}" />
278 <input type="file" name="importcontact-filename" />
281 <div class="form-group pull-right settings-submit-wrapper" >
282 <button type="submit" name="importcontact-submit" class="btn btn-primary" value="{{$importcontact_button}}">{{$importcontact_button}}</button>
284 <div class="clear"></div>
289 {{* The relocate setting section *}}
291 <div class="section-subtitle-wrapper" role="tab" id="relocate-settings">
293 <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#relocate-settings-collapse" aria-expanded="false" aria-controls="relocate-settings-collapse">
298 <div id="relocate-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="relocate-settings">
299 <div class="section-content-tools-wrapper">
301 <div id="settings-relocate-desc">{{$relocate_text}}</div>
304 <div class="form-group pull-right settings-submit-wrapper" >
305 <button type="submit" name="resend_relocate" class="btn btn-primary" value="{{$relocate_button}}">{{$relocate_button}}</button>
307 <div class="clear"></div>