settings-admin.php 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. /** @var array $_ */
  3. /** @var \OCP\IL10N $l */
  4. script('encryption', 'settings-admin');
  5. style('encryption', 'settings-admin');
  6. ?>
  7. <form id="ocDefaultEncryptionModule" class="sub-section">
  8. <h3><?php p($l->t("Default encryption module")); ?></h3>
  9. <?php if (!$_["initStatus"] && $_['masterKeyEnabled'] === false): ?>
  10. <?php p($l->t("Encryption app is enabled but your keys are not initialized, please log-out and log-in again")); ?>
  11. <?php else: ?>
  12. <p id="encryptHomeStorageSetting">
  13. <input type="checkbox" class="checkbox" name="encrypt_home_storage" id="encryptHomeStorage"
  14. value="1" <?php if ($_['encryptHomeStorage']) {
  15. print_unescaped('checked="checked"');
  16. } ?> />
  17. <label for="encryptHomeStorage"><?php p($l->t('Encrypt the home storage'));?></label></br>
  18. <em><?php p($l->t("Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted")); ?></em>
  19. </p>
  20. <br />
  21. <?php if ($_['masterKeyEnabled'] === false): ?>
  22. <p id="encryptionSetRecoveryKey">
  23. <?php $_["recoveryEnabled"] === '0' ? p($l->t("Enable recovery key")) : p($l->t("Disable recovery key")); ?>
  24. <span class="msg"></span>
  25. <br/>
  26. <em>
  27. <?php p($l->t("The recovery key is an extra encryption key that is used to encrypt files. It allows recovery of a user's files if the user forgets his or her password.")) ?>
  28. </em>
  29. <br/>
  30. <input type="password"
  31. name="encryptionRecoveryPassword"
  32. id="encryptionRecoveryPassword"
  33. placeholder="<?php p($l->t("Recovery key password")); ?>"/>
  34. <input type="password"
  35. name="encryptionRecoveryPassword"
  36. id="repeatEncryptionRecoveryPassword"
  37. placeholder="<?php p($l->t("Repeat recovery key password")); ?>"/>
  38. <input type="button"
  39. name="enableRecoveryKey"
  40. id="enableRecoveryKey"
  41. status="<?php p($_["recoveryEnabled"]) ?>"
  42. value="<?php $_["recoveryEnabled"] === '0' ? p($l->t("Enable recovery key")) : p($l->t("Disable recovery key")); ?>"/>
  43. </p>
  44. <br/><br/>
  45. <p name="changeRecoveryPasswordBlock" id="encryptionChangeRecoveryKey" <?php if ($_['recoveryEnabled'] === '0') {
  46. print_unescaped('class="hidden"');
  47. }?>>
  48. <?php p($l->t("Change recovery key password:")); ?>
  49. <span class="msg"></span>
  50. <br/>
  51. <input
  52. type="password"
  53. name="changeRecoveryPassword"
  54. id="oldEncryptionRecoveryPassword"
  55. placeholder="<?php p($l->t("Old recovery key password")); ?>"/>
  56. <br />
  57. <input
  58. type="password"
  59. name="changeRecoveryPassword"
  60. id="newEncryptionRecoveryPassword"
  61. placeholder="<?php p($l->t("New recovery key password")); ?>"/>
  62. <input
  63. type="password"
  64. name="changeRecoveryPassword"
  65. id="repeatedNewEncryptionRecoveryPassword"
  66. placeholder="<?php p($l->t("Repeat new recovery key password")); ?>"/>
  67. <button
  68. type="button"
  69. name="submitChangeRecoveryKey">
  70. <?php p($l->t("Change Password")); ?>
  71. </button>
  72. </p>
  73. <?php endif; ?>
  74. <?php endif; ?>
  75. </form>