1
0

settings-personal.php 2.6 KB

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