Skip to content

Commit

Permalink
feat(vital_records): request and unverified routes
Browse files Browse the repository at this point in the history
  • Loading branch information
thekaveman committed Jan 28, 2025
1 parent c762444 commit 9027e86
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 2 deletions.
14 changes: 14 additions & 0 deletions web/vital_records/templates/vital_records/request.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{% extends "core/base.html" %}
{% load i18n %}
{% block title %}
{% translate "Request vital records: Verified" %}
{% endblock title %}
{% block headline %}
{% translate "Request vital records: Verified" %}
{% endblock headline %}
{% block inner-content %}
<p>You are in a confirmed disaster affected area.</p>
<p>
<a class="btn btn-primary" href="{% url 'vital_records:submitted' %}">Submit your Vital Records request</a>
</p>
{% endblock inner-content %}
14 changes: 14 additions & 0 deletions web/vital_records/templates/vital_records/submitted.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{% extends "core/base.html" %}
{% load i18n %}
{% block title %}
{% translate "Request vital records: Complete" %}
{% endblock title %}
{% block headline %}
{% translate "Request vital records: Complete" %}
{% endblock headline %}
{% block inner-content %}
<p>{% translate "Your request has been submitted." %}</p>
<p>
<a class="btn btn-secondary" href="{% url 'oauth:logout' %}">Sign out of Login.gov</a>
</p>
{% endblock inner-content %}
14 changes: 14 additions & 0 deletions web/vital_records/templates/vital_records/unverified.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{% extends "core/base.html" %}
{% load i18n %}
{% block title %}
{% translate "Request vital records: Not verified" %}
{% endblock title %}
{% block headline %}
{% translate "Request vital records: Not verified" %}
{% endblock headline %}
{% block inner-content %}
<p>{% translate "We could not verify if you are in a disaster affected area." %}</p>
<p>
<a class="btn btn-secondary" href="{% url 'oauth:logout' %}">Sign out of Login.gov</a>
</p>
{% endblock inner-content %}
10 changes: 8 additions & 2 deletions web/vital_records/urls.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
from django.urls import path
from django.views.generic import TemplateView

from web.vital_records import views

app_name = "vital_records"

# /vital-records
urlpatterns = [path("", TemplateView.as_view(template_name="vital_records/index.html"), name="index")]
urlpatterns = [
path("", views.index, name="index"),
path("request", views.request, name="request"),
path("submitted", views.submitted, name="submitted"),
path("unverified", views.unverified, name="unverified"),
]
21 changes: 21 additions & 0 deletions web/vital_records/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from django.http import HttpRequest
from django.template.response import TemplateResponse

from web.vital_records.session import Session


def index(request: HttpRequest):
Session(request, reset=True)
return TemplateResponse(request, "vital_records/index.html")


def request(request: HttpRequest):
return TemplateResponse(request, "vital_records/request.html")


def submitted(request: HttpRequest):
return TemplateResponse(request, "vital_records/submitted.html")


def unverified(request: HttpRequest):
return TemplateResponse(request, "vital_records/unverified.html")

0 comments on commit 9027e86

Please sign in to comment.