Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

222 lines
6.7 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. <h1>{{$ptitle}}</h1>
  2. {{$nickname_block}}
  3. <form action="settings" id="settings-form" method="post" autocomplete="off" >
  4. <input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
  5. <h3 class="settings-heading"><a href="javascript:;">{{$h_pass}}</a></h3>
  6. <div class="settings-content-block">
  7. {{include file="field_password.tpl" field=$password1}}
  8. {{include file="field_password.tpl" field=$password2}}
  9. {{include file="field_password.tpl" field=$password3}}
  10. {{if $oid_enable}}
  11. {{include file="field_input.tpl" field=$openid}}
  12. {{/if}}
  13. <div class="settings-submit-wrapper" >
  14. <input type="submit" name="submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
  15. </div>
  16. </div>
  17. <h3 class="settings-heading"><a href="javascript:;">{{$h_basic}}</a></h3>
  18. <div class="settings-content-block">
  19. {{include file="field_input.tpl" field=$username}}
  20. {{include file="field_input.tpl" field=$email}}
  21. {{include file="field_password.tpl" field=$password4}}
  22. {{include file="field_custom.tpl" field=$timezone}}
  23. {{include file="field_select.tpl" field=$language}}
  24. {{include file="field_input.tpl" field=$defloc}}
  25. {{include file="field_checkbox.tpl" field=$allowloc}}
  26. <div class="settings-submit-wrapper" >
  27. <input type="submit" name="submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
  28. </div>
  29. </div>
  30. <h3 class="settings-heading"><a href="javascript:;">{{$h_prv}}</a></h3>
  31. <div class="settings-content-block">
  32. <input type="hidden" name="visibility" value="{{$visibility}}" />
  33. {{include file="field_input.tpl" field=$maxreq}}
  34. {{$profile_in_dir}}
  35. {{$profile_in_net_dir}}
  36. {{$hide_friends}}
  37. {{$hide_wall}}
  38. {{$blockwall}}
  39. {{$blocktags}}
  40. {{$suggestme}}
  41. {{$unkmail}}
  42. {{include file="field_input.tpl" field=$cntunkmail}}
  43. {{include file="field_input.tpl" field=$expire.days}}
  44. <div class="field input">
  45. <span class="field_help"><a href="#advanced-expire-popup" id="advanced-expire" class='popupbox' title="{{$expire.advanced}}">{{$expire.label}}</a></span>
  46. <div style="display: none;">
  47. <div id="advanced-expire-popup" style="width:auto;height:auto;overflow:auto;">
  48. <h3>{{$expire.advanced}}</h3>
  49. {{include file="field_yesno.tpl" field=$expire.items}}
  50. {{include file="field_yesno.tpl" field=$expire.notes}}
  51. {{include file="field_yesno.tpl" field=$expire.starred}}
  52. {{include file="field_yesno.tpl" field=$expire.network_only}}
  53. </div>
  54. </div>
  55. </div>
  56. <div id="settings-default-perms" class="settings-default-perms" >
  57. <a href="#profile-jot-acl-wrapper" id="settings-default-perms-menu" class='popupbox'>{{$permissions}} {{$permdesc}}</a>
  58. <div id="settings-default-perms-menu-end"></div>
  59. <div id="settings-default-perms-select" style="display: none; margin-bottom: 20px" >
  60. <div style="display: none;">
  61. <div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;">
  62. {{$aclselect}}
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. <br/>
  68. <div id="settings-default-perms-end"></div>
  69. {{$group_select}}
  70. <div class="settings-submit-wrapper" >
  71. <input type="submit" name="submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
  72. </div>
  73. </div>
  74. <h3 class="settings-heading"><a href="javascript:;">{{$h_not}}</a></h3>
  75. <div class="settings-content-block">
  76. <div id="settings-notifications">
  77. <div id="settings-activity-desc">{{$activity_options}}</div>
  78. {{include file="field_checkbox.tpl" field=$post_newfriend}}
  79. {{include file="field_checkbox.tpl" field=$post_joingroup}}
  80. {{include file="field_checkbox.tpl" field=$post_profilechange}}
  81. <div id="settings-notify-desc">{{$lbl_not}}</div>
  82. <div class="group">
  83. {{include file="field_intcheckbox.tpl" field=$notify1}}
  84. {{include file="field_intcheckbox.tpl" field=$notify2}}
  85. {{include file="field_intcheckbox.tpl" field=$notify3}}
  86. {{include file="field_intcheckbox.tpl" field=$notify4}}
  87. {{include file="field_intcheckbox.tpl" field=$notify5}}
  88. {{include file="field_intcheckbox.tpl" field=$notify6}}
  89. {{include file="field_intcheckbox.tpl" field=$notify7}}
  90. {{include file="field_intcheckbox.tpl" field=$notify8}}
  91. </div>
  92. {{include file="field_checkbox.tpl" field=$email_textonly}}
  93. <!--
  94. <div class="field">
  95. <button onclick="javascript:Notification.requestPermission(function(perm){if(perm === 'granted')alert('{{$desktop_notifications_success_message}}');});return false;">{{$desktop_notifications}}</button>
  96. <span class="field_help">{{$desktop_notifications_note}}</span>
  97. </div>
  98. -->
  99. {{include file="field_yesno.tpl" field=$desktop_notifications}}
  100. <script>
  101. (function(){
  102. var elm = $("#id_{{$desktop_notifications.0}}_onoff");
  103. var ckbox = $("#id_{{$desktop_notifications.0}}");
  104. if (getNotificationPermission() === 'granted') {
  105. ckbox.val(1);
  106. elm.find(".off").addClass("hidden");
  107. elm.find(".on").removeClass("hidden");
  108. }
  109. if (getNotificationPermission() === null) {
  110. elm.parent(".field.yesno").hide();
  111. }
  112. $("#id_{{$desktop_notifications.0}}_onoff").on("click", function(e){
  113. if (Notification.permission === 'granted') {
  114. localStorage.setItem('notification-permissions', ckbox.val()==1 ? 'granted' : 'denied');
  115. } else if (Notification.permission === 'denied') {
  116. localStorage.setItem('notification-permissions', 'denied');
  117. ckbox.val(0);
  118. elm.find(".on").addClass("hidden");
  119. elm.find(".off").removeClass("hidden");
  120. } else if (Notification.permission === 'default') {
  121. Notification.requestPermission(function(choice) {
  122. if (choice === 'granted') {
  123. localStorage.setItem('notification-permissions', ckbox.val()==1 ? 'granted' : 'denied');
  124. } else {
  125. localStorage.setItem('notification-permissions', 'denied');
  126. ckbox.val(0);
  127. elm.find(".on").addClass("hidden");
  128. elm.find(".off").removeClass("hidden");
  129. }
  130. });
  131. }
  132. //console.log(getNotificationPermission());
  133. })
  134. })();
  135. </script>
  136. </div>
  137. <div class="settings-submit-wrapper" >
  138. <input type="submit" name="submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
  139. </div>
  140. </div>
  141. <h3 class="settings-heading"><a href="javascript:;">{{$h_advn}}</a></h3>
  142. <div class="settings-content-block">
  143. <div id="settings-pagetype-desc">{{$h_descadvn}}</div>
  144. {{$pagetype}}
  145. <div class="settings-submit-wrapper" >
  146. <input type="submit" name="submit" class="settings-submit" value="{{$submit|escape:'html'}}" />
  147. </div>
  148. </div>
  149. <h3 class="settings-heading"><a href="javascript:;">{{$relocate}}</a></h3>
  150. <div class="settings-content-block">
  151. <div id="settings-pagetype-desc">{{$relocate_text}}</div>
  152. <div class="settings-submit-wrapper" >
  153. <input type="submit" name="resend_relocate" class="settings-submit" value="{{$relocate_button|escape:'html'}}" />
  154. </div>
  155. </div>