jumpserver/apps/templates/_message.html

78 lines
3.6 KiB
HTML
Raw Normal View History

2017-12-13 09:21:08 +00:00
{% load i18n %}
{% block user_expired_message %}
{% if request.user.is_expired %}
<div class="alert alert-danger help-message alert-dismissable">
{% blocktrans %}
Your account has expired, please contact the administrator.
{% endblocktrans %}
<button aria-hidden="true" data-dismiss="alert" class="close" type="button" style="outline: none;">×</button>
</div>
{% elif request.user.will_expired %}
<div class="alert alert-danger help-message alert-dismissable">
{% trans 'Your account will at' %} {{ request.user.date_expired }} {% trans 'expired. ' %}
<button aria-hidden="true" data-dismiss="alert" class="close" type="button" style="outline: none;">×</button>
</div>
{% endif %}
{% endblock %}
{% block password_expired_message %}
{% url 'users:user-password-update' as user_password_update_url %}
{% if request.user.password_has_expired %}
<div class="alert alert-danger help-message alert-dismissable">
{% blocktrans %}
Your password has expired, please click <a href="{{ user_password_update_url }}"> this link </a> update password.
{% endblocktrans %}
<button aria-hidden="true" data-dismiss="alert" class="close" type="button" style="outline: none;">×</button>
</div>
{% elif request.user.password_will_expired %}
<div class="alert alert-danger help-message alert-dismissable">
{% trans 'Your password will at' %} {{ request.user.date_password_expired }} {% trans 'expired. ' %}
{% blocktrans %}
please click <a href="{{ user_password_update_url }}"> this link </a> to update your password.
{% endblocktrans %}
<button aria-hidden="true" data-dismiss="alert" class="close" type="button" style="outline: none;">×</button>
</div>
{% endif %}
{% endblock %}
2017-12-13 09:21:08 +00:00
{% block first_login_message %}
{% if request.user.is_authenticated and request.user.is_first_login %}
2018-02-25 14:36:42 +00:00
<div class="alert alert-danger help-message alert-dismissable">
2017-12-13 09:21:08 +00:00
{% url 'users:user-first-login' as first_login_url %}
{% blocktrans %}
Your information was incomplete. Please click <a href="{{ first_login_url }}"> this link </a>to complete your information.
{% endblocktrans %}
<button aria-hidden="true" data-dismiss="alert" class="close" type="button" style="outline: none;">×</button>
2017-12-13 09:21:08 +00:00
</div>
{% endif %}
{% endblock %}
2018-04-23 13:04:46 +00:00
2017-12-13 09:21:08 +00:00
{% block update_public_key_message %}
2018-02-25 14:36:42 +00:00
{% if request.user.is_authenticated and not request.user.is_public_key_valid and not request.COOKIE.close_public_key_msg != '1' %}
<div class="alert alert-danger help-message alert-dismissable">
<button aria-hidden="true" data-dismiss="alert" class="close" type="button" onclick="closePublicKeyMsg()">×</button>
2017-12-13 09:21:08 +00:00
{% url 'users:user-pubkey-update' as user_pubkey_update %}
2018-01-01 07:08:33 +00:00
{% blocktrans %}
Your ssh public key not set or expired. Please click <a href="{{ user_pubkey_update }}"> this link </a>to update
{% endblocktrans %}
2017-12-13 09:21:08 +00:00
</div>
{% endif %}
{% endblock %}
2016-09-03 11:05:50 +00:00
{% if messages %}
{% for message in messages %}
2017-12-12 04:19:45 +00:00
<div class="alert alert-{{ message.tags }} help-message" >
{# {{ message|safe }}#}
{{ message }}
<button aria-hidden="true" data-dismiss="alert" class="close" type="button" style="outline: none;">×</button>
2016-09-03 11:05:50 +00:00
</div>
2016-09-03 11:05:50 +00:00
{% endfor %}
{% endif %}
2018-02-25 14:36:42 +00:00
<script>
function closePublicKeyMsg() {
setCookie('close_public_key_msg', 1)
}
</script>