Browse Source

Added code remapping for EFSS1/EFSS2 and validation exceptions for EFSS1/AFTL

pull/172/head
Michael Olund 5 years ago
parent
commit
e1ee6ff494
5 changed files with 21 additions and 11 deletions
  1. +5
    -2
      edivorce/apps/core/static/js/filing.js
  2. +5
    -2
      edivorce/apps/core/utils/efiling_packaging.py
  3. +5
    -4
      edivorce/apps/core/views/efiling.py
  4. +4
    -1
      vue/src/components/Uploader/Uploader.vue
  5. +2
    -2
      vue/src/utils/forms.js

+ 5
- 2
edivorce/apps/core/static/js/filing.js View File

@ -2,8 +2,11 @@ $(window).ready(function () {
$('#submitDocuments').on('click', function (e) {
var missingForms = []
$('div#app').children().each(function (i, child) {
if ($(child).find("div.placeholder").length > 0) {
missingForms.push($(child).find("h5 a").text());
placeholder = $(child).find("div.placeholder");
if (placeholder.length > 0) {
if (!placeholder.hasClass('optional')) {
missingForms.push($(child).find("h5 a").text());
}
}
})
var errorBox = $('#error-message-box');


+ 5
- 2
edivorce/apps/core/utils/efiling_packaging.py View File

@ -108,7 +108,7 @@ class EFilingPackaging:
def format_package(self, request, responses, files, documents):
package = PACKAGE_FORMAT.copy()
package['filingPackage']['documents'] = documents
package['filingPackage']['court']['location'] = self._get_location(responses)
package['filingPackage']['court']['location'] = self._get_location(responses)
package['filingPackage']['parties'] = self._get_parties(responses)
file_number = self._get_file_number(responses)
if file_number:
@ -135,7 +135,10 @@ class EFilingPackaging:
document = PACKAGE_DOCUMENT_FORMAT.copy()
filename = self._get_filename(doc_type, party_code)
document['name'] = filename
document['type'] = doc_type
if doc_type in ['EFSS1', 'EFSS2']:
document['type'] = 'EFSS'
else:
document['type'] = doc_type
return document
def _get_filename(self, doc_type, party_code):


+ 5
- 4
edivorce/apps/core/views/efiling.py View File

@ -71,10 +71,11 @@ def _validate_and_submit_documents(request, responses, initial=False):
uploaded, generated = forms_to_file(responses, initial)
for form in uploaded:
docs = Document.objects.filter(
bceid_user=user, doc_type=form['doc_type'], party_code=form.get('party_code', 0))
if docs.count() == 0:
errors.append(f"Missing documents for {Document.form_types[form['doc_type']]}")
if form['doc_type'] not in ['EFSS1', 'AFTL']:
docs = Document.objects.filter(
bceid_user=user, doc_type=form['doc_type'], party_code=form.get('party_code', 0))
if docs.count() == 0:
errors.append(f"Missing documents for {Document.form_types[form['doc_type']]}")
if errors:
return errors, None


+ 4
- 1
vue/src/components/Uploader/Uploader.vue View File

@ -8,6 +8,9 @@
<span v-if="party === 1"> - For You</span>
<span v-if="party === 2"> - For Your Spouse</span>
</h5>
<p v-if="formDef.optional">
(<em><strong>Optional</strong></em>: {{ formDef.optional }})
</p>
<tooltip
:text="formDef.help"
trigger="outside-click"
@ -44,7 +47,7 @@
@input-file="inputFile"
@input-filter="inputFilter"
>
<div v-if="files.length === 0" class="placeholder">
<div v-if="files.length === 0" class="placeholder" :class="{'optional': formDef.optional}">
<i class="fa fa-plus-circle"></i><br />
<em>
Drag and Drop the PDF document or JPG pages here,<br />or click here


+ 2
- 2
vue/src/utils/forms.js View File

@ -28,7 +28,7 @@ export default {
name: "Electronic Filing Statement (F96)",
preText: "Upload the signed and scanned",
help:
"This form is used to confirm that the document you are filing electronically shows your original signature and is a true copy of the original paper version of the document. - Requires signature by both you and your spouse (but not a signature in front of a commissioner)",
"This form is used to confirm that the document you are filing electronically shows your original signature and is a true copy of the original paper version of the document. - Requires signature you only (but not a signature in front of a commissioner)",
postText: "for your Affidavit of Translation form",
optional: "Required only if your marriage certificate is NOT in English",
},
@ -36,7 +36,7 @@ export default {
name: "Electronic Filing Statement (F96)",
preText: "Upload the signed and scanned",
help:
"This form is used to confirm that the document you are filing electronically shows your original signature and is a true copy of the original paper version of the document. - Requires signature by both you and your spouse (but not a signature in front of a commissioner)",
"This form is used to confirm that the document you are filing electronically shows your original signature and is a true copy of the original paper version of the document. - Requires signature by the party named on the form (but not a signature in front of a commissioner)",
},
MC: {
name: "Proof of Marriage",


Loading…
Cancel
Save