Skip to content

Commit

Permalink
Implement #515 and #521
Browse files Browse the repository at this point in the history
  • Loading branch information
dvlpp committed Mar 13, 2024
1 parent c52f27e commit ae4b5b7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
5 changes: 3 additions & 2 deletions demo/app/Sharp/Demo2faNotificationHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ protected function generateRandomCode(): int
public function formHelpText(): string
{
return <<<'HTML'
<div>This user has configured a two-factor authentication.</div>
<div class="mt-2">Code was set to <strong>123456</strong></div>
<div style="color: #999">This user has configured a two-factor authentication (<a href="https://sharp.code16.fr/docs/guide/authentication.html#two-factor-authentication" style="text-decoration: underline" target="_blank">see documentation</a>).</div>
<div style="color: #999; margin: .5em 0">Code was set to <strong>123456</strong> for this demo.</div>
<div>Please enter the 6-digit code</div>
HTML;
}
}
7 changes: 7 additions & 0 deletions docs/guide/building-show-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions resources/lang/en/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit ae4b5b7

Please sign in to comment.