mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-20 16:34:07 +02:00
requesting entity working - code still wip
This commit is contained in:
parent
74ef30b52d
commit
6a49f9e373
4 changed files with 163 additions and 70 deletions
|
@ -368,7 +368,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
|
|||
and from the database if `use_db` is True (provided that record exists).
|
||||
An empty form will be provided if neither of those are true.
|
||||
"""
|
||||
|
||||
logger.debug(f"get_forms({step},{use_post},{use_db},{files})")
|
||||
kwargs = {
|
||||
"files": files,
|
||||
"prefix": self.steps.current,
|
||||
|
@ -385,6 +385,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
|
|||
|
||||
for form in forms:
|
||||
data = form.from_database(self.domain_request) if self.has_pk() else None
|
||||
logger.debug(data)
|
||||
if use_post:
|
||||
instantiated.append(form(self.request.POST, **kwargs))
|
||||
elif use_db:
|
||||
|
@ -562,6 +563,13 @@ class RequestingEntity(DomainRequestWizard):
|
|||
template_name = "domain_request_requesting_entity.html"
|
||||
forms = [forms.RequestingEntityYesNoForm, forms.RequestingEntityForm]
|
||||
|
||||
#for debugging:
|
||||
def get(self, request, *args, **kwargs):
|
||||
"""This method handles GET requests."""
|
||||
logger.debug("in get")
|
||||
|
||||
return super().get(request, *args, **kwargs)
|
||||
|
||||
def save(self, forms: list):
|
||||
"""Override of save to clear or associate certain suborganization data
|
||||
depending on what the user wishes to do. For instance, we want to add a suborganization
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue