Skip to content

Commit

Permalink
adding new optional fields to update sponsor application form
Browse files Browse the repository at this point in the history
  • Loading branch information
jessiebelle committed Dec 24, 2023
1 parent ddb80bc commit dc5ff5b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
6 changes: 3 additions & 3 deletions sponsors/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,15 @@ 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 from registered state", max_length=64, required=False
label="State of incorporation", help_text="US only, If different", max_length=64, required=False
)
postal_code = forms.CharField(
label="Zip/Postal Code", max_length=64, required=False
)
country = CountryField().formfield(required=False)
country = CountryField().formfield(required=False, help_text="For mailing/contact purposes")

country_of_incorporation = CountryField().formfield(
label="Country of incorporation", help_text="If different from registered country", required=False
label="Country of incorporation", help_text="For contractual purposes", required=False
)

def __init__(self, *args, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion sponsors/models/sponsors.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Sponsor(ContentManageable):
country = CountryField(default="", help_text="For mailing/contact purposes")
assets = GenericRelation(GenericAsset)
country_of_incorporation = CountryField(
verbose_name="Country of incorporation (If different)", blank=True, null=True
verbose_name="Country of incorporation (If different)", help_text="For contractual purposes", blank=True, null=True
)
state_of_incorporation = models.CharField(
verbose_name="US only: State of incorporation (If different)",
Expand Down
30 changes: 28 additions & 2 deletions templates/sponsors/new_sponsorship_application_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ <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 %}
Expand All @@ -103,6 +104,19 @@ <h1>Submit Sponsorship Information</h1>
<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>
Expand Down Expand Up @@ -149,7 +163,19 @@ <h1>Submit Sponsorship Information</h1>
<span class="helptext">{{ form.state.help_text }}</span>
{% endif %}
</p>
</div>
</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>


Expand Down

0 comments on commit dc5ff5b

Please sign in to comment.