Skip to content

Commit

Permalink
Re-structure and re-order sponsor information form
Browse files Browse the repository at this point in the history
  • Loading branch information
ewdurbin committed Jan 2, 2024
1 parent 091f7bf commit 4c32364
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 60 deletions.
2 changes: 1 addition & 1 deletion sponsors/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ class SponsorshipApplicationForm(forms.Form):
label="State/Province/Region", max_length=64, required=False
)
state_of_incorporation = forms.CharField(
label="State of incorporation", help_text="US only, If different", max_length=64, required=False
label="State of incorporation", help_text="US only, If different than mailing address", max_length=64, required=False
)
postal_code = forms.CharField(
label="Zip/Postal Code", max_length=64, required=False
Expand Down
129 changes: 70 additions & 59 deletions templates/sponsors/new_sponsorship_application_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ <h1>Submit Sponsorship Information</h1>

<div id="new-appication-fields" {% if form.user_with_previous_sponsors and not form.errors %}style="display: none"{% endif %}>

<h2>Basics</h2>

<p class="form_field">
<label>{{ form.name.label }} <span class="error-message">{% if form.name.errors %}{{ form.name.errors.as_text }}</span>{% endif %}</label>
{% render_field form.name %}
Expand All @@ -62,6 +64,33 @@ <h1>Submit Sponsorship Information</h1>
{% endif %}
</p>


<div class="inline_fields">
<div>
<p class="form_field">
<label>{{ form.country_of_incorporation.label }} <span class="error-message">{% if form.country_of_incorporation.errors %}
{{ form.country.errors.as_text }}</span>{% endif %}</label>
{% render_field form.country_of_incorporation %}
{% if form.country_of_incorporation.help_text %}
<br/>
<span class="helptext">{{ form.country_of_incorporation.help_text }}</span>
{% endif %}
</p>
</div>

<div>
<p class="form_field">
<label>{{ form.state_of_incorporation.label }} <span class="error-message">{% if form.state_of_incorporation.errors %}
{{ form.state_of_incorporation.errors.as_text }}</span>{% endif %}</label>
{% render_field form.state %}
{% if form.state_of_incorporation.help_text %}
<br/>
<span class="helptext">{{ form.state_of_incorporation.help_text }}</span>
{% endif %}
</p>
</div>
</div>

<p class="form_field">
<label>{{ form.description.label }} <span class="error-message">{% if form.description.errors %}{{ form.description.errors.as_text }}</span>{% endif %}</label>
{% render_field form.description %}
Expand Down Expand Up @@ -94,29 +123,34 @@ <h1>Submit Sponsorship Information</h1>
</p>
</div>
</div>
<div class="inline_fields">
<div>
<p class="form_field">
<label>{{ form.country.label }} <span class="error-message">{% if form.country.errors %}{{ form.country.errors.as_text }}</span>{% endif %}</label>
{% render_field form.country %}
{% if form.country.help_text %}
<br/>
<span class="helptext">{{ form.country.help_text }}</span>
{% endif %}
</p>
</div>
<div>
<p class="form_field">
<label>{{ form.country_of_incorporation.label }} <span class="error-message">{% if form.country_of_incorporation.errors %}
{{ form.country.errors.as_text }}</span>{% endif %}</label>
{% render_field form.country_of_incorporation %}
{% if form.country_of_incorporation.help_text %}
<br/>
<span class="helptext">{{ form.country_of_incorporation.help_text }}</span>
{% endif %}
</p>
</div>
</div>

<div class="inline_fields">
<div>
<p class="form_field">
<label>{{ form.web_logo.label }} <span class="error-message">{% if form.web_logo.errors %}{{ form.web_logo.errors.as_text }}</span>{% endif %}</label>
{% render_field form.web_logo %}
{% if form.web_logo.help_text %}
<br/>
<span class="helptext">{{ form.web_logo.help_text }}</span>
{% endif %}
</p>
</div>

<div>
<p class="form_field">
<label>{{ form.print_logo.label }} <span class="error-message">{% if form.print_logo.errors %}{{ form.print_logo.errors.as_text }}</span>{% endif %}</label>
{% render_field form.print_logo %}
{% if form.print_logo.help_text %}
<br/>
<span class="helptext">{{ form.print_logo.help_text }}</span>
{% endif %}
</p>
</div>
</div>

<hr>

<h2>Mailing and Contact</h2>

<div class="inline_fields">
<div>
Expand Down Expand Up @@ -163,19 +197,7 @@ <h1>Submit Sponsorship Information</h1>
<span class="helptext">{{ form.state.help_text }}</span>
{% endif %}
</p>
</div>

<div>
<p class="form_field">
<label>{{ form.state_of_incorporation.label }} <span class="error-message">{% if form.state_of_incorporation.errors %}
{{ form.state_of_incorporation.errors.as_text }}</span>{% endif %}</label>
{% render_field form.state %}
{% if form.state_of_incorporation.help_text %}
<br/>
<span class="helptext">{{ form.state_of_incorporation.help_text }}</span>
{% endif %}
</p>
</div>
</div>
</div>


Expand All @@ -193,37 +215,26 @@ <h1>Submit Sponsorship Information</h1>

<div>
<p class="form_field">
<label>{{ form.primary_phone.label }} <span class="error-message">{% if form.primary_phone.errors %}{{ form.primary_phone.errors.as_text }}</span>{% endif %}</label>
{% render_field form.primary_phone %}
{% if form.primary_phone.help_text %}
<label>{{ form.country.label }} <span class="error-message">{% if form.country.errors %}{{ form.country.errors.as_text }}</span>{% endif %}</label>
{% render_field form.country %}
{% if form.country.help_text %}
<br/>
<span class="helptext">{{ form.primary_phone.help_text }}</span>
<span class="helptext">{{ form.country.help_text }}</span>
{% endif %}
</p>
</div>
</div>

<div class="inline_fields">
<div>
<p class="form_field">
<label>{{ form.web_logo.label }} <span class="error-message">{% if form.web_logo.errors %}{{ form.web_logo.errors.as_text }}</span>{% endif %}</label>
{% render_field form.web_logo %}
{% if form.web_logo.help_text %}
<br/>
<span class="helptext">{{ form.web_logo.help_text }}</span>
{% endif %}
</p>
</div>

<div>
<p class="form_field">
<label>{{ form.print_logo.label }} <span class="error-message">{% if form.print_logo.errors %}{{ form.print_logo.errors.as_text }}</span>{% endif %}</label>
{% render_field form.print_logo %}
{% if form.print_logo.help_text %}
<br/>
<span class="helptext">{{ form.print_logo.help_text }}</span>
{% endif %}
</p>
<p class="form_field">
<label>{{ form.primary_phone.label }} <span class="error-message">{% if form.primary_phone.errors %}{{ form.primary_phone.errors.as_text }}</span>{% endif %}</label>
{% render_field form.primary_phone %}
{% if form.primary_phone.help_text %}
<br/>
<span class="helptext">{{ form.primary_phone.help_text }}</span>
{% endif %}
</p>
</div>
</div>

Expand Down

0 comments on commit 4c32364

Please sign in to comment.