Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 1 | {% extends 'base.twig' %} |
| 2 | |
| 3 | {% block navbar %}{% endblock %} |
| 4 | |
| 5 | {% block content %} |
| 6 | <div class="row"> |
| 7 | <div class="col-md-offset-3 col-md-6"> |
| 8 | <div class="panel panel-default panel-login"> |
| 9 | <div class="panel-heading"><i class="bi bi-person-fill"></i> {{ lang.login.login }}</div> |
| 10 | <div class="panel-body"> |
| 11 | <div class="text-center mailcow-logo"><img src="{{ logo|default('/img/cow_mailcow.svg') }}" alt="mailcow"></div> |
| 12 | {% if ui_texts.ui_announcement_text and ui_texts.ui_announcement_active %} |
| 13 | <div class="alert alert-{{ ui_texts.ui_announcement_type }} rot-enc ui-announcement-alert">{{ ui_texts.ui_announcement_text|rot13 }}</div> |
| 14 | {% endif %} |
| 15 | <legend>{% if oauth2_request %}{{ lang.oauth2.authorize_app }}{% else %}{{ ui_texts.main_name|raw }}{% endif %}</legend> |
| 16 | {% if is_mobileconfig %} |
| 17 | <div class="alert alert-info">{{ lang.login.mobileconfig_info }}</div> |
| 18 | {% endif %} |
| 19 | <form method="post" autofill="off"> |
| 20 | <div class="form-group"> |
| 21 | <label class="sr-only" for="login_user">{{ lang.login.username }}</label> |
| 22 | <div class="input-group"> |
| 23 | <div class="input-group-addon"><i class="bi bi-person-fill"></i></div> |
| 24 | <input name="login_user" autocorrect="off" autocapitalize="none" type="{% if is_mobileconfig %}email{% else %}text{% endif %}" id="login_user" class="form-control" placeholder="{{ lang.login.username }}" required="" autofocus="" autocomplete="username"> |
| 25 | </div> |
| 26 | </div> |
| 27 | <div class="form-group"> |
| 28 | <label class="sr-only" for="pass_user">{{ lang.login.password }}</label> |
| 29 | <div class="input-group"> |
| 30 | <div class="input-group-addon"><i class="bi bi-lock-fill"></i></div> |
| 31 | <input name="pass_user" type="password" id="pass_user" class="form-control" placeholder="{{ lang.login.password }}" required="" autocomplete="current-password"> |
| 32 | </div> |
| 33 | </div> |
| 34 | <div class="form-group" style="position: relative"> |
| 35 | <div class="btn-group"> |
| 36 | <div class="btn-group"> |
| 37 | <button type="submit" class="btn btn-xs-lg btn-success" value="Login">{{ lang.login.login }}</button> |
| 38 | <button type="button" class="btn btn-xs-lg btn-success dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
| 39 | <span class="caret"></span> |
| 40 | </button> |
| 41 | <ul class="dropdown-menu"> |
| 42 | <li><a href="#" id="fido2-login" style="line-height:1.4;"><i class="bi bi-shield-fill-check"></i> {{ lang.login.fido2_webauthn }}</a></li> |
| 43 | </ul> |
| 44 | </div> |
| 45 | </div> |
| 46 | {% if not oauth2_request %} |
| 47 | <button type="button" {% if available_languages|length == 1 %}disabled="true"{% endif %} class="btn btn-xs-lg btn-default pull-right dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
| 48 | <span class="flag-icon flag-icon-{{ mailcow_locale }}"></span> <span class="caret"></span> |
| 49 | </button> |
| 50 | <ul class="dropdown-menu pull-right login"> |
| 51 | {% for key, val in available_languages %} |
| 52 | <li{% if mailcow_locale == key %} class="active"{% endif %}> |
| 53 | <a href="?{{ query_string({'lang': key}) }}"> |
| 54 | <span class="flag-icon flag-icon-{{ key }}"></span>{{ val }} |
| 55 | </a> |
| 56 | </li> |
| 57 | {% endfor %} |
| 58 | </ul> |
| 59 | {% endif %} |
| 60 | <div class="clearfix"></div> |
| 61 | </div> |
| 62 | </form> |
| 63 | {% if login_delay %} |
| 64 | <p><div class="alert alert-info">{{ lang.login.delayed|format(login_delay) }}</b></div></p> |
| 65 | {% endif %} |
| 66 | <div id="fido2-alerts"></div> |
| 67 | {% if not oauth2_request and (mailcow_apps or app_links) %} |
| 68 | <legend><i class="bi bi-link-45deg"></i> {{ ui_texts.apps_name|raw }}</legend> |
| 69 | <div class="apps"> |
| 70 | {% for app in mailcow_apps %} |
| 71 | {% if not skip_sogo or not is_uri('SOGo', app.link) %} |
| 72 | <div class="media-clearfix"> |
| 73 | <a href="{{ app.link }}" role="button" {% if app.description %}title="{{ app.description }}"{% endif %} class="btn btn-primary btn-lg btn-block">{{ app.name }}</a> |
| 74 | </div> |
| 75 | {% endif %} |
| 76 | {% endfor %} |
| 77 | {% for row in app_links %} |
| 78 | {% for key, val in row %} |
| 79 | <div class="media-clearfix"> |
| 80 | <a href="{{ val }}" role="button" class="btn btn-primary btn-lg btn-block">{{ key }}</a> |
| 81 | </div> |
| 82 | {% endfor %} |
| 83 | {% endfor %} |
| 84 | </div> |
| 85 | {% endif %} |
| 86 | </div> |
| 87 | </div> |
| 88 | </div> |
| 89 | {% if not oauth2_request %} |
| 90 | <div class="col-md-offset-3 col-md-6"> |
| 91 | <div class="panel panel-default"> |
| 92 | <div class="panel-heading"> |
| 93 | <a data-toggle="collapse" href="#collapse1"><i class="bi bi-patch-question-fill"></i> {{ lang.start.help }}</a> |
| 94 | </div> |
| 95 | <div id="collapse1" class="panel-collapse collapse"> |
| 96 | <div class="panel-body"> |
| 97 | {% if ui_texts.help_text %} |
| 98 | <p>{{ ui_texts.help_text|raw }}</p> |
| 99 | {% else %} |
| 100 | <p><span style="border-bottom: 1px dotted #999;">{{ ui_texts.main_name|raw }}</span></p> |
| 101 | <p>{{ lang.start.mailcow_panel_detail|raw }}</p> |
| 102 | <p><span style="border-bottom: 1px dotted #999;">{{ ui_texts.apps_name|raw }}</span></p> |
| 103 | <p>{{ lang.start.mailcow_apps_detail|raw }}</p> |
| 104 | {% endif %} |
| 105 | </div> |
| 106 | </div> |
| 107 | </div> |
| 108 | </div> |
| 109 | {% endif %} |
| 110 | </div> |
| 111 | {% endblock %} |