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