Move nav and title to form base tempalte

This commit is contained in:
igorkorenfeld 2022-11-04 17:49:24 -04:00
parent 1a9290ea15
commit 3d24ed04af
No known key found for this signature in database
GPG key ID: 826947A4B867F659
2 changed files with 24 additions and 13 deletions

View file

@ -3,17 +3,14 @@
{% load widget_tweaks %}
{% load static %}
{% block title %}Apply for a .gov domain Authorizing official{% endblock %}
{% block backnav %}
{% with form_name="step__ao" %}
{{ block.super }}
{% endwith %}
{% endblock %}
{% block form_content %}
{% if wizard.steps.prev %}
<button name="wizard_goto_step" type="submit" class="usa-button usa-button--unstyled" value="{{ wizard.steps.prev }}">
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img">
<use xlink:href="{%static '/img/sprite.svg'%}#arrow_back"></use>
</svg>
Back
</button>
{% endif %}
<h1>Authorizing official</h1>
{{wizard.steps.current}}
{{form_titles|get_item:wizard.steps.current}}
@ -24,7 +21,7 @@
<p>All fields are required unless they are marked optional.</p>
<form class="usa-form usa-form--large" method="post">
<form class="usa-form usa-form--large" id="step__ao" method="post">
{{ wizard.management_form }}
{% csrf_token %}
@ -49,7 +46,8 @@
</fieldset>
<button type="submit" class="usa-button">Next</button>
{{ block.super }}
</form>
{% endblock %}

View file

@ -1,13 +1,26 @@
{% extends 'base.html' %}
{% load static widget_tweaks %}
{% block title %}Apply for a .gov domain {{form_titles|get_item:wizard.steps.current}}{% endblock %}
{% block content %}
<div class="grid-row">
<div class="grid-col-3">
{% include 'application_sidebar.html' %}
</div>
<div class="grid-col-9">
{% block form_content %}{% endblock %}
{% block backnav %}
{% if wizard.steps.prev %}
<button form={{form_name}} name="wizard_goto_step" type="submit" class="usa-button usa-button--unstyled" value="{{ wizard.steps.prev }}">
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img">
<use xlink:href="{%static '/img/sprite.svg'%}#arrow_back"></use>
</svg><span class="margin-left-05">Previous step </span>
</button>
{% endif %}
{% endblock %}
{% block form_content %}
<button type="submit" class="usa-button">Next</button>
<button type="button" class="usa-button usa-button--outline">Save</button>
{% endblock %}
</div>
</div>
{% endblock %}