diff options
Diffstat (limited to 'srcs/phpmyadmin/templates/login')
10 files changed, 67 insertions, 0 deletions
diff --git a/srcs/phpmyadmin/templates/login/footer.twig b/srcs/phpmyadmin/templates/login/footer.twig new file mode 100644 index 0000000..d9e9659 --- /dev/null +++ b/srcs/phpmyadmin/templates/login/footer.twig @@ -0,0 +1,4 @@ +</div> +{% if check_timeout == true %} + </div> +{% endif %} diff --git a/srcs/phpmyadmin/templates/login/header.twig b/srcs/phpmyadmin/templates/login/header.twig new file mode 100644 index 0000000..a21dee5 --- /dev/null +++ b/srcs/phpmyadmin/templates/login/header.twig @@ -0,0 +1,16 @@ +{% if session_expired == true %} + <div id="modalOverlay"> +{% endif %} +<div class="container{{ add_class }}"> +<a href="{{ 'https://www.phpmyadmin.net/'|link }}" target="_blank" rel="noopener noreferrer" class="logo"> +<img src="{{ theme.getImgPath('logo_right.png', 'pma_logo.png') }}" id="imLogo" name="imLogo" alt="phpMyAdmin" border="0"> +</a> +<h1>{{ 'Welcome to %s'|trans|format('<bdo dir="ltr" lang="en">phpMyAdmin</bdo>')|raw }}</h1> + +<noscript> +{{ "Javascript must be enabled past this point!"|trans|error }} +</noscript> + +<div class="hide" id="js-https-mismatch"> +{{ "There is a mismatch between HTTPS indicated on the server and client. This can lead to a non working phpMyAdmin or a security risk. Please fix your server configuration to indicate HTTPS properly."|trans|error }} +</div> diff --git a/srcs/phpmyadmin/templates/login/twofactor.twig b/srcs/phpmyadmin/templates/login/twofactor.twig new file mode 100644 index 0000000..af2bae3 --- /dev/null +++ b/srcs/phpmyadmin/templates/login/twofactor.twig @@ -0,0 +1,7 @@ +<form method="post" class="disableAjax"> + {{ get_hidden_inputs() }} + {{ form|raw }} + {% if show_submit %} + <input class="btn btn-primary" type="submit" value="{% trans "Verify" %}"> + {% endif %} +</form> diff --git a/srcs/phpmyadmin/templates/login/twofactor/application.twig b/srcs/phpmyadmin/templates/login/twofactor/application.twig new file mode 100644 index 0000000..3077e03 --- /dev/null +++ b/srcs/phpmyadmin/templates/login/twofactor/application.twig @@ -0,0 +1,4 @@ +<p> +<label>{% trans "Authentication code:" %} <input type="text" name="2fa_code" autocomplete="off"></label> +</p> +<p>{% trans "Open the two-factor authentication app on your device to view your authentication code and verify your identity." %}</p> diff --git a/srcs/phpmyadmin/templates/login/twofactor/application_configure.twig b/srcs/phpmyadmin/templates/login/twofactor/application_configure.twig new file mode 100644 index 0000000..e823bb3 --- /dev/null +++ b/srcs/phpmyadmin/templates/login/twofactor/application_configure.twig @@ -0,0 +1,17 @@ +{{ get_hidden_inputs() }} +<p> + {% trans "Please scan following QR code into the two-factor authentication app on your device and enter authentication code it generates." %} +</p> +<p> + {% if has_imagick %} + <img src="{{ image }}"> + {% else %} + {{ image|raw }} + {% endif %} +</p> +<p> + {% trans "Secret/key:" %} <strong>{{ secret }}</strong> +</p> +<p> + <label>{% trans "Authentication code:" %} <input type="text" name="2fa_code" autocomplete="off"></label> +</p> diff --git a/srcs/phpmyadmin/templates/login/twofactor/invalid.twig b/srcs/phpmyadmin/templates/login/twofactor/invalid.twig new file mode 100644 index 0000000..568dd94 --- /dev/null +++ b/srcs/phpmyadmin/templates/login/twofactor/invalid.twig @@ -0,0 +1,3 @@ +<div class="error"> +{% trans "The configured two factor authentication is not available, please install missing dependencies." %} +</div> diff --git a/srcs/phpmyadmin/templates/login/twofactor/key-https-warning.twig b/srcs/phpmyadmin/templates/login/twofactor/key-https-warning.twig new file mode 100644 index 0000000..d3f9c04 --- /dev/null +++ b/srcs/phpmyadmin/templates/login/twofactor/key-https-warning.twig @@ -0,0 +1,5 @@ +{% if not is_https %} +<div class="error"> +{% trans "You are not using https to access phpMyAdmin, therefore FIDO U2F device will most likely refuse to authenticate you." %} +</div> +{% endif %} diff --git a/srcs/phpmyadmin/templates/login/twofactor/key.twig b/srcs/phpmyadmin/templates/login/twofactor/key.twig new file mode 100644 index 0000000..79ade47 --- /dev/null +++ b/srcs/phpmyadmin/templates/login/twofactor/key.twig @@ -0,0 +1,5 @@ +{% include 'login/twofactor/key-https-warning.twig' %} +<p> +{% trans "Please connect your FIDO U2F device into your computer's USB port. Then confirm login on the device." %} +</p> +<input id="u2f_authentication_response" name="u2f_authentication_response" value="" type="hidden" data-request="{{ request }}"> diff --git a/srcs/phpmyadmin/templates/login/twofactor/key_configure.twig b/srcs/phpmyadmin/templates/login/twofactor/key_configure.twig new file mode 100644 index 0000000..8b502dc --- /dev/null +++ b/srcs/phpmyadmin/templates/login/twofactor/key_configure.twig @@ -0,0 +1,5 @@ +{% include 'login/twofactor/key-https-warning.twig' %} +<p> +{% trans "Please connect your FIDO U2F device into your computer's USB port. Then confirm registration on the device." %} +</p> +<input id="u2f_registration_response" name="u2f_registration_response" value="" type="hidden" data-request="{{ request }}" data-signatures="{{ signatures }}"> diff --git a/srcs/phpmyadmin/templates/login/twofactor/simple.twig b/srcs/phpmyadmin/templates/login/twofactor/simple.twig new file mode 100644 index 0000000..eeae140 --- /dev/null +++ b/srcs/phpmyadmin/templates/login/twofactor/simple.twig @@ -0,0 +1 @@ +<input type="hidden" name="2fa_confirm" value="1"> |
