mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-06-10 06:24:45 +02:00
added withdraw path and such
This commit is contained in:
parent
75b5cc977b
commit
c0b789b9f5
6 changed files with 141 additions and 27 deletions
|
@ -57,6 +57,11 @@ urlpatterns = [
|
|||
views.ApplicationStatus.as_view(),
|
||||
name="application-status",
|
||||
),
|
||||
path(
|
||||
"application/<int:pk>/withdraw",
|
||||
views.ApplicationWithdraw.as_view(),
|
||||
name="application-withdraw-confirmation",
|
||||
),
|
||||
path("health/", views.health),
|
||||
path("openid/", include("djangooidc.urls")),
|
||||
path("register/", include((application_urls, APPLICATION_NAMESPACE))),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 4.1.6 on 2023-04-13 18:31
|
||||
# Generated by Django 4.1.6 on 2023-04-13 18:38
|
||||
|
||||
from django.db import migrations
|
||||
import django_fsm
|
||||
|
@ -6,7 +6,7 @@ import django_fsm
|
|||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("registrar", "0017_alter_domaininvitation_status"),
|
||||
("registrar", "0016_domaininvitation"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
@ -19,10 +19,20 @@ class Migration(migrations.Migration):
|
|||
("submitted", "submitted"),
|
||||
("investigating", "investigating"),
|
||||
("approved", "approved"),
|
||||
("Withdrawn", "Withdrawn"),
|
||||
("withdrawn", "withdrawn"),
|
||||
],
|
||||
default="started",
|
||||
max_length=50,
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="domaininvitation",
|
||||
name="status",
|
||||
field=django_fsm.FSMField(
|
||||
choices=[("invited", "invited"), ("retrieved", "retrieved")],
|
||||
default="invited",
|
||||
max_length=50,
|
||||
protected=True,
|
||||
),
|
||||
),
|
||||
]
|
|
@ -1,23 +0,0 @@
|
|||
# Generated by Django 4.1.6 on 2023-04-13 18:27
|
||||
|
||||
from django.db import migrations
|
||||
import django_fsm
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("registrar", "0016_domaininvitation"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="domaininvitation",
|
||||
name="status",
|
||||
field=django_fsm.FSMField(
|
||||
choices=[("invited", "invited"), ("retrieved", "retrieved")],
|
||||
default="invited",
|
||||
max_length=50,
|
||||
protected=True,
|
||||
),
|
||||
),
|
||||
]
|
|
@ -23,7 +23,7 @@ class DomainApplication(TimeStampedModel):
|
|||
SUBMITTED = "submitted"
|
||||
INVESTIGATING = "investigating"
|
||||
APPROVED = "approved"
|
||||
WITHDRAWN = "Withdrawn"
|
||||
WITHDRAWN = "withdrawn"
|
||||
STATUS_CHOICES = [
|
||||
(STARTED, STARTED),
|
||||
(SUBMITTED, SUBMITTED),
|
||||
|
|
114
src/registrar/templates/application_withdraw_confirmation.html
Normal file
114
src/registrar/templates/application_withdraw_confirmation.html
Normal file
|
@ -0,0 +1,114 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Domain request status- {{ domainapplication.requested_domain.name }}{% endblock %}
|
||||
{% load static url_helpers %}
|
||||
|
||||
{% block content %}
|
||||
<div class="grid-col desktop:grid-offset-2 desktop:grid-col-8">
|
||||
|
||||
|
||||
<p><h1>Domain request for {{ domainapplication.requested_domain.name }}</h1></p>
|
||||
|
||||
<div
|
||||
class="usa-summary-box dotgov-status-box margin-top-3"
|
||||
role="region"
|
||||
aria-labelledby="summary-box-key-information"
|
||||
>
|
||||
<div class="usa-summary-box__body">
|
||||
<p class="usa-summary-box__heading font-sans-md margin-bottom-0"
|
||||
id="summary-box-key-information"
|
||||
>
|
||||
<span class="text-bold text-primary-darker">
|
||||
Status:
|
||||
</span>
|
||||
{% if domainapplication.status == 'approved' %} Approved
|
||||
{% elif domainapplication.status == 'investigating' %} In Review
|
||||
{% elif domainapplication.status == 'submitted' %} Received
|
||||
{% else %}ERROR Please contact technical support/dev
|
||||
{% endif %}
|
||||
</div></div><br>
|
||||
<p> <b class="review__step__name">Last updated:</b> {{domainapplication.updated_at|date:"F j, Y"}}<br>
|
||||
<b class="review__step__name">Request #:</b> {{domainapplication.id}}</p>
|
||||
|
||||
<p>{% include "includes/domain_application.html" %}</p>
|
||||
|
||||
<p><button type="" class="usa-button usa-button--outline withdraw_outline">Withdraw Request</button></p>
|
||||
|
||||
<p><h2>Summary of your domain request</h2></p>
|
||||
|
||||
<section class="review__step">
|
||||
<p>
|
||||
<hr><div class="review__step__name">Type of organization</div>
|
||||
{{ domainapplication.get_organization_type_display }}
|
||||
</p>
|
||||
|
||||
{% if domainapplication.tribe_name %}
|
||||
<p>{{ domainapplication.tribe_name }}</p>
|
||||
{% endif %}
|
||||
{% if domainapplication.federally_recognized_tribe %}
|
||||
<p>Federally-recognized tribe</p>
|
||||
{% endif %}
|
||||
{% if domainapplication.state_recognized_tribe %}
|
||||
<p>State-recognized tribe</p>
|
||||
{% endif %}
|
||||
{% if domainapplication.get_federal_type_display %}
|
||||
<p><hr><div class="review__step__name">Federal government branch</div>
|
||||
{{ domainapplication.get_federal_type_display }}</p>
|
||||
{% endif %}
|
||||
{% if domainapplication.is_election_board %}
|
||||
<p><hr><div class="review__step__name">Election Office</div>{{ domainapplication.is_election_board}}</p>
|
||||
{% endif %}
|
||||
{% if domainapplication.organization_name %}
|
||||
<p><hr><div class="review__step__name">Organization address</div>
|
||||
{% include "includes/organization_address.html" with organization=domainapplication %}</p>
|
||||
{% endif %}
|
||||
{% if domainapplication.type_of_work %}
|
||||
<p>{{domainapplication.type_of_work}}</p>
|
||||
{% endif %}
|
||||
{% if domainapplication.more_organization_information %}
|
||||
<p>{{domainapplication.more_organization_information}}</p>
|
||||
{% endif %}
|
||||
{% if domainapplication.authorizing_official %}
|
||||
<p><hr><div class="review__step__name">Authorizing Official</div>
|
||||
{% include "includes/contact.html" with contact=domainapplication.authorizing_official %}</p>
|
||||
{% endif %}
|
||||
<p><hr><div class="review__step__name">Organization website</div><ul class="add-list-reset">
|
||||
{% for site in domainapplication.current_websites.all %}
|
||||
<li>{{ site.website }}</li>
|
||||
{% empty %}
|
||||
<li>None</li>
|
||||
{% endfor %}</ul></p>
|
||||
{% if domainapplication.requested_domain.name %}
|
||||
<p><hr><div class="review__step__name"> .gov domain </div> <ul class="add-list-reset margin-bottom-105">
|
||||
<li>{{ domainapplication.requested_domain.name|default:"Incomplete" }}</li>
|
||||
</ul>
|
||||
<ul class="add-list-reset">
|
||||
{% for site in domainapplication.alternative_domains.all %}
|
||||
<li>{{ site.website }}</li>
|
||||
{% endfor %}
|
||||
</ul></p>
|
||||
{% endif %}
|
||||
{% if domainapplication.purpose %}
|
||||
<p><hr><div class="review__step__name">Purpose of your domain </div>
|
||||
{{ domainapplication.purpose }}</p>
|
||||
{% endif %}
|
||||
{% if domainapplication.submitter %}
|
||||
<p><hr><div class="review__step__name">Your contact information</div>
|
||||
<div class="margin-bottom-105">
|
||||
{% include "includes/contact.html" with contact=domainapplication.submitter %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% for other in domainapplication.other_contacts.all %}
|
||||
<div class="margin-bottom-105">
|
||||
{% include "includes/contact.html" with contact=other %}
|
||||
</div>
|
||||
{% empty %}
|
||||
None
|
||||
{% endfor %}</p>
|
||||
<p><hr><div class="review__step__name">Anything else we should know?</div></p>
|
||||
{{ domainapplication.anything_else|default:"No" }}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
{% endblock %}
|
|
@ -483,3 +483,11 @@ class ApplicationStatus(generic.DetailView):
|
|||
def get_context_data(self, **kwargs):
|
||||
context = super(ApplicationStatus, self).get_context_data(**kwargs)
|
||||
return context
|
||||
|
||||
class ApplicationWithdraw(generic.DetailView)
|
||||
model = DomainApplication
|
||||
template_name = "application_withdraw_confirmation.html"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(ApplicationWithdraw, self).get_context_data(**kwargs)
|
||||
return context
|
Loading…
Add table
Add a link
Reference in a new issue