1
0

settings-personal.php 2.8 KB

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