diff --git a/apps/member/templates/member/user_list.html b/apps/member/templates/member/user_list.html index d605c4922a357207b330eeef0cebfe9d15b5f761..5156c8b00ba5247cdbc613fc9355166606ee19c5 100644 --- a/apps/member/templates/member/user_list.html +++ b/apps/member/templates/member/user_list.html @@ -1,36 +1,42 @@ {% extends "base.html" %} +{% comment %} +SPDX-License-Identifier: GPL-3.0-or-later +{% endcomment %} {% load render_table from django_tables2 %} -{% load crispy_forms_tags %} -{% load i18n %} -{% load perms %} +{% load i18n crispy_forms_tags perms %} +{% block contenttitle %}{% endblock %} {% block content %} - <input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note/section ..."> +{% if "member.change_profile_registration_valid"|has_perm:user %} +<a class="btn btn-block btn-secondary mb-3" href="{% url 'registration:future_user_list' %}"> + <i class="fas fa-user-plus"></i> {% trans "Registrations" %} +</a> +{% endif %} - <hr> - - <div id="user_table"> - {% if table.data %} +<div class="card bg-light"> + <h3 class="card-header text-center"> + {{ title }} + </h3> + <div class="card-body"> + <input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note/section..."> + </div> + <div class="card-body"> + <div id="user_table"> + {% if table.data %} {% render_table table %} - {% else %} + {% else %} <div class="alert alert-warning"> {% trans "There is no user with this pattern." %} </div> - {% endif %} + {% endif %} + </div> </div> - - <hr> - - {% if "member.change_profile_registration_valid"|has_perm:user %} - <a class="btn btn-block btn-secondary" href="{% url 'registration:future_user_list' %}"> - <i class="fas fa-user-plus"></i> {% trans "Registrations" %} - </a> - {% endif %} +</div> {% endblock %} {% block extrajavascript %} <script type="text/javascript"> - $(document).ready(function() { + $(document).ready(function () { let old_pattern = null; let searchbar_obj = $("#searchbar"); var timer_on = false; @@ -45,7 +51,7 @@ $("#user_table").load(location.pathname + "?search=" + pattern.replace(" ", "%20") + " #user_table", init); } - searchbar_obj.keyup(function() { + searchbar_obj.keyup(function () { if (timer_on) clearTimeout(timer); timer_on = true; @@ -53,13 +59,14 @@ }); function init() { - $(".table-row").click(function() { + $(".table-row").click(function () { window.document.location = $(this).data("href"); timer_on = false; }); - $("tr").each(function() { - $(this).find("td:eq(0), td:eq(1), td:eq(2), td:eq(3), td:eq(5)").each(function() { + // Highlight searched terms + $("tr").each(function () { + $(this).find("td:eq(0), td:eq(1), td:eq(2), td:eq(3), td:eq(5)").each(function () { $(this).html($(this).text().replace(new RegExp(searchbar_obj.val(), 'i'), "<mark>$&</mark>")); }); }); @@ -68,4 +75,4 @@ init(); }); </script> -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/note_kfet/templates/registration/logged_out.html b/note_kfet/templates/registration/logged_out.html index 3b044b7d27ff531493ae3974fa860c91ab707400..80dfc93eacd690007e337ac3bfe4df12085f72fa 100644 --- a/note_kfet/templates/registration/logged_out.html +++ b/note_kfet/templates/registration/logged_out.html @@ -3,8 +3,16 @@ SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} {% load i18n %} +{% block contenttitle %}{% endblock %} {% block content %} - <p>{% trans "Thanks for spending some quality time with the Web site today." %}</p> - <p><a href="{% url 'index' %}">{% trans 'Log in again' %}</a></p> +<div class="card bg-light"> + <h3 class="card-header text-center"> + {{ title }} + </h3> + <div class="card-body"> + <p>{% trans "Thanks for spending some quality time with the Web site today." %}</p> + <p><a href="{% url 'index' %}">{% trans 'Log in again' %}</a></p> + </div> +</div> {% endblock %} diff --git a/note_kfet/templates/registration/password_change_done.html b/note_kfet/templates/registration/password_change_done.html index 150a00e9b3dc87e79885fcb986a8af62c40f224d..6e949134e3b346d8d6768baacc0e5368aefc7c59 100644 --- a/note_kfet/templates/registration/password_change_done.html +++ b/note_kfet/templates/registration/password_change_done.html @@ -3,7 +3,15 @@ SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} {% load i18n %} +{% block contenttitle %}{% endblock %} {% block content %} - <p>{% trans 'Your password was changed.' %}</p> +<div class="card bg-light"> + <h3 class="card-header text-center"> + {{ title }} + </h3> + <div class="card-body"> + <p>{% trans 'Your password was changed.' %}</p> + </div> +</div> {% endblock %} diff --git a/note_kfet/templates/registration/password_change_form.html b/note_kfet/templates/registration/password_change_form.html index 01133e4cf174a4c5b3d7b893266bb990be23dc16..f594cbe119c719414d214ea0ebb99db6251f9526 100644 --- a/note_kfet/templates/registration/password_change_form.html +++ b/note_kfet/templates/registration/password_change_form.html @@ -3,11 +3,19 @@ SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} {% load i18n crispy_forms_tags %} +{% block contenttitle %}{% endblock %} {% block content %} - <form method="post">{% csrf_token %} - <p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p> - {{ form | crispy }} - <input class="btn btn-primary" type="submit" value="{% trans 'Change my password' %}"> - </form> -{% endblock %} \ No newline at end of file +<div class="card bg-light"> + <h3 class="card-header text-center"> + {{ title }} + </h3> + <div class="card-body"> + <form method="post">{% csrf_token %} + <p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p> + {{ form | crispy }} + <input class="btn btn-primary" type="submit" value="{% trans 'Change my password' %}"> + </form> + </div> +</div> +{% endblock %} diff --git a/note_kfet/templates/registration/password_reset_complete.html b/note_kfet/templates/registration/password_reset_complete.html index bb91a3c54a0c00aca1d9f0c393b2a381e20dd150..46e823f7b417fe8ff3e83ad65bdc2c125447447b 100644 --- a/note_kfet/templates/registration/password_reset_complete.html +++ b/note_kfet/templates/registration/password_reset_complete.html @@ -3,10 +3,18 @@ SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} {% load i18n %} +{% block contenttitle %}{% endblock %} {% block content %} - <p>{% trans "Your password has been set. You may go ahead and log in now." %}</p> - <p> - <a href="{{ login_url }}" class="btn btn-success">{% trans 'Log in' %}</a> - </p> +<div class="card bg-light"> + <h3 class="card-header text-center"> + {{ title }} + </h3> + <div class="card-body"> + <p>{% trans "Your password has been set. You may go ahead and log in now." %}</p> + <p> + <a href="{{ login_url }}" class="btn btn-success">{% trans 'Log in' %}</a> + </p> + </div> +</div> {% endblock %} diff --git a/note_kfet/templates/registration/password_reset_confirm.html b/note_kfet/templates/registration/password_reset_confirm.html index 5db0e81094e36e5c217649b3497ca7c3628f20b7..c55d56b55f6152ec4586f1b6a064169155e7953d 100644 --- a/note_kfet/templates/registration/password_reset_confirm.html +++ b/note_kfet/templates/registration/password_reset_confirm.html @@ -3,15 +3,25 @@ SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} {% load i18n crispy_forms_tags %} +{% block contenttitle %}{% endblock %} {% block content %} - {% if validlink %} +<div class="card bg-light"> + <h3 class="card-header text-center"> + {{ title }} + </h3> + <div class="card-body"> + {% if validlink %} <p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p> <form method="post">{% csrf_token %} {{ form | crispy }} <input class="btn btn-primary" type="submit" value="{% trans 'Change my password' %}"> </form> - {% else %} - <p>{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p> - {% endif %} -{% endblock %} + {% else %} + <p> + {% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %} + </p> + {% endif %} + </div> +</div> +{% endblock %} \ No newline at end of file diff --git a/note_kfet/templates/registration/password_reset_done.html b/note_kfet/templates/registration/password_reset_done.html index a215ab936997ba078b8e728be53f157e83549c58..56271ae0422c14cf2b2a33ccb699f866ae591426 100644 --- a/note_kfet/templates/registration/password_reset_done.html +++ b/note_kfet/templates/registration/password_reset_done.html @@ -3,8 +3,16 @@ SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} {% load i18n %} +{% block contenttitle %}{% endblock %} {% block content %} - <p>{% trans "We've emailed you instructions for setting your password, if an account exists with the email you entered. You should receive them shortly." %}</p> - <p>{% trans "If you don't receive an email, please make sure you've entered the address you registered with, and check your spam folder." %}</p> +<div class="card bg-light"> + <h3 class="card-header text-center"> + {{ title }} + </h3> + <div class="card-body"> + <p>{% trans "We've emailed you instructions for setting your password, if an account exists with the email you entered. You should receive them shortly." %}</p> + <p>{% trans "If you don't receive an email, please make sure you've entered the address you registered with, and check your spam folder." %}</p> + </div> +</div> {% endblock %} diff --git a/note_kfet/templates/registration/password_reset_form.html b/note_kfet/templates/registration/password_reset_form.html index e184ae2c134be93f59f566d1860c215044cb7ca6..3f2d2f0f3f615431dc509528ce188f23b151b606 100644 --- a/note_kfet/templates/registration/password_reset_form.html +++ b/note_kfet/templates/registration/password_reset_form.html @@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later {% block content %} <div class="card bg-light"> <h3 class="card-header text-center"> - {% trans "Password reset" %} + {{ title }} </h3> <div class="card-body"> <p>{% trans "Forgotten your password? Enter your email address below, and we'll email instructions for setting a new one." %}</p>