Skip to content
Open
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
13 changes: 8 additions & 5 deletions commcare_connect/templates/403.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{% extends "base.html" %}

{% block title %}Forbidden (403){% endblock %}

{% block content %}
<h1 class="title text-deep-purple">Forbidden (403)</h1>

<p>{% if exception %}{{ exception }}{% else %}You're not allowed to access this page.{% endif %}</p>
<h1 class="title text-deep-purple">Forbidden (403)</h1>
<p>
{% if exception %}
{{ exception }}
{% else %}
You're not allowed to access this page.
{% endif %}
</p>
{% endblock content %}
13 changes: 8 additions & 5 deletions commcare_connect/templates/404.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{% extends "base.html" %}

{% block title %}Page not found{% endblock %}

{% block content %}
<h1 class="title text-deep-purple">Page not found</h1>

<p>{% if exception %}{{ exception }}{% else %}This is not the page you were looking for.{% endif %}</p>
<h1 class="title text-deep-purple">Page not found</h1>
<p>
{% if exception %}
{{ exception }}
{% else %}
This is not the page you were looking for.
{% endif %}
</p>
{% endblock content %}
12 changes: 5 additions & 7 deletions commcare_connect/templates/500.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{% extends "base.html" %}

{% block title %}Server Error{% endblock %}

{% block content %}
<h1 class="title text-deep-purple">Ooops!!! 500</h1>

<h3>Looks like something went wrong!</h3>

<p>We track these errors automatically, but if the problem persists feel free to contact us. In the meantime, try refreshing.</p>
<h1 class="title text-deep-purple">Ooops!!! 500</h1>
<h3>Looks like something went wrong!</h3>
<p>
We track these errors automatically, but if the problem persists feel free to contact us. In the meantime, try refreshing.
</p>
{% endblock content %}
8 changes: 3 additions & 5 deletions commcare_connect/templates/account/account_inactive.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{% extends "account/base.html" %}

{% load i18n %}

{% block head_title %}{% translate "Account Inactive" %}{% endblock %}

{% block head_title %}
{% translate "Account Inactive" %}
{% endblock %}
{% block inner %}
<div class="w-full min-h-[620px] h-fit">
<h1 class="title text-brand-deep-purple b-4">{% translate "Account Inactive" %}</h1>

<p class="text-sm">{% translate "This account is inactive." %}</p>
</div>
{% endblock %}
44 changes: 30 additions & 14 deletions commcare_connect/templates/account/base.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
{% load static i18n %}

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{% block title %}Connect - {% block head_title %}{% endblock head_title %}{% endblock title %}</title>
<title>
{% block title %}
Connect -
{% block head_title %}
{% endblock head_title %}
{% endblock title %}
</title>
{% load static %}
{% block css %}
<link rel="stylesheet" href="{% static 'bundles/css/tailwind.css' %}">
<link href="https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/aquawolf04/font-awesome-pro@5cd1511/css/all.css" />
<link href="https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;500;600;700&display=swap"
rel="stylesheet">
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/aquawolf04/font-awesome-pro@5cd1511/css/all.css" />
{% endblock %}

