settings-personal.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. /** @var array $_ */
  3. /** @var \OCP\IL10N $l */
  4. script('encryption', 'settings-personal');
  5. script('core', 'multiselect');
  6. ?>
  7. <form id="ocDefaultEncryptionModule" class="section">
  8. <h2><?php p($l->t('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>