]> git.mxchange.org Git - friendica.git/blob - view/templates/settings/settings.tpl
More rework to make private communities working
[friendica.git] / view / templates / settings / settings.tpl
1 <h1>{{$ptitle}}</h1>
2
3 {{$nickname_block nofilter}}
4
5 <form action="settings" id="settings-form" method="post" autocomplete="off" enctype="multipart/form-data">
6         <input type="hidden" name="form_security_token" value="{{$form_security_token}}">
7
8         <h2 class="settings-heading"><a href="javascript:;">{{$h_pass}}</a></h2>
9         <div class="settings-content-block">
10                 {{include file="field_password.tpl" field=$password1}}
11                 {{include file="field_password.tpl" field=$password2}}
12                 {{include file="field_password.tpl" field=$password3}}
13
14                 {{if $oid_enable}}
15                         {{include file="field_input.tpl" field=$openid}}
16                 {{/if}}
17
18                 <div class="settings-submit-wrapper">
19                         <input type="submit" name="submit" class="settings-submit" value="{{$submit}}"/>
20                 </div>
21         </div>
22
23         <h2 class="settings-heading"><a href="javascript:;">{{$h_basic}}</a></h2>
24         <div class="settings-content-block">
25
26                 {{include file="field_input.tpl" field=$username}}
27                 {{include file="field_input.tpl" field=$email}}
28                 {{include file="field_password.tpl" field=$password4}}
29                 {{include file="field_custom.tpl" field=$timezone}}
30                 {{include file="field_select.tpl" field=$language}}
31                 {{include file="field_input.tpl" field=$defloc}}
32                 {{include file="field_checkbox.tpl" field=$allowloc}}
33
34
35                 <div class="settings-submit-wrapper">
36                         <input type="submit" name="submit" class="settings-submit" value="{{$submit}}"/>
37                 </div>
38         </div>
39
40         <h2 class="settings-heading"><a href="javascript:;">{{$h_prv}}</a></h2>
41         <div class="settings-content-block">
42                 {{include file="field_input.tpl" field=$maxreq}}
43
44                 {{$profile_in_dir nofilter}}
45
46                 {{include file="field_checkbox.tpl" field=$profile_in_net_dir}}
47                 {{if not $is_community}}{{include file="field_checkbox.tpl" field=$hide_friends}}{{/if}}
48                 {{include file="field_checkbox.tpl" field=$hide_wall}}
49                 {{if not $is_community}}{{include file="field_checkbox.tpl" field=$unlisted}}{{/if}}
50                 {{include file="field_checkbox.tpl" field=$accessiblephotos}}
51                 {{if not $is_community}}
52                 {{include file="field_checkbox.tpl" field=$blockwall}}
53                 {{include file="field_checkbox.tpl" field=$blocktags}}
54                 {{/if}}
55                 {{include file="field_checkbox.tpl" field=$unkmail}}
56                 {{include file="field_input.tpl" field=$cntunkmail}}
57
58                 {{$group_select nofilter}}
59                 {{if not $is_community}}
60                 <h3>{{$permissions}}</h3>
61
62                 {{$aclselect nofilter}}
63                 {{/if}}
64                 <div class="settings-submit-wrapper">
65                         <input type="submit" name="submit" class="settings-submit" value="{{$submit}}"/>
66                 </div>
67         </div>
68
69         <h2 class="settings-heading"><a href="javascript:;">{{$expire.label}}</a></h2>
70         <div class="settings-content-block">
71                 <div id="settings-expiry">
72                         {{include file="field_input.tpl" field=$expire.days}}
73                         {{include file="field_checkbox.tpl" field=$expire.items}}
74                         {{include file="field_checkbox.tpl" field=$expire.notes}}
75                         {{include file="field_checkbox.tpl" field=$expire.starred}}
76                         {{include file="field_checkbox.tpl" field=$expire.network_only}}
77
78                         <div class="settings-submit-wrapper">
79                                 <input type="submit" name="submit" class="settings-submit" value="{{$submit}}"/>
80                         </div>
81                 </div>
82         </div>
83
84         <h2 class="settings-heading"><a href="javascript:;">{{$h_not}}</a></h2>
85         <div class="settings-content-block">
86                 <div id="settings-notifications">
87
88                         <div id="settings-notification-desc">{{$lbl_not}}</div>
89
90                         <div class="group">
91                                 {{include file="field_intcheckbox.tpl" field=$notify1}}
92                                 {{include file="field_intcheckbox.tpl" field=$notify2}}
93                                 {{include file="field_intcheckbox.tpl" field=$notify3}}
94                                 {{include file="field_intcheckbox.tpl" field=$notify4}}
95                                 {{include file="field_intcheckbox.tpl" field=$notify5}}
96                                 {{include file="field_intcheckbox.tpl" field=$notify6}}
97                                 {{include file="field_intcheckbox.tpl" field=$notify7}}
98                                 {{include file="field_intcheckbox.tpl" field=$notify8}}
99                         </div>
100
101                         <div id="settings-notify-desc">{{$lbl_notify}}</div>
102
103                         <div class="group">
104                                 {{include file="field_checkbox.tpl" field=$notify_like}}
105                                 {{include file="field_checkbox.tpl" field=$notify_announce}}
106                         </div>
107
108                         {{include file="field_checkbox.tpl" field=$email_textonly}}
109                         {{include file="field_checkbox.tpl" field=$detailed_notif}}
110
111                         {{include file="field_checkbox.tpl" field=$notify_ignored}}
112
113                         {{include file="field_checkbox.tpl" field=$desktop_notifications}}
114                         <script>
115                                 (function () {
116                                         let $notificationField = $("#div_id_{{$desktop_notifications.0}}");
117                                         let $notificationCheckbox = $("#id_{{$desktop_notifications.0}}");
118
119                                         if (getNotificationPermission() === 'granted') {
120                                                 $notificationCheckbox.prop('checked', true);
121                                         }
122                                         if (getNotificationPermission() === null) {
123                                                 $notificationField.hide();
124                                         }
125
126                                         $notificationCheckbox.on('change', function (e) {
127                                                 if (Notification.permission === 'granted') {
128                                                         localStorage.setItem('notification-permissions', $notificationCheckbox.prop('checked') ? 'granted' : 'denied');
129                                                 } else if (Notification.permission === 'denied') {
130                                                         localStorage.setItem('notification-permissions', 'denied');
131
132                                                         $notificationCheckbox.prop('checked', false);
133                                                 } else if (Notification.permission === 'default') {
134                                                         Notification.requestPermission(function (choice) {
135                                                                 if (choice === 'granted') {
136                                                                         localStorage.setItem('notification-permissions', $notificationCheckbox.prop('checked') ? 'granted' : 'denied');
137                                                                 } else {
138                                                                         localStorage.setItem('notification-permissions', 'denied');
139                                                                         $notificationCheckbox.prop('checked', false);
140                                                                 }
141                                                         });
142                                                 }
143                                         })
144                                 })();
145                         </script>
146
147                 </div>
148
149                 <div class="settings-submit-wrapper">
150                         <input type="submit" name="submit" class="settings-submit" value="{{$submit}}"/>
151                 </div>
152         </div>
153
154         <h2 class="settings-heading"><a href="javascript:;">{{$h_advn}}</a></h2>
155         <div class="settings-content-block">
156                 <div id="settings-pagetype-desc">{{$h_descadvn}}</div>
157
158                 {{$pagetype nofilter}}
159
160                 <div class="settings-submit-wrapper">
161                         <input type="submit" name="submit" class="settings-submit" value="{{$submit}}"/>
162                 </div>
163         </div>
164
165         <h2 class="settings-heading"><a href="javascript:;">{{$importcontact}}</a></h2>
166         <div class="settings-content-block">
167                 <input type="hidden" name="MAX_FILE_SIZE" value="{{$importcontact_maxsize}}"/>
168                 <div id="settings-pagetype-desc">{{$importcontact_text}}</div>
169                 <input type="file" name="importcontact-filename"/>
170
171                 <div class="settings-submit-wrapper">
172                         <input type="submit" name="importcontact-submit" class="importcontact-submit" value="{{$importcontact_button}}"/>
173                 </div>
174         </div>
175
176         <h2 class="settings-heading"><a href="javascript:;">{{$relocate}}</a></h2>
177         <div class="settings-content-block">
178                 <div id="settings-pagetype-desc">{{$relocate_text}}</div>
179
180                 <div class="settings-submit-wrapper">
181                         <input type="submit" name="resend_relocate" class="settings-submit" value="{{$relocate_button}}"/>
182                 </div>
183         </div>