Browse Source

Updated DIV-197, 245, 320, and 340

pull/160/head
Charles Shin 8 years ago
parent
commit
6b3db500a5
7 changed files with 52 additions and 13 deletions
  1. +21
    -0
      edivorce/apps/core/static/js/main.js
  2. +1
    -1
      edivorce/apps/core/templates/base.html
  3. +2
    -2
      edivorce/apps/core/templates/dashboard/print_form.html
  4. +7
    -7
      edivorce/apps/core/templates/pdf/form38.html
  5. +3
    -2
      edivorce/apps/core/templates/question/01_orders.html
  6. +1
    -1
      edivorce/apps/core/urls.py
  7. +17
    -0
      edivorce/apps/core/views/pdf.py

+ 21
- 0
edivorce/apps/core/static/js/main.js View File

@ -74,6 +74,27 @@ $(function () {
}
});
// For want which order page
// If either Spousal support or Division of property and debts is not selected show alert message
// if user still wants to proceed(click next again), let them proceed to next page
$('#check_order_selected').on('click', function (e) {
var showAlert = $(this).data('show_alert');
var proceedNext = $(this).data('proceed');
if (!showAlert) {
$(".checkbox-group input:checkbox").not(":checked").each(function () {
console.log($(this).val());
if ($(this).val() == 'Division of property and debts' || $(this).val() == 'Spousal support') {
showAlert = true;
}
});
}
if (showAlert && !proceedNext) {
$('#unselected_orders_alert').show();
e.preventDefault();
$(this).data('proceed', true);
}
});
// spinner
$('body').on('click', 'input.spinner, a.spinner', function () {
$('div#progress-overlay').show();


+ 1
- 1
edivorce/apps/core/templates/base.html View File

@ -101,7 +101,7 @@
{% block formbuttons %}
<div class="form-buttons clearfix">
<a class="btn btn-primary" href="{% block formBack %}#{% endblock %}"><i class="fa fa-arrow-circle-o-left"></i>&nbsp;&nbsp;&nbsp;Back</a>
<a class="btn btn-success pull-right" href="{% block formNext %}#{% endblock %}">Next&nbsp;&nbsp;&nbsp;<i class="fa fa-arrow-circle-o-right"></i></a>
<a class="btn btn-success pull-right" href="{% block formNext %}#{% endblock %}" {% block nextButtonAttribute %}{% endblock %}>Next&nbsp;&nbsp;&nbsp;<i class="fa fa-arrow-circle-o-right"></i></a>
<a class="btn btn-primary pull-right save-spinner" href="{% url 'overview' %}"><i class="fa fa-floppy-o"></i>&nbsp;&nbsp;&nbsp;Save and return another time</a>
</div>
{% endblock %}


+ 2
- 2
edivorce/apps/core/templates/dashboard/print_form.html View File

@ -119,11 +119,11 @@
<p>
Claimant 1
</p>
<a href="{% url 'pdf_form' '38' %}?html" target="_blank">Preview</a> | <a href="{% url 'pdf_form' '38' %}" class="spinner">Print</a>
<a href="{% url 'pdf_form' '38_claimant1' %}?html" target="_blank">Preview</a> | <a href="{% url 'pdf_form' '38_claimant1' %}" class="spinner">Print</a>
<p>
Claimant 2
</p>
<a href="{% url 'pdf_form' '38' %}?html" target="_blank">Preview</a> | <a href="{% url 'pdf_form' '38' %}" class="spinner">Print</a>
<a href="{% url 'pdf_form' '38_claimant2' %}?html" target="_blank">Preview</a> | <a href="{% url 'pdf_form' '38_claimant2' %}" class="spinner">Print</a>
</div>
<div class="question-well">


+ 7
- 7
edivorce/apps/core/templates/pdf/form38.html View File

@ -26,7 +26,7 @@
This is the <span class="form-entry not-complete">[<em>1st/2nd/3rd/etc.</em>]</span> affidavit
</p>
<p class="text-right">
of <span class="form-entry not-complete">[<em>name</em>]</span> in this case
of {% if responses.name_claimant %}{{ responses.name_claimant }}{% else %}<span class="form-entry not-complete">[<em>name</em>]</span>{% endif %} in this case
</p>
<p class="text-right">
and was made on <span class="form-entry not-complete">[<em>dd/mmm/yyyy</em>]</span>
@ -50,11 +50,11 @@
<strong>AFFIDAVIT - DESK ORDER DIVORCE</strong>
</p>
<p>
I, {% if responses.name_you %}{{ responses.name_you }}{% else %}<span class="form-entry not-complete">[<em>name</em>]</span>{% endif %}, of
{% if responses.address_to_send_official_document_street_you and responses.address_to_send_official_document_city_you and responses.address_to_send_official_document_prov_you and responses.address_to_send_official_document_country_you and responses.address_to_send_official_document_postal_code_you %}
{{ responses.address_to_send_official_document_street_you }}, {{ responses.address_to_send_official_document_city_you }}, {{ responses.address_to_send_official_document_prov_you }},
{% if responses.address_to_send_official_document_country_you == 'Other' %} {{ responses.address_to_send_official_document_other_country_you }}{% else %} {{ responses.address_to_send_official_document_country_you }}{% endif %}, {{ responses.address_to_send_official_document_postal_code_you }} {% else %}<span class="form-entry not-complete">[<em>address</em>]</span>{% endif %},
{% if responses.occupation_you %} {{ responses.occupation_you }}{% else %}<span class="form-entry not-complete">[<em>occupation</em>]</span>{% endif %}, SWEAR (OR AFFIRM) THAT:
I, {% if responses.name_claimant %}{{ responses.name_claimant }}{% else %}<span class="form-entry not-complete">[<em>name</em>]</span>{% endif %}, of
{% if responses.address_to_send_official_document_street_claimant and responses.address_to_send_official_document_city_claimant and responses.address_to_send_official_document_prov_claimant and responses.address_to_send_official_document_country_claimant and responses.address_to_send_official_document_postal_code_claimant %}
{{ responses.address_to_send_official_document_street_claimant }}, {{ responses.address_to_send_official_document_city_claimant }}, {{ responses.address_to_send_official_document_prov_claimant }},
{% if responses.address_to_send_official_document_country_claimant == 'Other' %} {{ responses.address_to_send_official_document_other_country_claimant }}{% else %} {{ responses.address_to_send_official_document_country_claimant }}{% endif %}, {{ responses.address_to_send_official_document_postal_code_claimant }} {% else %}<span class="form-entry not-complete">[<em>address</em>]</span>{% endif %},
{% if responses.occupation_claimant %} {{ responses.occupation_claimant }}{% else %}<span class="form-entry not-complete">[<em>occupation</em>]</span>{% endif %}, SWEAR (OR AFFIRM) THAT:
</p>
<p class="schIndent1">
1 I am <span class="form-entry not-complete">[<em>the claimant/the respondent/Claimant 1/Claimant 2</em>]</span>.
@ -138,7 +138,7 @@
{% if responses.form38_dummy_new_name %}
<p class="schIndent1">
8 Pursuant to section 5 of the <em>Name Act</em>, I am seeking to change my name from {% if responses.name_you %}{{ responses.name_you }}{% else %}<span class="form-entry not-complete">&nbsp;</span>{% endif %} to {% if responses.form38_dummy_new_name %}{{ responses.form38_dummy_new_name }}{% else %}<span class="form-entry not-complete">&nbsp;</span>{% endif %}. This application for a name change relates only to myself.
8 Pursuant to section 5 of the <em>Name Act</em>, I am seeking to change my name from {% if responses.name_claimant %}{{ responses.name_claimant }}{% else %}<span class="form-entry not-complete">&nbsp;</span>{% endif %} to {% if responses.form38_dummy_new_name %}{{ responses.form38_dummy_new_name }}{% else %}<span class="form-entry not-complete">&nbsp;</span>{% endif %}. This application for a name change relates only to myself.
</p>
{% endif %}


+ 3
- 2
edivorce/apps/core/templates/question/01_orders.html View File

@ -101,7 +101,7 @@
<div class="checkbox"><label>{% input_field type="checkbox" name="want_which_orders" value="Child support" %}<b>Child support (Out of scope)</b></label></div>
{% endcomment %}
<div class="information-message bg-danger" id="unselected_orders_alert" >
<div class="information-message bg-danger" id="unselected_orders_alert" hidden>
<p>We've noticed that at this point in time you are not applying for spousal support and/or division of property, debt, or a pension. If you decide to request these items in the future there are some time limits.</p>
<h2>Division of Property and Debts</h2>
<p>If you were married, you must apply to divide property within two years after you get an order for divorce. If you were living in a marriage-like relationship for at least two years, you must apply within two years of the date you separated.</p>
@ -128,7 +128,8 @@
</div>
</div>
{% endblock %} {% block formBack %}{% url 'overview' %}{% endblock %} {% block formNext %}{% next_step step='orders' %}{% endblock %} {% block sidebarText %}
{% endblock %} {% block formBack %}{% url 'overview' %}{% endblock %} {% block formNext %}{% next_step step='orders' %}{% endblock %}{% block nextButtonAttribute %}id="check_order_selected" data-proceed="false" data-show_alert="false"{% endblock %}
{% block sidebarText %}
<p>An order is the record of the judge's decision. It is filed at the court registry.</p>
<p>
In Supreme Court, the parties involved in a case (or their lawyers) are responsible for telling the court the order(s) they want. This is done by putting the details in writing in their application and in a draft of the order to be signed by the judge


+ 1
- 1
edivorce/apps/core/urls.py View File

@ -22,7 +22,7 @@ urlpatterns = [
url(r'^divorce-dev/headers$', system.headers),
url(r'^headers$', system.headers),
url(r'^pdf-form(?P<form_number>[0-9]{1,3}(_we)?)$', pdf.form, name="pdf_form"),
url(r'^pdf-form(?P<form_number>[0-9]{1,3}(_we|_claimant1|_claimant2)?)$', pdf.form, name="pdf_form"),
url(r'^prequalification/step_(?P<step>[0-9]{2})$', main.prequalification, name="prequalification"),
url(r'^question/(?P<step>.*)$', main.question, name="question_steps"),
url(r'^', main.intro, name="intro"),


+ 17
- 0
edivorce/apps/core/views/pdf.py View File

@ -14,6 +14,13 @@ def form(request, form_number):
user = BceidUser.objects.get(user_guid=request.bceid_user.guid)
responses = get_responses_from_db(user)
if form_number == "38_claimant1":
form_number = "38"
responses = add_claimant_info(responses, '_you')
elif form_number == "38_claimant2":
form_number = "38"
responses = add_claimant_info(responses, '_spouse')
return render_form(request, 'form%s' % form_number,
{
"css_root": settings.WEASYPRINT_CSS_LOOPBACK,
@ -45,3 +52,13 @@ def render_form(request, form_name, context):
response['Content-Disposition'] = 'inline;filename=' + form_name + '.pdf'
return response
def add_claimant_info(responses, claimant):
claimant_info = {}
for key in responses:
if key.endswith(claimant):
claimant_key = key.replace(claimant, '_claimant')
claimant_info[claimant_key] = responses[key]
responses.update(claimant_info)
return responses

Loading…
Cancel
Save