{% block javascript %}
{{ GTM_VARS_JSON|json_script:"gtm-data" }}
<script src="{% static 'js/gtx.js' %}" defer></script>
Expand All @@ -26,8 +32,12 @@
<div class="grid grid-cols-2 gap-2 p-2 bg-gray-100 rounded-lg shadow-sm h-fit">
<div class="flex flex-col gap-2">
<div class="flex flex-col items-end justify-between flex-1 w-full p-2 rounded-lg bg-brand-cornflower-blue">
<img src="{% static 'images/logo-full.svg' %}" alt="Compact Logo" class="w-48 pt-4 pr-6" />
<img src="{% static 'images/onboarding-graphics.svg' %}" alt="Compact Logo" class="w-full" />
<img src="{% static 'images/logo-full.svg' %}"
alt="Compact Logo"
class="w-48 pt-4 pr-6" />
<img src="{% static 'images/onboarding-graphics.svg' %}"
alt="Compact Logo"
class="w-full" />
</div>
<div class="grid grid-cols-2 gap-2 h-1/4">
<div class="flex flex-col justify-center p-6 pt-12 text-white rounded-lg bg-brand-deep-purple">
Expand All @@ -40,16 +50,22 @@ <h3 class="text-3xl">10 +</h3>
</div>
</div>
</div>
<div id="onboarding-container" class="h-full bg-white rounded-lg py-6 px-8">
{% block inner %}
{% endblock %}
<div id="onboarding-container"
class="h-full bg-white rounded-lg py-6 px-8">
{% block inner %}{% endblock %}
</div>
</div>
<div class="absolute -translate-x-1/2 -left-0 -bottom-1/2 -translate-y-1/4 -z-10" class="w-8">
<img src="{% static 'images/bg-graphics-bottom-left.svg' %}" alt="Compact Logo" class="w-full h-full aspect-auto" />
<div class="absolute -translate-x-1/2 -left-0 -bottom-1/2 -translate-y-1/4 -z-10"
class="w-8">
<img src="{% static 'images/bg-graphics-bottom-left.svg' %}"
alt="Compact Logo"
class="w-full h-full aspect-auto" />
</div>
<div class="absolute top-0 right-0 rotate-90 translate-x-1/2 -translate-y-1/2 -z-10" class="w-1/2">
<img src="{% static 'images/bg-graphics-top-right.svg' %}" alt="Compact Logo" class="w-full h-full" />
<div class="absolute top-0 right-0 rotate-90 translate-x-1/2 -translate-y-1/2 -z-10"
class="w-1/2">
<img src="{% static 'images/bg-graphics-top-right.svg' %}"
alt="Compact Logo"
class="w-full h-full" />
</div>
</div>
</div>
Expand Down
186 changes: 93 additions & 93 deletions commcare_connect/templates/account/email.html
Original file line number Diff line number Diff line change
@@ -1,107 +1,107 @@
{% extends "base.html" %}
{% load i18n %}
{% load crispy_forms_tags %}

{% block content %}
<div class="max-w-screen-lg mx-auto py-8 px-4">

<h2 class="text-xl font-semibold text-brand-deep-purple mb-4">{% translate "Edit Name" %}</h2>
<div class="bg-white p-6 rounded-lg shadow-sm border border-gray-100">
<div
id="edit-name-fields"
hx-get="{% url 'users:update' %}"
hx-trigger="load"
hx-swap="innerHTML"
>
<div class="text-gray-500 text-sm italic">{% translate "Loading..." %}</div>
<div class="max-w-screen-lg mx-auto py-8 px-4">
<h2 class="text-xl font-semibold text-brand-deep-purple mb-4">{% translate "Edit Name" %}</h2>
<div class="bg-white p-6 rounded-lg shadow-sm border border-gray-100">
<div id="edit-name-fields"
hx-get="{% url 'users:update' %}"
hx-trigger="load"
hx-swap="innerHTML">
<div class="text-gray-500 text-sm italic">{% translate "Loading..." %}</div>
</div>
</div>
</div>

<!--Primary Secondary Email form -->
<div class="mt-10 pt-6 border-t border-gray-200">
<h2 class="text-xl font-semibold text-brand-deep-purple mb-4">{% translate "E-mail Addresses" %}</h2>

{% if user.emailaddress_set.all %}
<p class="mb-4 text-sm text-gray-700">{% translate 'The following e-mail addresses are associated with your account:' %}</p>

