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" >
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 {{$blockwall nofilter}}
94 {{$blocktags nofilter}}
96 {{$suggestme nofilter}}
100 {{include file="field_input.tpl" field=$cntunkmail}}
102 {{include file="field_input.tpl" field=$expire.days}}
104 <div id="settings-advanced-expire">
105 <a id="advanced-expire-menu" title="{{$expire.advanced}}" data-toggle="modal" data-target="#aeModal">{{$expire.label}}</a>
107 {{* The modal for advanced-expire *}}
108 <div class="modal" id="aeModal">
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">{{$expire.advanced}}</h4>
115 <div class="modal-body">
116 {{include file="field_yesno.tpl" field=$expire.items}}
117 {{include file="field_yesno.tpl" field=$expire.notes}}
118 {{include file="field_yesno.tpl" field=$expire.starred}}
119 {{include file="field_yesno.tpl" field=$expire.network_only}}
126 {{* Block for setting default permissions *}}
127 <div id="settings-default-perms" class="settings-default-perms">
128 <a id="settings-default-perms-menu" class="settings-default-perms" data-toggle="modal" data-target="#aclModal">{{$permissions}} {{$permdesc}}</a>
129 <div id="settings-default-perms-menu-end"></div>
131 {{* We include the aclModal directly into the template since we cant use frio's default modal *}}
132 <div class="modal" id="aclModal">
133 <div class="modal-dialog">
134 <div class="modal-content">
135 <div class="modal-header">
136 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
137 <h4 class="modal-title">{{$permissions}}</h4>
139 <div class="modal-body">
140 {{$aclselect nofilter}}
147 <div class="clear"></div>
149 {{$group_select nofilter}}
151 <div class="form-group pull-right settings-submit-wrapper" >
152 <button type="submit" name="submit" class="btn btn-primary" value="{{$submit}}">{{$submit}}</button>
154 <div class="clear"></div>
159 {{* The notification setting section *}}
161 <div class="section-subtitle-wrapper" role="tab" id="notification-settings">
163 <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#notification-settings-collapse" aria-expanded="false" aria-controls="notification-settings-collapse">
168 <div id="notification-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="notification-settings">
169 <div class="section-content-tools-wrapper">
170 <div id="settings-notifications">
172 <div id="settings-notify-desc"><h4>{{$lbl_not}}</h4></div>
175 {{include file="field_intcheckbox.tpl" field=$notify1}}
176 {{include file="field_intcheckbox.tpl" field=$notify2}}
177 {{include file="field_intcheckbox.tpl" field=$notify3}}
178 {{include file="field_intcheckbox.tpl" field=$notify4}}
179 {{include file="field_intcheckbox.tpl" field=$notify5}}
180 {{include file="field_intcheckbox.tpl" field=$notify6}}
181 {{include file="field_intcheckbox.tpl" field=$notify7}}
182 {{include file="field_intcheckbox.tpl" field=$notify8}}
185 {{include file="field_checkbox.tpl" field=$email_textonly}}
186 {{include file="field_checkbox.tpl" field=$detailed_notif}}
188 {{* commented out because it was commented out in the original template
190 <button type="button" onclick="javascript:Notification.requestPermission(function(perm){if(perm === 'granted')alert('{{$desktop_notifications_success_message}}');});">{{$desktop_notifications}}</button>
191 <span class="field_help">{{$desktop_notifications_note}}</span>
195 {{include file="field_yesno.tpl" field=$desktop_notifications}}
196 <script type="text/javascript">
198 var elm = $("#id_{{$desktop_notifications.0}}_onoff");
199 var ckbox = $("#id_{{$desktop_notifications.0}}");
201 if (getNotificationPermission() === 'granted') {
203 elm.find(".off").addClass("hidden");
204 elm.find(".on").removeClass("hidden");
206 if (getNotificationPermission() === null) {
207 elm.parent(".field.yesno").hide();
210 $("#id_{{$desktop_notifications.0}}_onoff").on("click", function(e){
212 if (Notification.permission === 'granted') {
213 localStorage.setItem('notification-permissions', ckbox.val()==1 ? 'granted' : 'denied');
214 } else if (Notification.permission === 'denied') {
215 localStorage.setItem('notification-permissions', 'denied');
218 elm.find(".on").addClass("hidden");
219 elm.find(".off").removeClass("hidden");
221 } else if (Notification.permission === 'default') {
222 Notification.requestPermission(function(choice) {
223 if (choice === 'granted') {
224 localStorage.setItem('notification-permissions', ckbox.val()==1 ? 'granted' : 'denied');
227 localStorage.setItem('notification-permissions', 'denied');
229 elm.find(".on").addClass("hidden");
230 elm.find(".off").removeClass("hidden");
235 //console.log(getNotificationPermission());
241 <div class="form-group pull-right settings-submit-wrapper" >
242 <button type="submit" name="submit" class="btn btn-primary" value="{{$submit}}">{{$submit}}</button>
244 <div class="clear"></div>
249 {{* The additional account setting section *}}
251 <div class="section-subtitle-wrapper" role="tab" id="additional-account-settings">
253 <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">
258 <div id="additional-account-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="additional-account-settings">
259 <div class="section-content-tools-wrapper">
261 <div id="settings-pagetype-desc">{{$h_descadvn}}</div>
263 {{$pagetype nofilter}}
265 <div class="form-group pull-right settings-submit-wrapper" >
266 <button type="submit" name="submit" class="btn btn-primary" value="{{$submit}}">{{$submit}}</button>
268 <div class="clear"></div>
273 {{* Import contacts CSV *}}
275 <div class="section-subtitle-wrapper" role="tab" id="importcontact-settings">
277 <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#importcontact-settings-collapse" aria-expanded="false" aria-controls="importcontact-settings-collapse">
282 <div id="importcontact-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="importcontact-settings">
283 <div class="section-content-tools-wrapper">
285 <div id="importcontact-relocate-desc">{{$importcontact_text}}</div>
286 <input type="hidden" name="MAX_FILE_SIZE" value="30720" />
287 <input type="file" name="importcontact-filename" />
290 <div class="form-group pull-right settings-submit-wrapper" >
291 <button type="submit" name="importcontact-submit" class="btn btn-primary" value="{{$importcontact_button}}">{{$importcontact_button}}</button>
293 <div class="clear"></div>
298 {{* The relocate setting section *}}
300 <div class="section-subtitle-wrapper" role="tab" id="relocate-settings">
302 <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#settings" href="#relocate-settings-collapse" aria-expanded="false" aria-controls="relocate-settings-collapse">
307 <div id="relocate-settings-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="relocate-settings">
308 <div class="section-content-tools-wrapper">
310 <div id="settings-relocate-desc">{{$relocate_text}}</div>
313 <div class="form-group pull-right settings-submit-wrapper" >
314 <button type="submit" name="resend_relocate" class="btn btn-primary" value="{{$relocate_button}}">{{$relocate_button}}</button>
316 <div class="clear"></div>