Skip to content

Commit

Permalink
Merge pull request #306 from silinternational/improve-mfa-card-layout
Browse files Browse the repository at this point in the history
move options to card actions so menu doesn't overflow and use mdl-but…
  • Loading branch information
hobbitronics authored Feb 6, 2025
2 parents 783252e + 053a2b1 commit 59a1dcd
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion features/fakes/FakeIdBrokerClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function mfaList(string $employee_id): array
[
'id' => 2,
'type' => 'totp',
'label' => 'Smartphone App',
'label' => 'Authenticator App',
'created_utc' => '2019-04-02T16:02:14Z',
'last_used_utc' => '2019-04-01T00:00:00Z',
'data' => [
Expand Down
2 changes: 1 addition & 1 deletion modules/material/locales/fr/LC_MESSAGES/material.po
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ msgid "{mfa:totp_header}"
msgstr "Obtenez un code depuis votre application d'authentification"

msgid "{mfa:totp_icon}"
msgstr "Icône de l'application Smartphone"
msgstr "Icône de l'application d'authentification"

msgid "{mfa:totp_input}"
msgstr "Entrer le code à 6 chiffres"
Expand Down
2 changes: 1 addition & 1 deletion modules/material/themes/material/default/other_mfas.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{% if other_options|length > 0 %}
<div layout-children="column" child-spacing="center">
{# used type=button to avoid form submission on click since this is just used to display the ul #}
<button id="others" type="button" class="mdl-button mdl-js-button">
<button id="others" type="button" class="mdl-button mdl-js-button mdl-button--raised">
<span class="mdl-typography--caption">
{{ '{mfa:use_others}'|trans }}
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,14 @@
{% endif %}

<div class="mdl-card__actions" layout-children="row">
{{ include('other_mfas.twig') }}

<span flex></span>

<button name="submitMfa" class="mdl-button mdl-button--raised mdl-button--primary">
{{ '{mfa:button_verify}'|trans }}
</button>
</div>

{{ include('other_mfas.twig') }}
</div>

<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,14 @@
{% endif %}

<div class="mdl-card__actions" layout-children="row">
{{ include('other_mfas.twig') }}

<span flex></span>

<button name="submitMfa" type="submit" class="mdl-button mdl-button--raised mdl-button--primary">
{{ '{mfa:button_verify}'|trans }}
</button>
</div>

{{ include('other_mfas.twig') }}
</div>

<div>
Expand Down
5 changes: 3 additions & 2 deletions modules/material/themes/material/mfa/prompt-for-mfa-totp.twig
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,14 @@
{% endif %}

<div class="mdl-card__actions" layout-children="row">
{{ include('other_mfas.twig') }}

<span flex></span>

<button name="submitMfa" type="submit" class="mdl-button mdl-button--raised mdl-button--primary">
{{ '{mfa:button_verify}'|trans }}
</button>
</div>

{{ include('other_mfas.twig') }}
</div>

<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,20 @@
</div>

<div class="mdl-card__actions" layout-children="row">
{{ include('other_mfas.twig') }}

<span flex></span>

<!-- used type=button to avoid form submission on click -->
<button
id="verifyBtn"
type="button"
class="mdl-button {{ error_message is empty ? 'mdl-color-text--primary' : 'mdl-color-text--red' }}"
class="mdl-button mdl-button--raised {{ error_message is empty ? 'mdl-color-text--primary' : 'mdl-color-text--red' }}"
>
{{ error_message is empty ? 'ok' : '{mfa:button_try_again}'|trans }}
</button>

</div>

{{ include('other_mfas.twig') }}
</div>

<div>
Expand Down

0 comments on commit 59a1dcd

Please sign in to comment.