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.

personal.php 9.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. <?php /**
  2. * Copyright (c) 2011, Robin Appelman <icewind1991@gmail.com>
  3. * This file is licensed under the Affero General Public License version 3 or later.
  4. * See the COPYING-README file.
  5. */
  6. /** @var $_ mixed[]|\OCP\IURLGenerator[] */
  7. /** @var \OC_Defaults $theme */
  8. ?>
  9. <div id="app-navigation">
  10. <ul>
  11. <?php foreach($_['forms'] as $form) {
  12. if (isset($form['anchor'])) {
  13. $anchor = '#' . $form['anchor'];
  14. $sectionName = $form['section-name'];
  15. print_unescaped(sprintf("<li><a href='%s'>%s</a></li>", \OCP\Util::sanitizeHTML($anchor), \OCP\Util::sanitizeHTML($sectionName)));
  16. }
  17. }?>
  18. </ul>
  19. </div>
  20. <div id="app-content">
  21. <div id="quota" class="section">
  22. <div style="width:<?php p($_['usage_relative']);?>%"
  23. <?php if($_['usage_relative'] > 80): ?> class="quota-warning" <?php endif; ?>>
  24. <p id="quotatext">
  25. <?php print_unescaped($l->t('You are using <strong>%s</strong> of <strong>%s</strong>',
  26. array($_['usage'], $_['total_space'])));?>
  27. </p>
  28. </div>
  29. </div>
  30. <?php if ($_['enableAvatars']): ?>
  31. <form id="avatar" class="section" method="post" action="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.postAvatar')); ?>">
  32. <h2><?php p($l->t('Profile picture')); ?></h2>
  33. <div id="displayavatar">
  34. <div class="avatardiv"></div>
  35. <div class="warning hidden"></div>
  36. <?php if ($_['avatarChangeSupported']): ?>
  37. <label for="uploadavatar" class="inlineblock button icon-upload svg" id="uploadavatarbutton" title="<?php p($l->t('Upload new')); ?>"></label>
  38. <div class="inlineblock button icon-folder svg" id="selectavatar" title="<?php p($l->t('Select from Files')); ?>"></div>
  39. <div class="hidden button icon-delete svg" id="removeavatar" title="<?php p($l->t('Remove image')); ?>"></div>
  40. <input type="file" name="files[]" id="uploadavatar" class="hiddenuploadfield">
  41. <p><em><?php p($l->t('png or jpg, max. 20 MB')); ?></em></p>
  42. <?php else: ?>
  43. <?php p($l->t('Picture provided by original account')); ?>
  44. <?php endif; ?>
  45. </div>
  46. <div id="cropper" class="hidden">
  47. <div class="inlineblock button" id="abortcropperbutton"><?php p($l->t('Cancel')); ?></div>
  48. <div class="inlineblock button primary" id="sendcropperbutton"><?php p($l->t('Choose as profile picture')); ?></div>
  49. </div>
  50. </form>
  51. <?php endif; ?>
  52. <?php
  53. if($_['displayNameChangeSupported']) {
  54. ?>
  55. <form id="displaynameform" class="section">
  56. <h2>
  57. <label for="displayName"><?php echo $l->t('Full name');?></label>
  58. </h2>
  59. <input type="text" id="displayName" name="displayName"
  60. value="<?php p($_['displayName'])?>"
  61. autocomplete="on" autocapitalize="off" autocorrect="off" />
  62. <span class="msg"></span>
  63. <input type="hidden" id="oldDisplayName" name="oldDisplayName" value="<?php p($_['displayName'])?>" />
  64. </form>
  65. <?php
  66. } else {
  67. ?>
  68. <div id="displaynameform" class="section">
  69. <h2><?php echo $l->t('Full name');?></h2>
  70. <span><?php if(isset($_['displayName'][0])) { p($_['displayName']); } else { p($l->t('No display name set')); } ?></span>
  71. </div>
  72. <?php
  73. }
  74. ?>
  75. <?php
  76. if($_['displayNameChangeSupported']) {
  77. ?>
  78. <form id="lostpassword" class="section">
  79. <h2>
  80. <label for="email"><?php p($l->t('Email'));?></label>
  81. </h2>
  82. <input type="email" name="email" id="email" value="<?php p($_['email']); ?>"
  83. placeholder="<?php p($l->t('Your email address'));?>"
  84. autocomplete="on" autocapitalize="off" autocorrect="off" />
  85. <span class="msg"></span><br />
  86. <em><?php p($l->t('For password recovery and notifications'));?></em>
  87. </form>
  88. <?php
  89. } else {
  90. ?>
  91. <div id="lostpassword" class="section">
  92. <h2><?php echo $l->t('Email'); ?></h2>
  93. <span><?php if(isset($_['email'][0])) { p($_['email']); } else { p($l->t('No email address set')); }?></span>
  94. </div>
  95. <?php
  96. }
  97. ?>
  98. <div id="groups" class="section">
  99. <h2><?php p($l->t('Groups')); ?></h2>
  100. <p><?php p($l->t('You are member of the following groups:')); ?></p>
  101. <p>
  102. <?php p(implode(', ', $_['groups'])); ?>
  103. </p>
  104. </div>
  105. <?php
  106. if($_['passwordChangeSupported']) {
  107. script('jquery-showpassword');
  108. ?>
  109. <form id="passwordform" class="section">
  110. <h2 class="inlineblock"><?php p($l->t('Password'));?></h2>
  111. <div id="password-error-msg" class="msg success inlineblock" style="display: none;">Saved</div>
  112. <br>
  113. <label for="pass1" class="hidden-visually"><?php echo $l->t('Current password');?>: </label>
  114. <input type="password" id="pass1" name="oldpassword"
  115. placeholder="<?php echo $l->t('Current password');?>"
  116. autocomplete="off" autocapitalize="off" autocorrect="off" />
  117. <label for="pass2" class="hidden-visually"><?php echo $l->t('New password');?>: </label>
  118. <input type="password" id="pass2" name="personal-password"
  119. placeholder="<?php echo $l->t('New password');?>"
  120. data-typetoggle="#personal-show"
  121. autocomplete="off" autocapitalize="off" autocorrect="off" />
  122. <input type="checkbox" id="personal-show" name="show" /><label for="personal-show" class="svg"></label>
  123. <input id="passwordbutton" type="submit" value="<?php echo $l->t('Change password');?>" />
  124. <br/>
  125. </form>
  126. <?php
  127. }
  128. ?>
  129. <form id="language" class="section">
  130. <h2>
  131. <label for="languageinput"><?php p($l->t('Language'));?></label>
  132. </h2>
  133. <select id="languageinput" name="lang" data-placeholder="<?php p($l->t('Language'));?>">
  134. <option value="<?php p($_['activelanguage']['code']);?>">
  135. <?php p($_['activelanguage']['name']);?>
  136. </option>
  137. <?php foreach($_['commonlanguages'] as $language):?>
  138. <option value="<?php p($language['code']);?>">
  139. <?php p($language['name']);?>
  140. </option>
  141. <?php endforeach;?>
  142. <optgroup label="––––––––––"></optgroup>
  143. <?php foreach($_['languages'] as $language):?>
  144. <option value="<?php p($language['code']);?>">
  145. <?php p($language['name']);?>
  146. </option>
  147. <?php endforeach;?>
  148. </select>
  149. <?php if (OC_Util::getEditionString() === ''): ?>
  150. <a href="https://www.transifex.com/projects/p/owncloud/"
  151. target="_blank" rel="noreferrer">
  152. <em><?php p($l->t('Help translate'));?></em>
  153. </a>
  154. <?php endif; ?>
  155. </form>
  156. <div id="sessions" class="section">
  157. <h2><?php p($l->t('Sessions'));?></h2>
  158. <span class="hidden-when-empty"><?php p($l->t('These are the web, desktop and mobile clients currently logged in to your account.'));?></span>
  159. <table>
  160. <thead class="token-list-header">
  161. <tr>
  162. <th><?php p($l->t('Browser'));?></th>
  163. <th><?php p($l->t('Most recent activity'));?></th>
  164. <th></th>
  165. </tr>
  166. </thead>
  167. <tbody class="token-list icon-loading">
  168. </tbody>
  169. </table>
  170. </div>
  171. <div id="apppasswords" class="section">
  172. <h2><?php p($l->t('App passwords'));?></h2>
  173. <span class="hidden-when-empty"><?php p($l->t("You've linked these apps."));?></span>
  174. <table>
  175. <thead class="hidden-when-empty">
  176. <tr>
  177. <th><?php p($l->t('Name'));?></th>
  178. <th><?php p($l->t('Most recent activity'));?></th>
  179. <th></th>
  180. </tr>
  181. </thead>
  182. <tbody class="token-list icon-loading">
  183. </tbody>
  184. </table>
  185. <p><?php p($l->t('An app password is a passcode that gives an app or device permissions to access your %s account.', [$theme->getName()]));?></p>
  186. <div id="app-password-form">
  187. <input id="app-password-name" type="text" placeholder="<?php p($l->t('App name')); ?>">
  188. <button id="add-app-password" class="button"><?php p($l->t('Create new app password')); ?></button>
  189. </div>
  190. <div id="app-password-result" class="hidden">
  191. <span><?php p($l->t('Use the credentials below to configure your app or device.')); ?></span>
  192. <div class="app-password-row">
  193. <span class="app-password-label"><?php p($l->t('Username')); ?></span>
  194. <input id="new-app-login-name" type="text" readonly="readonly"/>
  195. </div>
  196. <div class="app-password-row">
  197. <span class="app-password-label"><?php p($l->t('Password')); ?></span>
  198. <input id="new-app-password" type="text" readonly="readonly"/>
  199. <button id="app-password-hide" class="button"><?php p($l->t('Done')); ?></button>
  200. </div>
  201. </div>
  202. </div>
  203. <div id="clientsbox" class="section clientsbox">
  204. <h2><?php p($l->t('Get the apps to sync your files'));?></h2>
  205. <a href="<?php p($_['clients']['desktop']); ?>" rel="noreferrer" target="_blank">
  206. <img src="<?php print_unescaped(image_path('core', 'desktopapp.svg')); ?>"
  207. alt="<?php p($l->t('Desktop client'));?>" />
  208. </a>
  209. <a href="<?php p($_['clients']['android']); ?>" rel="noreferrer" target="_blank">
  210. <img src="<?php print_unescaped(image_path('core', 'googleplay.png')); ?>"
  211. alt="<?php p($l->t('Android app'));?>" />
  212. </a>
  213. <a href="<?php p($_['clients']['ios']); ?>" rel="noreferrer" target="_blank">
  214. <img src="<?php print_unescaped(image_path('core', 'appstore.svg')); ?>"
  215. alt="<?php p($l->t('iOS app'));?>" />
  216. </a>
  217. <?php if (OC_Util::getEditionString() === ''): ?>
  218. <p>
  219. <?php print_unescaped($l->t('If you want to support the project
  220. <a href="https://nextcloud.com/contribute"
  221. target="_blank" rel="noreferrer">join development</a>
  222. or
  223. <a href="https://nextcloud.com/contribute"
  224. target="_blank" rel="noreferrer">spread the word</a>!'));?>
  225. </p>
  226. <?php endif; ?>
  227. <?php if(OC_APP::isEnabled('firstrunwizard')) {?>
  228. <p><a class="button" href="#" id="showWizard"><?php p($l->t('Show First Run Wizard again'));?></a></p>
  229. <?php }?>
  230. </div>
  231. <?php foreach($_['forms'] as $form) {
  232. if (isset($form['form'])) {?>
  233. <div id="<?php isset($form['anchor']) ? p($form['anchor']) : p('');?>"><?php print_unescaped($form['form']);?></div>
  234. <?php }
  235. };?>
  236. <div class="section">
  237. <h2><?php p($l->t('Version'));?></h2>
  238. <p><a href="<?php print_unescaped($theme->getBaseUrl()); ?>" target="_blank"><?php p($theme->getTitle()); ?></a> <?php p(OC_Util::getHumanVersion()) ?></p>
  239. <p><?php include('settings.development.notice.php'); ?></p>
  240. </div>
  241. </div>