From 1e08b49f1c61ecb81a15f1d163d7322043a0512e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 18 Nov 2020 15:22:45 +0100 Subject: [PATCH] Use multifactor prefix for formbuilder templates related to MFA --- .../{__backupCodeField.tpl => __multifactorBackupCodeField.tpl} | 0 .../{__emailCodeField.tpl => __multifactorEmailCodeField.tpl} | 0 .../{__totpCodeField.tpl => __multifactorTotpCodeField.tpl} | 0 ...leteButton.tpl => __multifactorTotpDeviceNoDeleteButton.tpl} | 0 .../{__totpDeviceNode.tpl => __multifactorTotpDeviceNode.tpl} | 0 ...vicesContainer.tpl => __multifactorTotpDevicesContainer.tpl} | 0 ...iceContainer.tpl => __multifactorTotpNewDeviceContainer.tpl} | 0 .../{__totpSecretField.tpl => __multifactorTotpSecretField.tpl} | 0 .../lib/system/user/multifactor/TotpMultifactorMethod.class.php | 2 +- .../lib/system/user/multifactor/backup/CodeFormField.class.php | 2 +- .../lib/system/user/multifactor/email/CodeFormField.class.php | 2 +- .../lib/system/user/multifactor/totp/CodeFormField.class.php | 2 +- .../files/lib/system/user/multifactor/totp/DeviceNode.class.php | 2 +- .../lib/system/user/multifactor/totp/DevicesContainer.class.php | 2 +- .../system/user/multifactor/totp/NewDeviceContainer.class.php | 2 +- .../lib/system/user/multifactor/totp/SecretFormField.class.php | 2 +- 16 files changed, 8 insertions(+), 8 deletions(-) rename com.woltlab.wcf/templates/{__backupCodeField.tpl => __multifactorBackupCodeField.tpl} (100%) rename com.woltlab.wcf/templates/{__emailCodeField.tpl => __multifactorEmailCodeField.tpl} (100%) rename com.woltlab.wcf/templates/{__totpCodeField.tpl => __multifactorTotpCodeField.tpl} (100%) rename com.woltlab.wcf/templates/{__totpDeviceNoDeleteButton.tpl => __multifactorTotpDeviceNoDeleteButton.tpl} (100%) rename com.woltlab.wcf/templates/{__totpDeviceNode.tpl => __multifactorTotpDeviceNode.tpl} (100%) rename com.woltlab.wcf/templates/{__totpDevicesContainer.tpl => __multifactorTotpDevicesContainer.tpl} (100%) rename com.woltlab.wcf/templates/{__totpNewDeviceContainer.tpl => __multifactorTotpNewDeviceContainer.tpl} (100%) rename com.woltlab.wcf/templates/{__totpSecretField.tpl => __multifactorTotpSecretField.tpl} (100%) diff --git a/com.woltlab.wcf/templates/__backupCodeField.tpl b/com.woltlab.wcf/templates/__multifactorBackupCodeField.tpl similarity index 100% rename from com.woltlab.wcf/templates/__backupCodeField.tpl rename to com.woltlab.wcf/templates/__multifactorBackupCodeField.tpl diff --git a/com.woltlab.wcf/templates/__emailCodeField.tpl b/com.woltlab.wcf/templates/__multifactorEmailCodeField.tpl similarity index 100% rename from com.woltlab.wcf/templates/__emailCodeField.tpl rename to com.woltlab.wcf/templates/__multifactorEmailCodeField.tpl diff --git a/com.woltlab.wcf/templates/__totpCodeField.tpl b/com.woltlab.wcf/templates/__multifactorTotpCodeField.tpl similarity index 100% rename from com.woltlab.wcf/templates/__totpCodeField.tpl rename to com.woltlab.wcf/templates/__multifactorTotpCodeField.tpl diff --git a/com.woltlab.wcf/templates/__totpDeviceNoDeleteButton.tpl b/com.woltlab.wcf/templates/__multifactorTotpDeviceNoDeleteButton.tpl similarity index 100% rename from com.woltlab.wcf/templates/__totpDeviceNoDeleteButton.tpl rename to com.woltlab.wcf/templates/__multifactorTotpDeviceNoDeleteButton.tpl diff --git a/com.woltlab.wcf/templates/__totpDeviceNode.tpl b/com.woltlab.wcf/templates/__multifactorTotpDeviceNode.tpl similarity index 100% rename from com.woltlab.wcf/templates/__totpDeviceNode.tpl rename to com.woltlab.wcf/templates/__multifactorTotpDeviceNode.tpl diff --git a/com.woltlab.wcf/templates/__totpDevicesContainer.tpl b/com.woltlab.wcf/templates/__multifactorTotpDevicesContainer.tpl similarity index 100% rename from com.woltlab.wcf/templates/__totpDevicesContainer.tpl rename to com.woltlab.wcf/templates/__multifactorTotpDevicesContainer.tpl diff --git a/com.woltlab.wcf/templates/__totpNewDeviceContainer.tpl b/com.woltlab.wcf/templates/__multifactorTotpNewDeviceContainer.tpl similarity index 100% rename from com.woltlab.wcf/templates/__totpNewDeviceContainer.tpl rename to com.woltlab.wcf/templates/__multifactorTotpNewDeviceContainer.tpl diff --git a/com.woltlab.wcf/templates/__totpSecretField.tpl b/com.woltlab.wcf/templates/__multifactorTotpSecretField.tpl similarity index 100% rename from com.woltlab.wcf/templates/__totpSecretField.tpl rename to com.woltlab.wcf/templates/__multifactorTotpSecretField.tpl diff --git a/wcfsetup/install/files/lib/system/user/multifactor/TotpMultifactorMethod.class.php b/wcfsetup/install/files/lib/system/user/multifactor/TotpMultifactorMethod.class.php index 1344fd257a..6edcddd6f0 100644 --- a/wcfsetup/install/files/lib/system/user/multifactor/TotpMultifactorMethod.class.php +++ b/wcfsetup/install/files/lib/system/user/multifactor/TotpMultifactorMethod.class.php @@ -132,7 +132,7 @@ class TotpMultifactorMethod implements IMultifactorMethod { } else { $button = new class extends FormButton { - protected $templateName = '__totpDeviceNoDeleteButton'; + protected $templateName = '__multifactorTotpDeviceNoDeleteButton'; }; $button->id('no-delete-'.$row['deviceID']) ->label('wcf.global.button.delete'); diff --git a/wcfsetup/install/files/lib/system/user/multifactor/backup/CodeFormField.class.php b/wcfsetup/install/files/lib/system/user/multifactor/backup/CodeFormField.class.php index 51b09aca71..62617bf9fa 100644 --- a/wcfsetup/install/files/lib/system/user/multifactor/backup/CodeFormField.class.php +++ b/wcfsetup/install/files/lib/system/user/multifactor/backup/CodeFormField.class.php @@ -30,7 +30,7 @@ class CodeFormField extends TextFormField { /** * @inheritDoc */ - protected $templateName = '__backupCodeField'; + protected $templateName = '__multifactorBackupCodeField'; public function __construct() { $this->chunks(BackupMultifactorMethod::CHUNKS); diff --git a/wcfsetup/install/files/lib/system/user/multifactor/email/CodeFormField.class.php b/wcfsetup/install/files/lib/system/user/multifactor/email/CodeFormField.class.php index 3e1b384b42..0e288b06b5 100644 --- a/wcfsetup/install/files/lib/system/user/multifactor/email/CodeFormField.class.php +++ b/wcfsetup/install/files/lib/system/user/multifactor/email/CodeFormField.class.php @@ -20,7 +20,7 @@ class CodeFormField extends TextFormField { /** * @inheritDoc */ - protected $templateName = '__emailCodeField'; + protected $templateName = '__multifactorEmailCodeField'; public function __construct() { $this->minimumLength(EmailMultifactorMethod::LENGTH); diff --git a/wcfsetup/install/files/lib/system/user/multifactor/totp/CodeFormField.class.php b/wcfsetup/install/files/lib/system/user/multifactor/totp/CodeFormField.class.php index ddc9528ca5..35aed91541 100644 --- a/wcfsetup/install/files/lib/system/user/multifactor/totp/CodeFormField.class.php +++ b/wcfsetup/install/files/lib/system/user/multifactor/totp/CodeFormField.class.php @@ -19,7 +19,7 @@ class CodeFormField extends TextFormField { /** * @inheritDoc */ - protected $templateName = '__totpCodeField'; + protected $templateName = '__multifactorTotpCodeField'; /** * @var ?int diff --git a/wcfsetup/install/files/lib/system/user/multifactor/totp/DeviceNode.class.php b/wcfsetup/install/files/lib/system/user/multifactor/totp/DeviceNode.class.php index 82027d21bb..8fbb393530 100644 --- a/wcfsetup/install/files/lib/system/user/multifactor/totp/DeviceNode.class.php +++ b/wcfsetup/install/files/lib/system/user/multifactor/totp/DeviceNode.class.php @@ -31,7 +31,7 @@ class DeviceNode implements IFormChildNode, IFormParentNode { /** * @inheritDoc */ - protected $templateName = '__totpDeviceNode'; + protected $templateName = '__multifactorTotpDeviceNode'; /** * @inheritDoc diff --git a/wcfsetup/install/files/lib/system/user/multifactor/totp/DevicesContainer.class.php b/wcfsetup/install/files/lib/system/user/multifactor/totp/DevicesContainer.class.php index 3692f2eb6a..117b0519df 100644 --- a/wcfsetup/install/files/lib/system/user/multifactor/totp/DevicesContainer.class.php +++ b/wcfsetup/install/files/lib/system/user/multifactor/totp/DevicesContainer.class.php @@ -25,7 +25,7 @@ class DevicesContainer extends FormContainer { /** * @inheritDoc */ - protected $templateName = '__totpDevicesContainer'; + protected $templateName = '__multifacatorTotpDevicesContainer'; /** * @inheritDoc diff --git a/wcfsetup/install/files/lib/system/user/multifactor/totp/NewDeviceContainer.class.php b/wcfsetup/install/files/lib/system/user/multifactor/totp/NewDeviceContainer.class.php index b3cf109a02..34434d27ce 100644 --- a/wcfsetup/install/files/lib/system/user/multifactor/totp/NewDeviceContainer.class.php +++ b/wcfsetup/install/files/lib/system/user/multifactor/totp/NewDeviceContainer.class.php @@ -18,7 +18,7 @@ class NewDeviceContainer extends FormContainer { /** * @inheritDoc */ - protected $templateName = '__totpNewDeviceContainer'; + protected $templateName = '__multifactorTotpNewDeviceContainer'; /** * @inheritDoc diff --git a/wcfsetup/install/files/lib/system/user/multifactor/totp/SecretFormField.class.php b/wcfsetup/install/files/lib/system/user/multifactor/totp/SecretFormField.class.php index c935f50698..30813842b0 100644 --- a/wcfsetup/install/files/lib/system/user/multifactor/totp/SecretFormField.class.php +++ b/wcfsetup/install/files/lib/system/user/multifactor/totp/SecretFormField.class.php @@ -20,7 +20,7 @@ class SecretFormField extends AbstractFormField { /** * @inheritDoc */ - protected $templateName = '__totpSecretField'; + protected $templateName = '__multifactorTotpSecretField'; public function __construct() { $this->value(Totp::generateSecret()); -- 2.20.1