diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-03-27 15:01:46 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-07 13:30:28 +0200 |
commit | bd99042a66acef066bebac1694dd2c431166fe2b (patch) | |
tree | 3589e9f8ed72907580b1eeca0dd6a18b83fc89f3 /apps/encryption/templates | |
parent | 37e8268447b93f6a74c69b0b489c9c3a95ed1fa5 (diff) | |
download | nextcloud-server-bd99042a66acef066bebac1694dd2c431166fe2b.tar.gz nextcloud-server-bd99042a66acef066bebac1694dd2c431166fe2b.zip |
add setting templates
Diffstat (limited to 'apps/encryption/templates')
-rw-r--r-- | apps/encryption/templates/invalid_private_key.php | 12 | ||||
-rw-r--r-- | apps/encryption/templates/settings-admin.php | 71 | ||||
-rw-r--r-- | apps/encryption/templates/settings-personal.php | 70 |
3 files changed, 153 insertions, 0 deletions
diff --git a/apps/encryption/templates/invalid_private_key.php b/apps/encryption/templates/invalid_private_key.php new file mode 100644 index 00000000000..b148e65b199 --- /dev/null +++ b/apps/encryption/templates/invalid_private_key.php @@ -0,0 +1,12 @@ +<ul> + <li class='error'> + <?php $location = \OC_Helper::linkToRoute( "settings_personal" ).'#changePKPasswd' ?> + + <?php p($_['message']); ?> + <br/> + <?php if($_['errorCode'] === \OCA\Files_Encryption\Crypt::ENCRYPTION_PRIVATE_KEY_NOT_VALID_ERROR): ?> + <?php p($l->t('Go directly to your %spersonal settings%s.', array('<a href="'.$location.'">', '</a>'))); ?> + <?php endif; ?> + <br/> + </li> +</ul> diff --git a/apps/encryption/templates/settings-admin.php b/apps/encryption/templates/settings-admin.php new file mode 100644 index 00000000000..252701e9ed0 --- /dev/null +++ b/apps/encryption/templates/settings-admin.php @@ -0,0 +1,71 @@ +<?php + /** @var array $_ */ + /** @var OC_L10N $l */ +?> +<form id="encryption" class="section"> + <h2><?php p($l->t('ownCloud basic encryption module')); ?></h2> + + <?php if($_["initStatus"] === \OCA\Files_Encryption\Session::NOT_INITIALIZED): ?> + <?php p($l->t("Encryption App is enabled but your keys are not initialized, please log-out and log-in again")); ?> + <?php else: ?> + <p id="encryptionSetRecoveryKey"> + <?php p($l->t("Enable recovery key (allow to recover users files in case of password loss):")); ?> + <span class="msg"></span> + <br/> + <br/> + <input type="password" name="encryptionRecoveryPassword" id="encryptionRecoveryPassword"/> + <label for="recoveryPassword"><?php p($l->t("Recovery key password")); ?></label> + <br/> + <input type="password" name="encryptionRecoveryPassword" id="repeatEncryptionRecoveryPassword"/> + <label for="repeatEncryptionRecoveryPassword"><?php p($l->t("Repeat Recovery key password")); ?></label> + <br/> + <input + type='radio' + id='adminEnableRecovery' + name='adminEnableRecovery' + value='1' + <?php echo($_["recoveryEnabled"] === '1' ? 'checked="checked"' : ''); ?> /> + <label for="adminEnableRecovery"><?php p($l->t("Enabled")); ?></label> + <br/> + + <input + type='radio' + id='adminDisableRecovery' + name='adminEnableRecovery' + value='0' + <?php echo($_["recoveryEnabled"] === '0' ? 'checked="checked"' : ''); ?> /> + <label for="adminDisableRecovery"><?php p($l->t("Disabled")); ?></label> + </p> + <br/><br/> + + <p name="changeRecoveryPasswordBlock" id="encryptionChangeRecoveryKey" <?php if ($_['recoveryEnabled'] === '0') print_unescaped('class="hidden"');?>> + <strong><?php p($l->t("Change recovery key password:")); ?></strong> + <span class="msg"></span> + <br/><br/> + <input + type="password" + name="changeRecoveryPassword" + id="oldEncryptionRecoveryPassword" /> + <label for="oldEncryptionRecoveryPassword"><?php p($l->t("Old Recovery key password")); ?></label> + <br/> + <br/> + <input + type="password" + name="changeRecoveryPassword" + id="newEncryptionRecoveryPassword" /> + <label for="newEncryptionRecoveryPassword"><?php p($l->t("New Recovery key password")); ?></label> + <br/> + <input + type="password" + name="changeRecoveryPassword" + id="repeatedNewEncryptionRecoveryPassword" /> + <label for="repeatEncryptionRecoveryPassword"><?php p($l->t("Repeat New Recovery key password")); ?></label> + <br/> + <button + type="button" + name="submitChangeRecoveryKey"> + <?php p($l->t("Change Password")); ?> + </button> + </p> + <?php endif; ?> +</form> diff --git a/apps/encryption/templates/settings-personal.php b/apps/encryption/templates/settings-personal.php new file mode 100644 index 00000000000..a28df9ac0ec --- /dev/null +++ b/apps/encryption/templates/settings-personal.php @@ -0,0 +1,70 @@ +<?php + /** @var array $_ */ + /** @var OC_L10N $l */ +?> +<form id="encryption" class="section"> + <h2><?php p($l->t('ownCloud basic encryption module')); ?></h2> + + <?php if ( $_["initialized"] === \OCA\Files_Encryption\Session::NOT_INITIALIZED ): ?> + + <?php p($l->t("Encryption App is enabled but your keys are not initialized, please log-out and log-in again")); ?> + + <?php elseif ( $_["initialized"] === \OCA\Files_Encryption\Session::INIT_EXECUTED ): ?> + <p> + <a name="changePKPasswd" /> + <label for="changePrivateKeyPasswd"> + <em><?php p( $l->t( "Your private key password no longer matches your log-in password." ) ); ?></em> + </label> + <br /> + <?php p( $l->t( "Set your old private key password to your current log-in password:" ) ); ?> + <?php if ( $_["recoveryEnabledForUser"] ): + p( $l->t( " If you don't remember your old password you can ask your administrator to recover your files." ) ); + endif; ?> + <br /> + <input + type="password" + name="changePrivateKeyPassword" + id="oldPrivateKeyPassword" /> + <label for="oldPrivateKeyPassword"><?php p($l->t( "Old log-in password" )); ?></label> + <br /> + <input + type="password" + name="changePrivateKeyPassword" + id="newPrivateKeyPassword" /> + <label for="newRecoveryPassword"><?php p($l->t( "Current log-in password" )); ?></label> + <br /> + <button + type="button" + name="submitChangePrivateKeyPassword" + disabled><?php p($l->t( "Update Private Key Password" )); ?> + </button> + <span class="msg"></span> + </p> + + <?php elseif ( $_["recoveryEnabled"] && $_["privateKeySet"] && $_["initialized"] === \OCA\Files_Encryption\Session::INIT_SUCCESSFUL ): ?> + <br /> + <p id="userEnableRecovery"> + <label for="userEnableRecovery"><?php p( $l->t( "Enable password recovery:" ) ); ?></label> + <span class="msg"></span> + <br /> + <em><?php p( $l->t( "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" ) ); ?></em> + <br /> + <input + type='radio' + id='userEnableRecovery' + name='userEnableRecovery' + value='1' + <?php echo ( $_["recoveryEnabledForUser"] ? 'checked="checked"' : '' ); ?> /> + <label for="userEnableRecovery"><?php p( $l->t( "Enabled" ) ); ?></label> + <br /> + + <input + type='radio' + id='userDisableRecovery' + name='userEnableRecovery' + value='0' + <?php echo ( $_["recoveryEnabledForUser"] === false ? 'checked="checked"' : '' ); ?> /> + <label for="userDisableRecovery"><?php p( $l->t( "Disabled" ) ); ?></label> + </p> + <?php endif; ?> +</form> |