2015-03-27 10:01:46 -04:00
< ? php
2024-05-28 10:42:42 -04:00
/**
* SPDX - FileCopyrightText : 2016 - 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX - FileCopyrightText : 2016 ownCloud , Inc .
* SPDX - License - Identifier : AGPL - 3.0 - only
*/
2015-03-30 05:49:03 -04:00
/** @var array $_ */
2016-10-28 15:46:28 -04:00
/** @var \OCP\IL10N $l */
2025-02-03 09:34:01 -05:00
\OCP\Util :: addScript ( 'encryption' , 'settings-admin' , 'core' );
2015-05-07 06:55:49 -04:00
style ( 'encryption' , 'settings-admin' );
2015-03-27 10:01:46 -04:00
?>
2015-05-04 05:51:02 -04:00
< form id = " ocDefaultEncryptionModule " class = " sub-section " >
2016-08-16 12:26:16 -04:00
< h3 >< ? php p ( $l -> t ( 'Default encryption module' )); ?> </h3>
2017-05-30 07:22:27 -04:00
< ? php if ( ! $_ [ 'initStatus' ] && $_ [ 'masterKeyEnabled' ] === false ) : ?>
2016-08-05 09:50:17 -04:00
< ? php p ( $l -> t ( 'Encryption app is enabled but your keys are not initialized, please log-out and log-in again' )); ?>
2015-03-27 10:01:46 -04:00
< ? php else : ?>
2015-10-13 11:54:06 -04:00
< p id = " encryptHomeStorageSetting " >
< input type = " checkbox " class = " checkbox " name = " encrypt_home_storage " id = " encryptHomeStorage "
value = " 1 " < ? php if ( $_ [ 'encryptHomeStorage' ]) {
print_unescaped ( 'checked="checked"' );
} ?> />
< label for = " encryptHomeStorage " >< ? php p ( $l -> t ( 'Encrypt the home storage' )); ?> </label></br>
2020-04-09 10:07:47 -04:00
< 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>
2015-10-13 11:54:06 -04:00
</ p >
2015-05-07 06:55:49 -04:00
< br />
2016-03-02 13:38:21 -05:00
< ? php if ( $_ [ 'masterKeyEnabled' ] === false ) : ?>
< p id = " encryptionSetRecoveryKey " >
< ? php $_ [ 'recoveryEnabled' ] === '0' ? p ( $l -> t ( 'Enable recovery key' )) : p ( $l -> t ( 'Disable recovery key' )); ?>
< span class = " msg " ></ span >
< br />
< em >
2022-09-21 11:44:32 -04:00
< ? php p ( $l -> t ( 'The recovery key is an additional encryption key used to encrypt files. It is used to recover files from an account if the password is forgotten.' )) ?>
2016-03-02 13:38:21 -05:00
</ em >
< br />
< input type = " password "
name = " encryptionRecoveryPassword "
id = " encryptionRecoveryPassword "
placeholder = " <?php p( $l->t ('Recovery key password')); ?> " />
< input type = " password "
name = " encryptionRecoveryPassword "
id = " repeatEncryptionRecoveryPassword "
placeholder = " <?php p( $l->t ('Repeat recovery key password')); ?> " />
< input type = " button "
name = " enableRecoveryKey "
id = " enableRecoveryKey "
status = " <?php p( $_['recoveryEnabled'] ) ?> "
value = " <?php $_['recoveryEnabled'] === '0' ? p( $l->t ('Enable recovery key')) : p( $l->t ('Disable recovery key')); ?> " />
</ p >
< br />< br />
2015-10-13 11:54:06 -04:00
2016-03-02 13:38:21 -05:00
< p name = " changeRecoveryPasswordBlock " id = " encryptionChangeRecoveryKey " < ? php if ( $_ [ 'recoveryEnabled' ] === '0' ) {
print_unescaped ( 'class="hidden"' );
} ?> >
< ? php p ( $l -> t ( 'Change recovery key password:' )); ?>
< span class = " msg " ></ span >
< br />
< input
type = " password "
name = " changeRecoveryPassword "
id = " oldEncryptionRecoveryPassword "
placeholder = " <?php p( $l->t ('Old recovery key password')); ?> " />
< br />
< input
type = " password "
name = " changeRecoveryPassword "
id = " newEncryptionRecoveryPassword "
placeholder = " <?php p( $l->t ('New recovery key password')); ?> " />
< input
type = " password "
name = " changeRecoveryPassword "
id = " repeatedNewEncryptionRecoveryPassword "
placeholder = " <?php p( $l->t ('Repeat new recovery key password')); ?> " />
2015-05-07 06:55:49 -04:00
2016-03-02 13:38:21 -05:00
< button
type = " button "
name = " submitChangeRecoveryKey " >
< ? php p ( $l -> t ( 'Change Password' )); ?>
</ button >
</ p >
< ? php endif ; ?>
2015-03-27 10:01:46 -04:00
< ? php endif ; ?>
</ form >