diff --git a/edivorce/apps/core/static/js/filing.js b/edivorce/apps/core/static/js/filing.js index 2ba187f1..78df2588 100644 --- a/edivorce/apps/core/static/js/filing.js +++ b/edivorce/apps/core/static/js/filing.js @@ -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'); diff --git a/edivorce/apps/core/utils/efiling_packaging.py b/edivorce/apps/core/utils/efiling_packaging.py index e907964e..39682d03 100644 --- a/edivorce/apps/core/utils/efiling_packaging.py +++ b/edivorce/apps/core/utils/efiling_packaging.py @@ -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): diff --git a/edivorce/apps/core/views/efiling.py b/edivorce/apps/core/views/efiling.py index e004962a..6da7aaa5 100644 --- a/edivorce/apps/core/views/efiling.py +++ b/edivorce/apps/core/views/efiling.py @@ -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 diff --git a/vue/src/components/Uploader/Uploader.vue b/vue/src/components/Uploader/Uploader.vue index 91933384..96a823a5 100644 --- a/vue/src/components/Uploader/Uploader.vue +++ b/vue/src/components/Uploader/Uploader.vue @@ -8,6 +8,9 @@ - For You - For Your Spouse +
+ (Optional: {{ formDef.optional }}) +