personal.php 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  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 $_ array */
  7. ?>
  8. <div id="app-navigation">
  9. <ul>
  10. <?php foreach($_['forms'] as $form) {
  11. if (isset($form['anchor'])) {
  12. $anchor = '#' . $form['anchor'];
  13. $sectionName = $form['section-name'];
  14. print_unescaped(sprintf("<li><a href='%s'>%s</a></li>", OC_Util::sanitizeHTML($anchor), OC_Util::sanitizeHTML($sectionName)));
  15. }
  16. }?>
  17. </ul>
  18. </div>
  19. <div id="app-content">
  20. <div id="clientsbox" class="clientsbox center">
  21. <h2><?php p($l->t('Get the apps to sync your files'));?></h2>
  22. <a href="<?php p($_['clients']['desktop']); ?>" target="_blank">
  23. <img src="<?php print_unescaped(OCP\Util::imagePath('core', 'desktopapp.png')); ?>"
  24. alt="<?php p($l->t('Desktop client'));?>" />
  25. </a>
  26. <a href="<?php p($_['clients']['android']); ?>" target="_blank">
  27. <img src="<?php print_unescaped(OCP\Util::imagePath('core', 'googleplay.png')); ?>"
  28. alt="<?php p($l->t('Android app'));?>" />
  29. </a>
  30. <a href="<?php p($_['clients']['ios']); ?>" target="_blank">
  31. <img src="<?php print_unescaped(OCP\Util::imagePath('core', 'appstore.png')); ?>"
  32. alt="<?php p($l->t('iOS app'));?>" />
  33. </a>
  34. <?php if (OC_Util::getEditionString() === ''): ?>
  35. <p class="center">
  36. <?php print_unescaped($l->t('If you want to support the project
  37. <a href="https://owncloud.org/contribute"
  38. target="_blank" rel="noreferrer">join development</a>
  39. or
  40. <a href="https://owncloud.org/promote"
  41. target="_blank" rel="noreferrer">spread the word</a>!'));?>
  42. </p>
  43. <?php endif; ?>
  44. <?php if(OC_APP::isEnabled('firstrunwizard')) {?>
  45. <p class="center"><a class="button" href="#" id="showWizard"><?php p($l->t('Show First Run Wizard again'));?></a></p>
  46. <?php }?>
  47. </div>
  48. <div id="quota" class="section">
  49. <div style="width:<?php p($_['usage_relative']);?>%"
  50. <?php if($_['usage_relative'] > 80): ?> class="quota-warning" <?php endif; ?>>
  51. <p id="quotatext">
  52. <?php print_unescaped($l->t('You have used <strong>%s</strong> of the available <strong>%s</strong>',
  53. array($_['usage'], $_['total_space'])));?>
  54. </p>
  55. </div>
  56. </div>
  57. <?php
  58. if($_['passwordChangeSupported']) {
  59. script('jquery-showpassword');
  60. ?>
  61. <form id="passwordform" class="section">
  62. <h2 class="inlineblock"><?php p($l->t('Password'));?></h2>
  63. <div class="hidden icon-checkmark" id="password-changed"></div>
  64. <div class="hidden" id="password-error"><?php p($l->t('Unable to change your password'));?></div>
  65. <br>
  66. <label for="pass1" class="onlyInIE8"><?php echo $l->t('Current password');?>: </label>
  67. <input type="password" id="pass1" name="oldpassword"
  68. placeholder="<?php echo $l->t('Current password');?>"
  69. autocomplete="off" autocapitalize="off" autocorrect="off" />
  70. <label for="pass2" class="onlyInIE8"><?php echo $l->t('New password');?>: </label>
  71. <input type="password" id="pass2" name="personal-password"
  72. placeholder="<?php echo $l->t('New password');?>"
  73. data-typetoggle="#personal-show"
  74. autocomplete="off" autocapitalize="off" autocorrect="off" />
  75. <input type="checkbox" id="personal-show" name="show" /><label for="personal-show"></label>
  76. <input id="passwordbutton" type="submit" value="<?php echo $l->t('Change password');?>" />
  77. <br/>
  78. <div class="strengthify-wrapper"></div>
  79. </form>
  80. <?php
  81. }
  82. ?>
  83. <?php
  84. if($_['displayNameChangeSupported']) {
  85. ?>
  86. <form id="displaynameform" class="section">
  87. <h2>
  88. <label for="displayName"><?php echo $l->t('Full name');?></label>
  89. </h2>
  90. <input type="text" id="displayName" name="displayName"
  91. value="<?php p($_['displayName'])?>"
  92. autocomplete="on" autocapitalize="off" autocorrect="off" />
  93. <span class="msg"></span>
  94. <input type="hidden" id="oldDisplayName" name="oldDisplayName" value="<?php p($_['displayName'])?>" />
  95. </form>
  96. <?php
  97. } else {
  98. ?>
  99. <div class="section">
  100. <h2><?php echo $l->t('Full name');?></h2>
  101. <span><?php if(isset($_['displayName'][0])) { p($_['displayName']); } else { p($l->t('No display name set')); } ?></span>
  102. </div>
  103. <?php
  104. }
  105. ?>
  106. <?php
  107. if($_['passwordChangeSupported']) {
  108. ?>
  109. <form id="lostpassword" class="section">
  110. <h2>
  111. <label for="email"><?php p($l->t('Email'));?></label>
  112. </h2>
  113. <input type="email" name="email" id="email" value="<?php p($_['email']); ?>"
  114. placeholder="<?php p($l->t('Your email address'));?>"
  115. autocomplete="on" autocapitalize="off" autocorrect="off" />
  116. <span class="msg"></span><br />
  117. <em><?php p($l->t('Fill in an email address to enable password recovery and receive notifications'));?></em>
  118. </form>
  119. <?php
  120. } else {
  121. ?>
  122. <div class="section">
  123. <h2><?php echo $l->t('Email'); ?></h2>
  124. <span><?php if(isset($_['email'][0])) { p($_['email']); } else { p($l->t('No email address set')); }?></span>
  125. </div>
  126. <?php
  127. }
  128. ?>
  129. <div id="groups" class="section">
  130. <h2><?php p($l->t('Groups')); ?></h2>
  131. <p><?php p($l->t('You are member of the following groups:')); ?></p>
  132. <p>
  133. <?php p(implode(', ', $_['groups'])); ?>
  134. </p>
  135. </div>
  136. <?php if ($_['enableAvatars']): ?>
  137. <form id="avatar" class="section" method="post" action="<?php p(\OC_Helper::linkToRoute('core.avatar.postAvatar')); ?>">
  138. <h2><?php p($l->t('Profile picture')); ?></h2>
  139. <div id="displayavatar">
  140. <div class="avatardiv"></div><br>
  141. <div class="warning hidden"></div>
  142. <?php if ($_['avatarChangeSupported']): ?>
  143. <div class="inlineblock button" id="uploadavatarbutton"><?php p($l->t('Upload new')); ?></div>
  144. <input type="file" class="hidden" name="files[]" id="uploadavatar">
  145. <div class="inlineblock button" id="selectavatar"><?php p($l->t('Select new from Files')); ?></div>
  146. <div class="inlineblock button" id="removeavatar"><?php p($l->t('Remove image')); ?></div><br>
  147. <?php p($l->t('Either png or jpg. Ideally square but you will be able to crop it.')); ?>
  148. <?php else: ?>
  149. <?php p($l->t('Your avatar is provided by your original account.')); ?>
  150. <?php endif; ?>
  151. </div>
  152. <div id="cropper" class="hidden">
  153. <div class="inlineblock button" id="abortcropperbutton"><?php p($l->t('Cancel')); ?></div>
  154. <div class="inlineblock button primary" id="sendcropperbutton"><?php p($l->t('Choose as profile image')); ?></div>
  155. </div>
  156. </form>
  157. <?php endif; ?>
  158. <form class="section">
  159. <h2>
  160. <label for="languageinput"><?php p($l->t('Language'));?></label>
  161. </h2>
  162. <select id="languageinput" name="lang" data-placeholder="<?php p($l->t('Language'));?>">
  163. <option value="<?php p($_['activelanguage']['code']);?>">
  164. <?php p($_['activelanguage']['name']);?>
  165. </option>
  166. <?php foreach($_['commonlanguages'] as $language):?>
  167. <option value="<?php p($language['code']);?>">
  168. <?php p($language['name']);?>
  169. </option>
  170. <?php endforeach;?>
  171. <optgroup label="––––––––––"></optgroup>
  172. <?php foreach($_['languages'] as $language):?>
  173. <option value="<?php p($language['code']);?>">
  174. <?php p($language['name']);?>
  175. </option>
  176. <?php endforeach;?>
  177. </select>
  178. <?php if (OC_Util::getEditionString() === ''): ?>
  179. <a href="https://www.transifex.com/projects/p/owncloud/team/<?php p($_['activelanguage']['code']);?>/"
  180. target="_blank" rel="noreferrer">
  181. <em><?php p($l->t('Help translate'));?></em>
  182. </a>
  183. <?php endif; ?>
  184. </form>
  185. <?php foreach($_['forms'] as $form) {
  186. if (isset($form['form'])) {?>
  187. <div id="<?php isset($form['anchor']) ? p($form['anchor']) : p('');?>"><?php print_unescaped($form['form']);?></div>
  188. <?php }
  189. };?>
  190. <div id="ssl-root-certificates" class="section">
  191. <h2><?php p($l->t('SSL root certificates')); ?></h2>
  192. <table id="sslCertificate" class="grid">
  193. <thead>
  194. <th><?php p($l->t('Common Name')); ?></th>
  195. <th><?php p($l->t('Valid until')); ?></th>
  196. <th><?php p($l->t('Issued By')); ?></th>
  197. <th/>
  198. </thead>
  199. <tbody>
  200. <?php foreach ($_['certs'] as $rootCert): /**@var \OCP\ICertificate $rootCert*/ ?>
  201. <tr class="<?php echo ($rootCert->isExpired()) ? 'expired' : 'valid' ?>" data-name="<?php p($rootCert->getName()) ?>">
  202. <td class="rootCert" title="<?php p($rootCert->getOrganization())?>">
  203. <?php p($rootCert->getCommonName()) ?>
  204. </td>
  205. <td title="<?php p($l->t('Valid until %s', $l->l('date', $rootCert->getExpireDate()))) ?>">
  206. <?php echo $l->l('date', $rootCert->getExpireDate()) ?>
  207. </td>
  208. <td title="<?php p($rootCert->getIssuerOrganization()) ?>">
  209. <?php p($rootCert->getIssuerName()) ?>
  210. </td>
  211. <td <?php if ($rootCert != ''): ?>class="remove"
  212. <?php else: ?>style="visibility:hidden;"
  213. <?php endif; ?>><img alt="<?php p($l->t('Delete')); ?>"
  214. title="<?php p($l->t('Delete')); ?>"
  215. class="svg action"
  216. src="<?php print_unescaped(image_path('core', 'actions/delete.svg')); ?>"/>
  217. </td>
  218. </tr>
  219. <?php endforeach; ?>
  220. </tbody>
  221. </table>
  222. <form class="uploadButton" method="post" action="<?php p(\OC_Helper::linkToRoute('settings_cert_post')); ?>" target="certUploadFrame">
  223. <input type="file" id="rootcert_import" name="rootcert_import" class="hidden">
  224. <input type="button" id="rootcert_import_button" value="<?php p($l->t('Import root certificate')); ?>"/>
  225. </form>
  226. </div>
  227. <div class="section">
  228. <h2><?php p($l->t('Version'));?></h2>
  229. <strong><?php p($theme->getTitle()); ?></strong> <?php p(OC_Util::getHumanVersion()) ?><br />
  230. <?php include('settings.development.notice.php'); ?>
  231. </div>
  232. <div class="section credits-footer">
  233. <p><?php print_unescaped($theme->getShortFooter()); ?></p>
  234. </div>
  235. </div>