<form action="{% url 'account_email' %}" method="post">
{% csrf_token %}
<div class="space-y-4 bg-white p-6 rounded-lg shadow-sm border border-gray-100">
{% for emailaddress in user.emailaddress_set.all %}
<div class="pb-4 border-b border-gray-100 last:border-b-0">
<label for="email_radio_{{ forloop.counter }}" class="flex flex-col sm:flex-row sm:items-center sm:justify-between w-full cursor-pointer">
<div class="flex items-center mb-2 sm:mb-0 gap-2">
<input id="email_radio_{{ forloop.counter }}" type="radio" name="email"
class="mr-3 h-4 w-4 text-brand-indigo focus:ring-brand-indigo border-gray-300 accent-brand-indigo"
{% if emailaddress.primary or user.emailaddress_set.count == 1 %}checked="checked"{% endif %}
value="{{ emailaddress.email }}"/>
<span class="font-medium text-gray-800">{{ emailaddress.email }}</span>
</div>
<div class="flex items-center space-x-2 flex-wrap justify-start sm:justify-end pl-7 sm:pl-0">
{% if emailaddress.verified %}
<span class="badge badge-sm positive-light">
<i class="fa-solid fa-check mr-1"></i> {% translate "Verified" %}
</span>
{% else %}
<span class="badge badge-sm warning-light">
<i class="fa-solid fa-triangle-exclamation mr-1"></i> {% translate "Unverified" %}
</span>
{% endif %}
{% if emailaddress.primary %}
<span class="badge badge-sm primary-light">
<i class="fa-solid fa-star mr-1"></i> {% translate "Primary" %}
</span>
{% endif %}
</div>
</label>
<!--Primary Secondary Email form -->
<div class="mt-10 pt-6 border-t border-gray-200">
<h2 class="text-xl font-semibold text-brand-deep-purple mb-4">{% translate "E-mail Addresses" %}</h2>
{% if user.emailaddress_set.all %}
<p class="mb-4 text-sm text-gray-700">
{% translate 'The following e-mail addresses are associated with your account:' %}
</p>
<form action="{% url 'account_email' %}" method="post">
{% csrf_token %}
<div class="space-y-4 bg-white p-6 rounded-lg shadow-sm border border-gray-100">
{% for emailaddress in user.emailaddress_set.all %}
<div class="pb-4 border-b border-gray-100 last:border-b-0">
<label for="email_radio_{{ forloop.counter }}"
class="flex flex-col sm:flex-row sm:items-center sm:justify-between w-full cursor-pointer">
<div class="flex items-center mb-2 sm:mb-0 gap-2">
<input id="email_radio_{{ forloop.counter }}"
type="radio"
name="email"
class="mr-3 h-4 w-4 text-brand-indigo focus:ring-brand-indigo border-gray-300 accent-brand-indigo"
{% if emailaddress.primary or user.emailaddress_set.count == 1 %}checked="checked"{% endif %}
value="{{ emailaddress.email }}" />
<span class="font-medium text-gray-800">{{ emailaddress.email }}</span>
</div>
<div class="flex items-center space-x-2 flex-wrap justify-start sm:justify-end pl-7 sm:pl-0">
{% if emailaddress.verified %}
<span class="badge badge-sm positive-light">
<i class="fa-solid fa-check mr-1"></i> {% translate "Verified" %}
</span>
{% else %}
<span class="badge badge-sm warning-light">
<i class="fa-solid fa-triangle-exclamation mr-1"></i> {% translate "Unverified" %}
</span>
{% endif %}
{% if emailaddress.primary %}
<span class="badge badge-sm primary-light">
<i class="fa-solid fa-star mr-1"></i> {% translate "Primary" %}
</span>
{% endif %}
</div>
</label>
</div>
{% endfor %}
<div class="mt-6 flex justify-end gap-2">
<button class="button button-md outline-style text-red-600 hover:bg-red-50 border-red-300 hover:border-red-400"
type="submit"
name="action_remove">
<i class="fa-solid fa-trash mr-1"></i> {% translate 'Remove' %}
</button>
<button class="button button-md primary-light"
type="submit"
name="action_send">
<i class="fa-solid fa-rotate-right mr-1"></i> {% translate 'Re-send Verification' %}
</button>
<button class="button button-md primary-dark"
type="submit"
name="action_primary">
<i class="fa-solid fa-check mr-1"></i> {% translate 'Make Primary' %}
</button>
</div>
{% endfor %}

