From f09ee12115eb1ac4ef3a377f7e013189616a9507 Mon Sep 17 00:00:00 2001 From: Kevin Carrogan Date: Wed, 22 Jan 2025 19:04:48 +0000 Subject: [PATCH] safekeeping --- exporter/f680/forms.py | 9 +++++++++ exporter/f680/templates/f680/summary.html | 6 ++++++ exporter/f680/views.py | 10 +++++++--- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/exporter/f680/forms.py b/exporter/f680/forms.py index 074966ff1..2562d5a50 100644 --- a/exporter/f680/forms.py +++ b/exporter/f680/forms.py @@ -16,3 +16,12 @@ class Layout: def get_layout_fields(self): return ("name",) + + +class ApplicationSubmissionForm(BaseForm): + class Layout: + TITLE = "" + SUBMIT_BUTTON_TEXT = "Submit" + + def get_layout_fields(self): + return [] diff --git a/exporter/f680/templates/f680/summary.html b/exporter/f680/templates/f680/summary.html index b816d9c9a..0bc22a08c 100644 --- a/exporter/f680/templates/f680/summary.html +++ b/exporter/f680/templates/f680/summary.html @@ -1,4 +1,7 @@ {% extends "layouts/base.html" %} + +{% load crispy_forms_tags %} + {% block title %}Apply for an F680 Application{% endblock%} {% block body %} @@ -25,6 +28,9 @@

+
+ {% crispy form %} +
{% endblock %} diff --git a/exporter/f680/views.py b/exporter/f680/views.py index 69d11ba02..6a0acd139 100644 --- a/exporter/f680/views.py +++ b/exporter/f680/views.py @@ -2,14 +2,17 @@ from django.shortcuts import redirect from django.urls import reverse -from django.views.generic import TemplateView +from django.views.generic import FormView from core.auth.views import LoginRequiredMixin from core.decorators import expect_status from core.wizard.views import BaseSessionWizardView from exporter.f680.constants import ApplicationFormSteps -from exporter.f680.forms import ApplicationNameForm +from exporter.f680.forms import ( + ApplicationNameForm, + ApplicationSubmissionForm, +) from exporter.f680.payloads import F680CreatePayloadBuilder from exporter.f680.services import ( get_680_application, @@ -47,7 +50,8 @@ def done(self, form_list, form_dict, **kwargs): return redirect(self.get_success_url(response_data["id"])) -class F680ApplicationSummaryView(LoginRequiredMixin, TemplateView): +class F680ApplicationSummaryView(LoginRequiredMixin, FormView): + form_class = ApplicationSubmissionForm template_name = "f680/summary.html" def get_context_data(self, **kwargs):