diff --git a/edivorce/apps/core/static/js/ajax.js b/edivorce/apps/core/static/js/ajax.js index 76c85786..fe8c0b06 100644 --- a/edivorce/apps/core/static/js/ajax.js +++ b/edivorce/apps/core/static/js/ajax.js @@ -8,7 +8,7 @@ var ajaxOnChange = function () { var isValid = true; // Check if date is in valid format DD/MM/YYYY - if (el.is(".date-picker") || el.is(".date-pickers")){ + if (el.is(".date-picker") || el.is(".date-pickers") || el.is(".date-picker-future")){ isValid = validateDate(el); } diff --git a/edivorce/apps/core/static/js/controllers.js b/edivorce/apps/core/static/js/controllers.js index 8eb7c11f..a7459197 100644 --- a/edivorce/apps/core/static/js/controllers.js +++ b/edivorce/apps/core/static/js/controllers.js @@ -193,7 +193,8 @@ var validateDate = function(el){ return true; } - if (isValidDate(el.val())) { + var isFuture = el.is('.date-picker-future'); + if (isValidDate(el.val(), isFuture)) { el.val(formatDate(stringToDate(el.val()))); return true; } @@ -206,7 +207,7 @@ var validateDate = function(el){ }; // validates that a string is a valid date -var isValidDate = function(dateString) { +var isValidDate = function(dateString, isFuture) { if (dateString.trim() == '') { return true; } @@ -215,7 +216,10 @@ var isValidDate = function(dateString) { if (!isNaN(dt)) { var today = new Date(); - if (dt <= today && dt.getFullYear() > 1900) { + if (isFuture && dt >= today && dt.getFullYear() <= today.getFullYear() + 100) { + return true; + } + else if (!isFuture && dt <= today && dt.getFullYear() > 1900) { return true; } } diff --git a/edivorce/apps/core/static/js/main.js b/edivorce/apps/core/static/js/main.js index a61edd7c..90439714 100755 --- a/edivorce/apps/core/static/js/main.js +++ b/edivorce/apps/core/static/js/main.js @@ -117,10 +117,19 @@ var deleteAddedField = function(e){ // Configuration for datepicker var date_picker = function (selector, showOnFocus) { + var startDate, endDate; + if($(selector).data("allow-future-date")){ + startDate = "+1d"; + endDate = "+100y"; + } + else { + startDate = "-100y"; + endDate = "0d"; + } $(selector).datepicker({ format: "dd/mm/yyyy", - startDate: "-100y", - endDate: "0d", + startDate: startDate, + endDate: endDate, autoclose: true, todayHighlight: true, immediateUpdates: true, diff --git a/edivorce/apps/core/templates/pdf/form35.html b/edivorce/apps/core/templates/pdf/form35.html index 19df4cba..21815ba8 100644 --- a/edivorce/apps/core/templates/pdf/form35.html +++ b/edivorce/apps/core/templates/pdf/form35.html @@ -43,10 +43,6 @@ REQUISITION - -

Filed by: [party(ies)] @@ -61,10 +57,6 @@ FILED WITH THIS REQUISITION ARE:

- - {% check_list source=responses.form35_dummy_requisition value='option1' as dummy_option %}

draft of the order sought; @@ -82,19 +74,11 @@ filing fee.

- - {% check_list source=responses.form35_dummy_additional value='option1' as dummy_option %}

proof of service of the notice of family claim or counterclaim, as the case may be.

- -

(a) the family law case includes a claim for divorce and the notice of family claim, response to family claim, counterclaim or response to counterclaim identifies a child of the marriage within the meaning of the Divorce Act (Canada), or @@ -108,10 +92,6 @@ Child Support Affidavit in Form F37.

- - {% check_list source=responses.form35_dummy_additional value='option3' as dummy_option %}

affidavit in Form F38. diff --git a/edivorce/apps/core/templates/pdf/form36.html b/edivorce/apps/core/templates/pdf/form36.html index 52380516..887b159f 100644 --- a/edivorce/apps/core/templates/pdf/form36.html +++ b/edivorce/apps/core/templates/pdf/form36.html @@ -45,11 +45,6 @@ - -

-

I CERTIFY the pleadings and proceedings in this family law case are in order
[add the following if applicable: except that  ].

diff --git a/edivorce/apps/core/templates/pdf/form38.html b/edivorce/apps/core/templates/pdf/form38.html index 96e6c88f..436d4196 100644 --- a/edivorce/apps/core/templates/pdf/form38.html +++ b/edivorce/apps/core/templates/pdf/form38.html @@ -43,26 +43,12 @@

Claimant: {% include "partials/name_with_alias.html" with name=responses.name_you use_other_name=responses.any_other_name_you other_names=responses.other_name_you %}

-

Respondent: {% include "partials/name_with_alias.html" with name=responses.name_spouse use_other_name=responses.any_other_name_spouse other_names=responses.other_name_spouse %}

-

AFFIDAVIT - DESK ORDER DIVORCE

-

I, {% if responses.name_you %}{{ responses.name_you }}{% else %}[name]{% 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 %} @@ -76,19 +62,10 @@

2 There is no possibility of reconciliation between my spouse and me.

- - -

3 I believe that the facts set out in {% if responses.form38_dummy_facts == 'option1' %}the notice of family claim{% else %}the response to family claim and counterclaim{% endif %} are true.

- - {% if responses.original_marriage_certificate == 'YES' %}

4 The certificate of marriage or certified copy of the registration of marriage filed in this family law case fully and correctly describes the true particulars of the marriage. @@ -100,22 +77,17 @@

{% endif %} - - - {% if responses.divorce_reason == 'live separate' %} -

- 5 I was living separate and apart from my spouse at the start of this family law case and I have lived separate and apart from my spouse since - {% if responses.separation_date %} {{ responses.separation_date }}{% else %} [dd/mmm/yyyy]{% endif %}, except: - {% multiple_values_to_list source=responses.reconciliation_period as periods %} - {% if periods != '[]' %} - {% for period in periods %} - {{ period }} - {% endfor %} - {% else %}[provide dates of any periods of attempted reconciliation].{% endif %} -

- {% else %} +

+ 5 I was living separate and apart from my spouse at the start of this family law case and I have lived separate and apart from my spouse since + {% if responses.separation_date %} {{ responses.separation_date }}{% else %} [dd/mmm/yyyy]{% endif %}, except: + {% multiple_values_to_list source=responses.reconciliation_period as periods %} + {% if periods != '[]' %} + {% for period in periods %} + {{ period }} + {% endfor %} + {% else %}[provide dates of any periods of attempted reconciliation].{% endif %} +

+ {% comment "This section is out of scope" %}

5 [Select this provision if the grounds for divorce are adultery of a spouse and there has been an admission of adultery.] My spouse has admitted to me that [he/she] committed the acts of adultery alleged in Schedule 1 of the [notice of family claim/counterclaim] and @@ -141,20 +113,15 @@

5 [Select this provision if the grounds for divorce are physical or mental cruelty of a spouse.] My spouse has treated me with physical or mental cruelty since the date of the marriage as follows:  [provide details] 

- {% endif %} + {% endcomment %}

6 I am neither directly nor indirectly a party to an agreement or conspiracy for the purpose of subverting the administration of justice, or to any agreement, understanding or arrangement to fabricate or suppress evidence or to deceive the court.

-

+ 7 There are no children of the marriage as defined by the Divorce Act (Canada).

- - {% if responses.children_of_marriage == 'NO' %} -

- 7 There are no children of the marriage as defined by the Divorce Act (Canada). -

- {% else %} + {% comment "This section is out of scope" %}

7 There are children of the marriage as defined by the Divorce Act (Canada) and

@@ -167,18 +134,15 @@

(c) the following arrangements for parenting have been made:  [provide details]  .

- {% endif %} + {% endcomment %} - {% if responses.form38_dummy_new_name %}

8 Pursuant to section 5 of the Name Act, I am seeking to change my name from {% if responses.name_you %}{{ responses.name_you }}{% else %} {% endif %} to {% if responses.form38_dummy_new_name %}{{ responses.form38_dummy_new_name }}{% else %} {% endif %}. This application for a name change relates only to myself.

{% endif %} - + {% endcomment %} diff --git a/edivorce/apps/core/templates/pdf/form38_we.html b/edivorce/apps/core/templates/pdf/form38_we.html index 9d4ef4f0..4958276d 100644 --- a/edivorce/apps/core/templates/pdf/form38_we.html +++ b/edivorce/apps/core/templates/pdf/form38_we.html @@ -87,18 +87,17 @@

{% endif %} - {% if responses.divorce_reason == 'live separate' %} -

- 5 Claimant 1 and claimant 2 were living separate and apart from each other at the start of this family law case and claimant 1 and claimant 2 have lived separate and apart from each other since - {% if responses.separation_date %} {{ responses.separation_date }}{% else %} [dd/mmm/yyyy]{% endif %}, except: - {% multiple_values_to_list source=responses.reconciliation_period as periods %} - {% if periods != '[]' %} - {% for period in periods %} - {{ period }} - {% endfor %} - {% else %}[provide dates of any periods of attempted reconciliation].{% endif %} -

- {% else %} +

+ 5 Claimant 1 and claimant 2 were living separate and apart from each other at the start of this family law case and claimant 1 and claimant 2 have lived separate and apart from each other since + {% if responses.separation_date %} {{ responses.separation_date }}{% else %} [dd/mmm/yyyy]{% endif %}, except: + {% multiple_values_to_list source=responses.reconciliation_period as periods %} + {% if periods != '[]' %} + {% for period in periods %} + {{ period }} + {% endfor %} + {% else %}[provide dates of any periods of attempted reconciliation].{% endif %} +

+ {% comment "This section is out of scope" %}

5 [Select this provision if the grounds for divorce are adultery of a spouse and there has been an admission of adultery.] My spouse has admitted to me that [he/she] committed the acts of adultery alleged in Schedule 1 of the [notice of family claim/counterclaim] and @@ -124,16 +123,15 @@

5 [Select this provision if the grounds for divorce are physical or mental cruelty of a spouse.] My spouse has treated me with physical or mental cruelty since the date of the marriage as follows:  [provide details] 

- {% endif %} + {% endcomment %}

6 We are neither directly nor indirectly a party to an agreement or conspiracy for the purpose of subverting the administration of justice, or to any agreement, understanding or arrangement to fabricate or suppress evidence or to deceive the court.

- {% if responses.children_of_marriage == 'NO' %} -

- 7 There are no children of the marriage as defined by the Divorce Act (Canada). -

- {% else %} +

+ 7 There are no children of the marriage as defined by the Divorce Act (Canada). +

+ {% comment "This section is out of scope" %}

7 There are children of the marriage as defined by the Divorce Act (Canada) and

@@ -146,7 +144,7 @@

(c) the following arrangements for parenting have been made:  [provide details]  .

- {% endif %} + {% endcomment %} {% if responses.form38_dummy_new_name %} diff --git a/edivorce/apps/core/templates/pdf/form52.html b/edivorce/apps/core/templates/pdf/form52.html index e1a5d8ae..a3fa2840 100644 --- a/edivorce/apps/core/templates/pdf/form52.html +++ b/edivorce/apps/core/templates/pdf/form52.html @@ -41,17 +41,6 @@ FINAL ORDER - -
@@ -64,8 +53,8 @@
- -