From ae4b5b7568a992fd7a25a3e4773dcfd00798fc61 Mon Sep 17 00:00:00 2001 From: philippe Date: Wed, 13 Mar 2024 14:41:28 +0100 Subject: [PATCH] Implement #515 and #521 --- demo/app/Sharp/Demo2faNotificationHandler.php | 5 +++-- docs/guide/building-show-page.md | 7 +++++++ resources/lang/en/auth.php | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/demo/app/Sharp/Demo2faNotificationHandler.php b/demo/app/Sharp/Demo2faNotificationHandler.php index 8a109b575..f24ab7e5b 100644 --- a/demo/app/Sharp/Demo2faNotificationHandler.php +++ b/demo/app/Sharp/Demo2faNotificationHandler.php @@ -19,8 +19,9 @@ protected function generateRandomCode(): int public function formHelpText(): string { return <<<'HTML' -
This user has configured a two-factor authentication.
-
Code was set to 123456
+
This user has configured a two-factor authentication (see documentation).
+
Code was set to 123456 for this demo.
+
Please enter the 6-digit code
HTML; } } diff --git a/docs/guide/building-show-page.md b/docs/guide/building-show-page.md index 69a43f8ce..81bc89498 100644 --- a/docs/guide/building-show-page.md +++ b/docs/guide/building-show-page.md @@ -178,6 +178,13 @@ function buildShowLayout(ShowLayout $showLayout): void Like regular sections, embedded Entity List can be declared *collapsable*. +```php +function buildShowLayout(ShowLayout $showLayout): void +{ + $showLayout->addEntityListSection('members', collapsable: true); +} +``` + ### `find($id): array` As for Forms, the method must return a key-value array: diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php index 4123f27d5..4bea9a9a6 100644 --- a/resources/lang/en/auth.php +++ b/resources/lang/en/auth.php @@ -6,13 +6,13 @@ '2fa' => [ 'validation_error' => 'Please enter a value for the code', 'invalid' => 'This code is invalid', - 'form_help_text' => 'Please enter the 6 figures of the validation code', + 'form_help_text' => 'Please enter the 6-digit validation code', 'notification' => [ 'mail_subject' => 'Your connection code', 'mail_body' => 'Here is the code to enter to connect:', ], 'totp' => [ - 'form_help_text' => 'Please enter the 6 figures of the validation code, or one of your recovery codes that you have not used previously.', + 'form_help_text' => 'Please enter the 6-digit validation code, or one of your recovery codes that you have not used previously.', 'commands' => [ 'activate' => [ 'command_label' => 'Configure two-factor authentication',