2021-09-22 20:47:10 +02:00
|
|
|
{% extends 'base.twig' %}
|
|
|
|
|
|
|
|
{% block navbar %}{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2022-07-06 16:55:31 +02:00
|
|
|
<div class="row mb-4" style="margin-top: 60px">
|
2022-03-31 20:16:44 +02:00
|
|
|
<div class="col-12 col-md-7 col-lg-6 col-xl-5 ms-auto me-auto">
|
2022-04-01 08:26:37 +02:00
|
|
|
<div class="card">
|
2022-09-27 12:30:10 +02:00
|
|
|
<div class="card-header d-flex align-items-center">
|
|
|
|
<i class="bi bi-person-fill me-2"></i> {{ lang.login.login }}
|
2022-06-23 16:34:58 +02:00
|
|
|
<div class="ms-auto form-check form-switch my-auto d-flex align-items-center">
|
|
|
|
<label class="form-check-label"><i class="bi bi-moon-fill"></i></label>
|
|
|
|
<input class="form-check-input ms-2" type="checkbox" id="dark-mode-toggle">
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-31 11:37:14 +02:00
|
|
|
<div class="card-body">
|
2023-09-03 18:49:12 +02:00
|
|
|
<div class="text-center mailcow-logo mb-4">
|
|
|
|
<img class="main-logo" src="{{ logo|default('/img/cow_mailcow.svg') }}" alt="mailcow">
|
|
|
|
<img class="main-logo-dark" src="{{ logo_dark|default('/img/cow_mailcow.svg') }}" alt="mailcow-logo-dark">
|
|
|
|
</div>
|
2021-10-15 17:18:26 +02:00
|
|
|
{% if ui_texts.ui_announcement_text and ui_texts.ui_announcement_active %}
|
2022-04-13 12:35:04 +02:00
|
|
|
<div class="my-4 alert alert-{{ ui_texts.ui_announcement_type }} rot-enc ui-announcement-alert">{{ ui_texts.ui_announcement_text|rot13 }}</div>
|
2021-09-22 20:47:10 +02:00
|
|
|
{% endif %}
|
2022-03-31 12:57:33 +02:00
|
|
|
<legend>{% if oauth2_request %}{{ lang.oauth2.authorize_app }}{% else %}{{ ui_texts.main_name|raw }}{% endif %}</legend><hr />
|
2021-09-22 20:47:10 +02:00
|
|
|
{% if is_mobileconfig %}
|
2022-04-13 12:35:04 +02:00
|
|
|
<div class="my-4 alert alert-info ">{{ lang.login.mobileconfig_info }}</div>
|
2021-09-22 20:47:10 +02:00
|
|
|
{% endif %}
|
|
|
|
<form method="post" autofill="off">
|
2022-06-06 20:38:24 +02:00
|
|
|
<div class="d-flex mt-3">
|
2022-03-31 13:24:18 +02:00
|
|
|
<label class="visually-hidden" for="login_user">{{ lang.login.username }}</label>
|
2021-09-22 20:47:10 +02:00
|
|
|
<div class="input-group">
|
2022-03-31 12:41:50 +02:00
|
|
|
<div class="input-group-text"><i class="bi bi-person-fill"></i></div>
|
2021-09-22 20:47:10 +02:00
|
|
|
<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">
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-06-06 20:38:24 +02:00
|
|
|
<div class="d-flex mt-3">
|
2022-03-31 13:24:18 +02:00
|
|
|
<label class="visually-hidden" for="pass_user">{{ lang.login.password }}</label>
|
2021-09-22 20:47:10 +02:00
|
|
|
<div class="input-group">
|
2022-03-31 12:41:50 +02:00
|
|
|
<div class="input-group-text"><i class="bi bi-lock-fill"></i></div>
|
2021-09-22 20:47:10 +02:00
|
|
|
<input name="pass_user" type="password" id="pass_user" class="form-control" placeholder="{{ lang.login.password }}" required="" autocomplete="current-password">
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-09-03 18:34:20 +02:00
|
|
|
<div class="d-flex justify-content-between mt-4" style="position: relative">
|
|
|
|
<div class="d-grid gap-2 d-sm-block">
|
|
|
|
<button type="submit" class="btn btn-xs-lg btn-success" value="Login">{{ lang.login.login }}</button>
|
|
|
|
<button type="button" class="btn btn-xs-lg btn-success" id="fido2-login"><i class="bi bi-shield-fill-check"></i> {{ lang.login.fido2_webauthn }}</button>
|
|
|
|
</div>
|
2021-09-22 20:47:10 +02:00
|
|
|
{% if not oauth2_request %}
|
2023-09-03 18:34:20 +02:00
|
|
|
<div class="d-grid d-sm-block">
|
|
|
|
<button type="button" {% if available_languages|length == 1 %}disabled="true"{% endif %} class="btn btn-secondary ms-auto dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
2022-10-20 11:07:56 +02:00
|
|
|
<span class="flag-icon flag-icon-{{ mailcow_locale[-2:] }}"></span>
|
2021-09-22 20:47:10 +02:00
|
|
|
</button>
|
2022-03-31 13:24:18 +02:00
|
|
|
<ul class="dropdown-menu ms-auto login">
|
2021-09-22 20:47:10 +02:00
|
|
|
{% for key, val in available_languages %}
|
2022-10-20 11:07:56 +02:00
|
|
|
<li>
|
|
|
|
<a class="dropdown-item {% if mailcow_locale == key %}active{% endif %}" href="?{{ query_string({'lang': key}) }}">
|
2022-10-20 10:58:51 +02:00
|
|
|
<span class="flag-icon flag-icon-{{ key[-2:] }}"></span>{{ val }}
|
2021-09-22 20:47:10 +02:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2023-09-03 18:34:20 +02:00
|
|
|
</div>
|
2021-09-22 20:47:10 +02:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{% if login_delay %}
|
2022-04-13 12:35:04 +02:00
|
|
|
<p><div class="my-4 alert alert-info">{{ lang.login.delayed|format(login_delay) }}</b></div></p>
|
2021-09-22 20:47:10 +02:00
|
|
|
{% endif %}
|
2022-04-13 12:35:04 +02:00
|
|
|
<div class="my-4" id="fido2-alerts"></div>
|
2021-10-24 12:42:08 +02:00
|
|
|
{% if not oauth2_request and (mailcow_apps or app_links) %}
|
2022-03-31 12:57:33 +02:00
|
|
|
<legend><i class="bi bi-link-45deg"></i> {{ ui_texts.apps_name|raw }}</legend><hr />
|
2023-09-03 18:34:20 +02:00
|
|
|
<div class="my-2 d-grid gap-2 d-sm-block apps">
|
2021-09-22 20:47:10 +02:00
|
|
|
{% for app in mailcow_apps %}
|
|
|
|
{% if not skip_sogo or not is_uri('SOGo', app.link) %}
|
2023-09-03 18:34:20 +02:00
|
|
|
<a href="{{ app.link }}" role="button" {% if app.description %}title="{{ app.description }}"{% endif %} class="btn btn-primary">{{ app.name }}</a>
|
|
|
|
{% endif %}
|
2021-09-22 20:47:10 +02:00
|
|
|
{% endfor %}
|
|
|
|
{% for row in app_links %}
|
|
|
|
{% for key, val in row %}
|
2023-09-03 18:34:20 +02:00
|
|
|
<a href="{{ val }}" role="button" class="btn btn-primary">{{ key }}</a>
|
2021-09-22 20:47:10 +02:00
|
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-31 20:16:44 +02:00
|
|
|
</div>
|
|
|
|
{% if not oauth2_request %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12 col-md-7 col-lg-6 col-xl-5 ms-auto me-auto">
|
2022-04-01 08:26:37 +02:00
|
|
|
<div class="card">
|
2022-03-31 11:37:14 +02:00
|
|
|
<div class="card-header">
|
2022-03-31 20:16:44 +02:00
|
|
|
<a class="btn btn-link" data-bs-toggle="collapse" href="#collapse1"><i class="bi bi-patch-question-fill"></i> {{ lang.start.help }}</a>
|
2021-09-22 20:47:10 +02:00
|
|
|
</div>
|
2022-03-31 11:37:14 +02:00
|
|
|
<div id="collapse1" class="card-collapse collapse">
|
|
|
|
<div class="card-body">
|
2021-09-22 20:47:10 +02:00
|
|
|
{% if ui_texts.help_text %}
|
|
|
|
<p>{{ ui_texts.help_text|raw }}</p>
|
|
|
|
{% else %}
|
2021-10-19 10:39:22 +02:00
|
|
|
<p><span style="border-bottom: 1px dotted #999;">{{ ui_texts.main_name|raw }}</span></p>
|
2021-09-22 20:47:10 +02:00
|
|
|
<p>{{ lang.start.mailcow_panel_detail|raw }}</p>
|
2021-10-19 10:39:22 +02:00
|
|
|
<p><span style="border-bottom: 1px dotted #999;">{{ ui_texts.apps_name|raw }}</span></p>
|
2021-09-22 20:47:10 +02:00
|
|
|
<p>{{ lang.start.mailcow_apps_detail|raw }}</p>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|