"Fossies" - the Fresh Open Source Software Archive

Member "phpMyAdmin-5.1.0-english/templates/preferences/two_factor/main.twig" (24 Feb 2021, 2633 Bytes) of package /linux/www/phpMyAdmin-5.1.0-english.zip:


The requested HTML page contains a <FORM> tag that is unusable on "Fossies" in "automatic" (rendered) mode so that page is shown as HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "main.twig": 5.0.4-english_vs_5.1.0-english.

    1 <div class="row">
    2   <div class="col">
    3     <div class="card mt-4">
    4       <div class="card-header">
    5         {% trans "Two-factor authentication status" %}
    6         {{ show_docu('two_factor') }}
    7       </div>
    8       <div class="card-body">
    9     {% if enabled %}
   10       {% if num_backends == 0 %}
   11         <p>{% trans "Two-factor authentication is not available, please install optional dependencies to enable authentication backends." %}</p>
   12         <p>{% trans "Following composer packages are missing:" %}</p>
   13         <ul>
   14           {% for item in missing %}
   15             <li><code>{{ item.dep }}</code> ({{ item.class }})</li>
   16           {% endfor %}
   17         </ul>
   18       {% else %}
   19         {% if backend_id %}
   20           <p>{% trans "Two-factor authentication is available and configured for this account." %}</p>
   21         {% else %}
   22           <p>{% trans "Two-factor authentication is available, but not configured for this account." %}</p>
   23         {% endif %}
   24       {% endif %}
   25     {% else %}
   26       <p>{% trans "Two-factor authentication is not available, enable phpMyAdmin configuration storage to use it." %}</p>
   27     {% endif %}
   28       </div>
   29     </div>
   30   </div>
   31 </div>
   32 
   33 {% if backend_id %}
   34 <div class="row">
   35   <div class="col">
   36     <div class="card mt-4">
   37       <div class="card-header">
   38         {{ backend_name }}
   39       </div>
   40       <div class="card-body">
   41       <p>{% trans "You have enabled two factor authentication." %}</p>
   42       <p>{{ backend_description }}</p>
   43       <form method="post" action="{{ url('/preferences/two-factor') }}">
   44         {{ get_hidden_inputs() }}
   45         <input class="btn btn-secondary" type="submit" name="2fa_remove" value="
   46           {%- trans "Disable two-factor authentication" %}">
   47       </form>
   48       </div>
   49     </div>
   50   </div>
   51 </div>
   52 {% elseif num_backends > 0 %}
   53 <div class="row">
   54   <div class="col">
   55     <div class="card mt-4">
   56       <div class="card-header">
   57         {% trans "Configure two-factor authentication" %}
   58       </div>
   59       <div class="card-body">
   60       <form method="post" action="{{ url('/preferences/two-factor') }}">
   61         {{ get_hidden_inputs() }}
   62         {% for backend in backends %}
   63           <label class="displayblock">
   64             <input type="radio" name="2fa_configure" value="{{ backend["id"] }}"
   65               {{- backend["id"] == "" ? ' checked' }}>
   66             <strong>{{ backend["name"] }}</strong>
   67             <p>{{ backend["description"] }}</p>
   68           </label>
   69         {% endfor %}
   70         <input class="btn btn-secondary" type="submit" value="{% trans "Configure two-factor authentication" %}">
   71       </form>
   72       </div>
   73     </div>
   74   </div>
   75 </div>
   76 {% endif %}