<div class="mt-6 flex justify-end gap-2">
<button class="button button-md outline-style text-red-600 hover:bg-red-50 border-red-300 hover:border-red-400" type="submit" name="action_remove">
<i class="fa-solid fa-trash mr-1"></i> {% translate 'Remove' %}
</button>
<button class="button button-md primary-light" type="submit" name="action_send">
<i class="fa-solid fa-rotate-right mr-1"></i> {% translate 'Re-send Verification' %}
</button>
<button class="button button-md primary-dark" type="submit" name="action_primary">
<i class="fa-solid fa-check mr-1"></i> {% translate 'Make Primary' %}
</button>
</div>
</form>
{% else %}
<div class="bg-yellow-50 border-l-4 border-yellow-400 p-4 rounded"
role="alert">
<p class="text-sm text-yellow-700">
<strong class="font-bold">{% translate 'Warning:' %}</strong> {% translate "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}
</p>
</div>
</form>

{% else %}
<div class="bg-yellow-50 border-l-4 border-yellow-400 p-4 rounded" role="alert">
<p class="text-sm text-yellow-700">
<strong class="font-bold">{% translate 'Warning:' %}</strong> {% translate "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}
</p>
</div>
{% endif %}

</div>

<!--Add E-mail form -->
<div class="mt-10 pt-6 border-t border-gray-200">
<h2 class="text-xl font-semibold text-brand-deep-purple mb-4">{% translate "Add E-mail Address" %}</h2>

<div class="space-y-4 bg-white p-6 rounded-lg shadow-sm border border-gray-100">
<form id="add_email" method="post" action="{% url 'account_email' %}" >
{% csrf_token %}
{% crispy form %}
<div class="mt-6 flex justify-end">
<button class="button button-md primary-dark" name="action_add" type="submit" form="add_email">
<i class="fa-solid fa-plus mr-1"></i> {% translate "Add E-mail" %}
</button>
{% endif %}
</div>
<!--Add E-mail form -->
<div class="mt-10 pt-6 border-t border-gray-200">
<h2 class="text-xl font-semibold text-brand-deep-purple mb-4">{% translate "Add E-mail Address" %}</h2>
<div class="space-y-4 bg-white p-6 rounded-lg shadow-sm border border-gray-100">
<form id="add_email" method="post" action="{% url 'account_email' %}">
{% csrf_token %}
{% crispy form %}
<div class="mt-6 flex justify-end">
<button class="button button-md primary-dark"
name="action_add"
type="submit"
form="add_email">
<i class="fa-solid fa-plus mr-1"></i> {% translate "Add E-mail" %}
</button>
</div>
</form>
</div>
</form>
</div>
</div>
</div>

</div>
{% endblock content %}


{% block inline_javascript %}
{{ block.super }}
<script type="text/javascript">
Expand Down
44 changes: 22 additions & 22 deletions commcare_connect/templates/account/email_confirm.html
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{% extends "account/base.html" %}

{% load i18n %}
{% load account %}

{% block head_title %}{% translate "Confirm E-mail Address" %}{% endblock %}

{% block head_title %}
{% translate "Confirm E-mail Address" %}
{% endblock %}
{% block inner %}
<div class="w-full min-h-[620px] h-fit flex flex-col gap-4">
<h1 class="title text-brand-deep-purple mb-4">{% translate "Confirm E-mail Address" %}</h1>
{% if confirmation %}
{% user_display confirmation.email_address.user as user_display %}
<p>
{% blocktranslate with confirmation.email_address.email as email %}
<div class="w-full min-h-[620px] h-fit flex flex-col gap-4">
<h1 class="title text-brand-deep-purple mb-4">{% translate "Confirm E-mail Address" %}</h1>
{% if confirmation %}
{% user_display confirmation.email_address.user as user_display %}
<p>
{% blocktranslate with confirmation.email_address.email as email %}
Please confirm that <a href="mailto:{{ email }}">{{ email }}</a> is an e-mail address for user {{ user_display }}.
{% endblocktranslate %}
</p>
<form method="post" action="{% url 'account_confirm_email' confirmation.key %}">
{% csrf_token %}
<button class="button button-md primary-dark" type="submit">{% translate 'Confirm' %}</button>
</form>
{% else %}
{% url 'account_email' as email_url %}
<p class="mt-2">
{% blocktranslate %}
</p>
<form method="post"
action="{% url 'account_confirm_email' confirmation.key %}">
{% csrf_token %}
<button class="button button-md primary-dark" type="submit">{% translate 'Confirm' %}</button>
</form>
{% else %}
{% url 'account_email' as email_url %}
<p class="mt-2">
{% blocktranslate %}
This e-mail confirmation link expired or is invalid. Please <a href="{{ email_url }}">issue a new e-mail confirmation request</a>.
{% endblocktranslate %}
</p>
{% endif %}
</div>
</p>
{% endif %}
</div>
{% endblock %}
Loading
Loading