-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #236 from silinternational/feature/ss2-promptmfa-twig
convert prompt-for-mfa templates to Twig
- Loading branch information
Showing
14 changed files
with
441 additions
and
471 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{% if otherOptions|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"> | ||
<span class="mdl-typography--caption"> | ||
{{ '{mfa:use_others}'|trans }} | ||
</span> | ||
</button> | ||
<ul class="mdl-menu mdl-js-menu mdl-menu--top-left" data-mdl-for="others"> | ||
{% for option in otherOptions %} | ||
{# TODO: Non-interactive elements should not be assigned mouse or keyboard event listeners. #} | ||
<li class="mdl-menu__item" onclick="location.href = '{{ option.callback|raw }}'"> | ||
<span class="mdl-list__item-primary-content"> | ||
<img | ||
class="mdl-list__item-icon" | ||
src="{{ option.image }}" | ||
{% set alt = '{mfa:' ~ option.type ~ '_icon}' %} | ||
alt="{{ alt|trans }}" | ||
> | ||
{% set text = '{mfa:use_' ~ option.label ~ '}' %} | ||
{{ text|trans }} | ||
</span> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
{% endif %} |
This file was deleted.
Oops, something went wrong.
92 changes: 0 additions & 92 deletions
92
modules/material/themes/material/mfa/prompt-for-mfa-backupcode.php
This file was deleted.
Oops, something went wrong.
83 changes: 83 additions & 0 deletions
83
modules/material/themes/material/mfa/prompt-for-mfa-backupcode.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<!DOCTYPE html> | ||
<html lang="{{ currentLanguage }}"> | ||
<head> | ||
<title>{{ '{mfa:title}'|trans }}</title> | ||
|
||
{% include 'header.twig' %} | ||
</head> | ||
<body class="gradient-bg"> | ||
<div class="mdl-layout mdl-layout--fixed-header fill-viewport"> | ||
<header class="mdl-layout__header"> | ||
<div class="mdl-layout__header-row"> | ||
<span class="mdl-layout-title"> | ||
{{ '{mfa:header}'|trans }} | ||
</span> | ||
</div> | ||
</header> | ||
<main class="mdl-layout__content" layout-children="column"> | ||
<form layout-children="column" method="post" autocomplete="off"> | ||
<div class="mdl-card mdl-shadow--8dp"> | ||
<div class="mdl-card__media white-bg margin" layout-children="column"> | ||
<img src="mfa-backupcode.svg" class="icon" alt="{{ '{mfa:backupcode_icon}'|trans }}"> | ||
</div> | ||
|
||
<div class="mdl-card__title center"> | ||
<h1 class="mdl-card__title-text"> | ||
{{ '{mfa:backupcode_header}'|trans }} | ||
</h1> | ||
</div> | ||
|
||
<div class="mdl-card__title center"> | ||
<p class="mdl-card__subtitle-text"> | ||
{{ '{mfa:backupcode_reminder}'|trans }} | ||
</p> | ||
</div> | ||
|
||
<div class="mdl-card__supporting-text" layout-children="column"> | ||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"> | ||
<label for="mfaSubmission" class="mdl-textfield__label"> | ||
{{ '{mfa:backupcode_input}'|trans }} | ||
</label> | ||
<input name="mfaSubmission" class="mdl-textfield__input mdl-color-text--black" autofocus id="mfaSubmission"> | ||
</div> | ||
</div> | ||
|
||
{% if not errorMessage is empty %} | ||
<div class="mdl-card__supporting-text" layout-children="column"> | ||
<p class="mdl-color-text--red error"> | ||
<i class="material-icons">error</i> | ||
|
||
<span class="mdl-typography--caption"> | ||
{{ errorMessage|e }} | ||
</span> | ||
</p> | ||
</div> | ||
|
||
<script> | ||
ga('send', 'event', 'error', 'backupcode','{{ errorMessage|e('js')|raw }}'); | ||
</script> | ||
{% endif %} | ||
|
||
<div class="mdl-card__actions" layout-children="row"> | ||
<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> | ||
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect"> | ||
<span class="mdl-checkbox__label"> | ||
{{ '{mfa:remember_this}'|trans }} | ||
</span> | ||
<input type="checkbox" name="rememberMe" checked class="mdl-checkbox__input"> | ||
</label> | ||
</div> | ||
</form> | ||
</main> | ||
</div> | ||
</body> | ||
</html> |
89 changes: 0 additions & 89 deletions
89
modules/material/themes/material/mfa/prompt-for-mfa-manager.php
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.