settings-personal.php 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. /** @var array $_ */
  3. /** @var OC_L10N $l */
  4. script('encryption', 'settings-personal');
  5. script('core', 'multiselect');
  6. ?>
  7. <form id="encryption" class="section">
  8. <h2><?php p($l->t('ownCloud basic encryption module')); ?></h2>
  9. <?php if ($_["initialized"] === \OCA\Encryption\Session::NOT_INITIALIZED ): ?>
  10. <?php p($l->t("Encryption App is enabled but your keys are not initialized, please log-out and log-in again")); ?>
  11. <?php elseif ( $_["initialized"] === \OCA\Encryption\Session::INIT_EXECUTED ): ?>
  12. <p>
  13. <a name="changePKPasswd" />
  14. <label for="changePrivateKeyPasswd">
  15. <em><?php p( $l->t( "Your private key password no longer matches your log-in password." ) ); ?></em>
  16. </label>
  17. <br />
  18. <?php p( $l->t( "Set your old private key password to your current log-in password:" ) ); ?>
  19. <?php if ( $_["recoveryEnabledForUser"] ):
  20. p( $l->t( " If you don't remember your old password you can ask your administrator to recover your files." ) );
  21. endif; ?>
  22. <br />
  23. <input
  24. type="password"
  25. name="changePrivateKeyPassword"
  26. id="oldPrivateKeyPassword" />
  27. <label for="oldPrivateKeyPassword"><?php p($l->t( "Old log-in password" )); ?></label>
  28. <br />
  29. <input
  30. type="password"
  31. name="changePrivateKeyPassword"
  32. id="newPrivateKeyPassword" />
  33. <label for="newRecoveryPassword"><?php p($l->t( "Current log-in password" )); ?></label>
  34. <br />
  35. <button
  36. type="button"
  37. name="submitChangePrivateKeyPassword"
  38. disabled><?php p($l->t( "Update Private Key Password" )); ?>
  39. </button>
  40. <span class="msg"></span>
  41. </p>
  42. <?php elseif ( $_["recoveryEnabled"] && $_["privateKeySet"] && $_["initialized"] === \OCA\Encryption\Session::INIT_SUCCESSFUL ): ?>
  43. <br />
  44. <p id="userEnableRecovery">
  45. <label for="userEnableRecovery"><?php p( $l->t( "Enable password recovery:" ) ); ?></label>
  46. <span class="msg"></span>
  47. <br />
  48. <em><?php p( $l->t( "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" ) ); ?></em>
  49. <br />
  50. <input
  51. type='radio'
  52. id='userEnableRecovery'
  53. name='userEnableRecovery'
  54. value='1'
  55. <?php echo ( $_["recoveryEnabledForUser"] ? 'checked="checked"' : '' ); ?> />
  56. <label for="userEnableRecovery"><?php p( $l->t( "Enabled" ) ); ?></label>
  57. <br />
  58. <input
  59. type='radio'
  60. id='userDisableRecovery'
  61. name='userEnableRecovery'
  62. value='0'
  63. <?php echo ( $_["recoveryEnabledForUser"] === false ? 'checked="checked"' : '' ); ?> />
  64. <label for="userDisableRecovery"><?php p( $l->t( "Disabled" ) ); ?></label>
  65. </p>
  66. <?php endif; ?>
  67. </form>