Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style: templates related to changing password in admin interface #2423

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions benefits/templates/registration/password_change_done.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{% extends "registration/password_change_done.html" %}
{% load static %}

{% block extrastyle %}
<link href="{% static "img/favicon.ico" %}" rel="icon" type="image/x-icon" />
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin="anonymous">
<link href="{% static "css/admin/styles.css" %}" rel="stylesheet">
{% endblock extrastyle %}

{% block branding %}
<div id="header-container" class="navbar navbar-expand-sm navbar-dark justify-content-between">
<div class="container">
<span class="navbar-brand p-0">
<img class="sm d-lg-none" src="{% static "img/logo-sm.svg" %}" width="90" height="51.3" alt="California Integrated Travel Project: Benefits logo (small)" />
<img class="lg d-none d-lg-block" src="{% static "img/logo-lg.svg" %}" width="220" height="50" alt="California Integrated Travel Project: Benefits logo (large)" />
</span>
</div>
<h1 class="p-0 m-0 text-white">{{ site_header }}</h1>
</div>
{% endblock branding %}

{% block usertools %}
{% if has_permission %}
<div id="user-tools">
{% block welcome-msg %}
<span class="text-uppercase text-white">
Welcome,
<span class="fw-bold">{% firstof user.get_short_name user.get_username %}</span>.
</span>
{% endblock welcome-msg %}
{% block userlinks %}
{% if user.is_active and user.is_staff %}
{% url 'django-admindocs-docroot' as docsroot %}
{% if docsroot %}<a href="{{ docsroot }}">Documentation</a> /{% endif %}
{% endif %}
{% if user.has_usable_password %}
<a href="{% url 'admin:password_change' %}">Change password</a> /
{% endif %}
<img class="icon" width="15" height="15" src="{% static "img/icon/box-arrow-right.svg" %}" alt="" />
<form id="logout-form" method="post" action="{% url 'admin:logout' %}">
{% csrf_token %}
<button type="submit" class="border-0">Log out</button>
</form>
{% endblock userlinks %}
</div>
{% endif %}
{% endblock usertools %}

{% block nav-breadcrumbs %}
{% endblock nav-breadcrumbs %}

{% block nav-sidebar %}
{% endblock nav-sidebar %}

{% block content %}
{{ block.super }}

<div class="row py-4">
<div class="col-lg-3">
<a class="btn btn-lg btn-primary d-block" href="{% url 'admin:index' %}">Back to dashboard</a>
</div>
</div>
{% endblock content %}
56 changes: 56 additions & 0 deletions benefits/templates/registration/password_change_form.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{% extends "registration/password_change_form.html" %}
{% load static %}

{% block extrastyle %}
<link href="{% static "img/favicon.ico" %}" rel="icon" type="image/x-icon" />
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin="anonymous">
<link href="{% static "css/admin/styles.css" %}" rel="stylesheet">
{% endblock extrastyle %}

{% block branding %}
<div id="header-container" class="navbar navbar-expand-sm navbar-dark justify-content-between">
<div class="container">
<span class="navbar-brand p-0">
<img class="sm d-lg-none" src="{% static "img/logo-sm.svg" %}" width="90" height="51.3" alt="California Integrated Travel Project: Benefits logo (small)" />
<img class="lg d-none d-lg-block" src="{% static "img/logo-lg.svg" %}" width="220" height="50" alt="California Integrated Travel Project: Benefits logo (large)" />
</span>
</div>
<h1 class="p-0 m-0 text-white">{{ site_header }}</h1>
</div>
{% endblock branding %}

{% block usertools %}
{% if has_permission %}
<div id="user-tools">
{% block welcome-msg %}
<span class="text-uppercase text-white">
Welcome,
<span class="fw-bold">{% firstof user.get_short_name user.get_username %}</span>.
</span>
{% endblock welcome-msg %}
{% block userlinks %}
{% if user.is_active and user.is_staff %}
{% url 'django-admindocs-docroot' as docsroot %}
{% if docsroot %}<a href="{{ docsroot }}">Documentation</a> /{% endif %}
{% endif %}
{% if user.has_usable_password %}
<a href="{% url 'admin:password_change' %}">Change password</a> /
{% endif %}
<img class="icon" width="15" height="15" src="{% static "img/icon/box-arrow-right.svg" %}" alt="" />
<form id="logout-form" method="post" action="{% url 'admin:logout' %}">
{% csrf_token %}
<button type="submit" class="border-0">Log out</button>
</form>
{% endblock userlinks %}
</div>
{% endif %}
{% endblock usertools %}

{% block nav-breadcrumbs %}
{% endblock nav-breadcrumbs %}

{% block nav-sidebar %}
{% endblock nav-sidebar %}
Loading