Browse Source

Add required fields to other questions

pull/160/head
ariannedee 5 years ago
parent
commit
8b39b3e361
3 changed files with 22 additions and 21 deletions
  1. +20
    -18
      edivorce/apps/core/templates/question/10_other_questions.html
  2. +1
    -0
      edivorce/apps/core/utils/question_step_mapping.py
  3. +1
    -3
      edivorce/fixtures/Question.json

+ 20
- 18
edivorce/apps/core/templates/question/10_other_questions.html View File

@ -11,24 +11,24 @@
<h1><small>Step {% step_order step="other_questions" %}:</small>Other Questions</h1>
<div class="question-well">
<div class="question-well {% if address_to_send_official_document_street_you_error or address_to_send_official_document_city_you_error or address_to_send_official_document_country_you_error or address_to_send_official_document_other_country_you_error %}error{% endif %}">
<div>
<h3>What is the best address to send you official court documents?</h3>
<h2>Your Contact Information</h2>
<p>House and street number</p>
<p>House and street number{% if address_to_send_official_document_street_you_error %}{% include 'partials/required.html' %}{% endif %}</p>
{% input_field type="text" name="address_to_send_official_document_street_you" class="form-block input-wide response-textbox" %}
<p>City</p>
<p>City{% if address_to_send_official_document_city_you_error %}{% include 'partials/required.html' %}{% endif %}</p>
{% input_field type="text" name="address_to_send_official_document_city_you" class="form-block input-wide response-textbox" %}
<p>Prov/State (optional)</p>
<p>Prov/State {% include 'partials/optional.html' %}</p>
{% input_field type="text" name="address_to_send_official_document_prov_you" class="form-block input-narrow response-textbox" %}
<p>Country</p>
<p>Country{% if address_to_send_official_document_country_you_error or address_to_send_official_document_other_country_you_error %}{% include 'partials/required.html' %}{% endif %}</p>
<div class="radio"><label>{% input_field type="radio" class="radio-with-other" name="address_to_send_official_document_country_you" value="Canada" %}Canada</label></div>
<div class="radio"><label>{% input_field type="radio" class="radio-with-other" name="address_to_send_official_document_country_you" value="USA" %}USA</label></div>
<div class="radio"><label>{% input_field type="radio" class="radio-with-other radio_with_textbox" name="address_to_send_official_document_country_you" value="Other" %}Other {% input_field type="text" name="address_to_send_official_document_other_country_you" class="response-textbox other-textbox input-inline" tabindex="-1" %}</label></div>
<p>Postal code (optional)</p>
<p>Postal code {% include 'partials/optional.html' %}</p>
{% input_field type="text" name="address_to_send_official_document_postal_code_you" class="form-block input-wide response-textbox" %}
</div>
@ -37,32 +37,33 @@
If your main address is a PO box, you can list this instead of the fax or email but you must also list
an address that’s not a PO box.</p>
<p>Fax number (optional)</p>
<p>Fax number {% include 'partials/optional.html' %}</p>
{% input_field type="text" name="address_to_send_official_document_fax_you" class="form-block input-wide response-textbox" %}
<div class="form-group">
<p>Email Address (optional)</p>
<p>Email Address {% include 'partials/optional.html' %}</p>
{% input_field type="text" id="email_textbox" name="address_to_send_official_document_email_you" class="form-block input-wide response-textbox form-control" %}
</div>
</div>
</div>
<div class="question-well">
<div class="question-well {% if address_to_send_official_document_street_spouse_error or address_to_send_official_document_city_spouse_error or address_to_send_official_document_country_spouse_error or address_to_send_official_document_other_country_spouse_error %}error{% endif %}">
<div>
<h2>Your Spouse's Contact Information</h2>
<p>House and street number</p>
<p>House and street number{% if address_to_send_official_document_street_spouse_error %}{% include 'partials/required.html' %}{% endif %}</p>
{% input_field type="text" name="address_to_send_official_document_street_spouse" class="form-block input-wide response-textbox" %}
<p>City</p>
<p>City{% if address_to_send_official_document_city_spouse_error %}{% include 'partials/required.html' %}{% endif %}</p>
{% input_field type="text" name="address_to_send_official_document_city_spouse" class="form-block input-wide response-textbox" %}
<p>Prov/State (optional)</p>
<p>Prov/State {% include 'partials/optional.html' %}</p>
{% input_field type="text" name="address_to_send_official_document_prov_spouse" class="form-block input-narrow response-textbox" %}
<p>Country</p>
<p>Country{% if address_to_send_official_document_country_spouse_error or address_to_send_official_document_other_country_spouse_error %}
{% include 'partials/required.html' %}{% endif %}</p>
<div class="radio"><label>{% input_field type="radio" class="radio-with-other" name="address_to_send_official_document_country_spouse" value="Canada" %}Canada</label></div>
<div class="radio"><label>{% input_field type="radio" class="radio-with-other" name="address_to_send_official_document_country_spouse" value="USA" %}USA</label></div>
<div class="radio"><label>{% input_field type="radio" class="radio-with-other radio_with_textbox" name="address_to_send_official_document_country_spouse" value="Other" %}Other {% input_field type="text" name="address_to_send_official_document_other_country_spouse" class="response-textbox other-textbox input-inline" tabindex="-1" %}</label></div>
<p>Postal code (optional)</p>
<p>Postal code {% include 'partials/optional.html' %}</p>
{% input_field type="text" name="address_to_send_official_document_postal_code_spouse" class="form-block input-wide response-textbox" %}
</div>
@ -71,21 +72,22 @@
If your spouse's main address is a PO box, your spouse can list this instead of the fax or email but your spouse must also list
an address that’s not a PO box.</p>
<p>Fax number (optional)</p>
<p>Fax number {% include 'partials/optional.html' %}</p>
{% input_field type="text" name="address_to_send_official_document_fax_spouse" class="form-block input-wide response-textbox" %}
<div class="form-group">
<p>Email Address (optional)</p>
<p>Email Address {% include 'partials/optional.html' %}</p>
{% input_field type="text" id="email_textbox" name="address_to_send_official_document_email_spouse" class="form-block input-wide response-textbox form-control" %}
</div>
</div>
</div>
{% if married_marriage_like == "Legally married" %}
<div class="question-well">
<h2>Divorce is to take effect on:</h2>
<div class="question-well {% if divorce_take_effect_on_error or divorce_take_effect_on_specific_date_error %}error{% endif %}">
<h2>Divorce is to take effect on: {% if divorce_take_effect_on_error %}{% include 'partials/required.html' %}{% endif %}</h2>
<div class="radio"><label>{% input_field type="radio" class="radio-with-other" name="divorce_take_effect_on" value="the 31st day after the date of this order" data_target_id="take_effect_alert" data_reveal_target="false" %}the 31st day after the date of this order</label></div>
<div class="radio">
<label>{% input_field type="radio" class="radio-with-other" name="divorce_take_effect_on" value="specific date" data_target_id="take_effect_alert" data_reveal_target="true" %}a specific date
{% if divorce_take_effect_on_specific_date_error %}{% include 'partials/required.html' %}{% endif %}
<span class="input-group date date-picker-group" data-allow-future-date="true">
{% input_field type="text" name="divorce_take_effect_on_specific_date" id="effect_date" class="date-picker-future other-textbox input-inline form-control" tabindex="-1" placeholder="MMM D, YYYY" %}
<span class="input-group-addon" ><i class="fa fa-calendar circle"></i></span>


+ 1
- 0
edivorce/apps/core/utils/question_step_mapping.py View File

@ -183,6 +183,7 @@ page_step_mapping = {
'support': 'spousal_support',
'property': 'property_and_debt',
'other_orders': 'other_orders',
'other_questions': 'other_questions',
}


+ 1
- 3
edivorce/fixtures/Question.json View File

@ -708,9 +708,7 @@
"name": "Divorce is to take effect on",
"description": "For step 9, Form 52 This Court Orders that",
"summary_order": 68,
"required": "Conditional",
"conditional_target": "married_marriage_like",
"reveal_response": "Legally married"
"required": "Required"
},
"model": "core.question",
"pk": "divorce_take_effect_on"


Loading…
Cancel
Save