1
0

settings-admin.php 3.0 KB

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