settings-admin.php 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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']) print_unescaped('checked="checked"'); ?> />
  15. <label for="encryptHomeStorage"><?php p($l->t('Encrypt the home storage'));?></label></br>
  16. <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>
  17. </p>
  18. <br />
  19. <?php if($_['masterKeyEnabled'] === false): ?>
  20. <p id="encryptionSetRecoveryKey">
  21. <?php $_["recoveryEnabled"] === '0' ? p($l->t("Enable recovery key")) : p($l->t("Disable recovery key")); ?>
  22. <span class="msg"></span>
  23. <br/>
  24. <em>
  25. <?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.")) ?>
  26. </em>
  27. <br/>
  28. <input type="password"
  29. name="encryptionRecoveryPassword"
  30. id="encryptionRecoveryPassword"
  31. placeholder="<?php p($l->t("Recovery key password")); ?>"/>
  32. <input type="password"
  33. name="encryptionRecoveryPassword"
  34. id="repeatEncryptionRecoveryPassword"
  35. placeholder="<?php p($l->t("Repeat recovery key password")); ?>"/>
  36. <input type="button"
  37. name="enableRecoveryKey"
  38. id="enableRecoveryKey"
  39. status="<?php p($_["recoveryEnabled"]) ?>"
  40. value="<?php $_["recoveryEnabled"] === '0' ? p($l->t("Enable recovery key")) : p($l->t("Disable recovery key")); ?>"/>
  41. </p>
  42. <br/><br/>
  43. <p name="changeRecoveryPasswordBlock" id="encryptionChangeRecoveryKey" <?php if($_['recoveryEnabled'] === '0') print_unescaped('class="hidden"');?>>
  44. <?php p($l->t("Change recovery key password:")); ?>
  45. <span class="msg"></span>
  46. <br/>
  47. <input
  48. type="password"
  49. name="changeRecoveryPassword"
  50. id="oldEncryptionRecoveryPassword"
  51. placeholder="<?php p($l->t("Old recovery key password")); ?>"/>
  52. <br />
  53. <input
  54. type="password"
  55. name="changeRecoveryPassword"
  56. id="newEncryptionRecoveryPassword"
  57. placeholder="<?php p($l->t("New recovery key password")); ?>"/>
  58. <input
  59. type="password"
  60. name="changeRecoveryPassword"
  61. id="repeatedNewEncryptionRecoveryPassword"
  62. placeholder="<?php p($l->t("Repeat new recovery key password")); ?>"/>
  63. <button
  64. type="button"
  65. name="submitChangeRecoveryKey">
  66. <?php p($l->t("Change Password")); ?>
  67. </button>
  68. </p>
  69. <?php endif; ?>
  70. <?php endif; ?>
  71. </form>