diff --git a/docassemble/MATCSmallClaims/data/questions/efiling.yml b/docassemble/MATCSmallClaims/data/questions/efiling.yml new file mode 100644 index 0000000..a513c0d --- /dev/null +++ b/docassemble/MATCSmallClaims/data/questions/efiling.yml @@ -0,0 +1,131 @@ +--- +include: + - docassemble.EFSPIntegration:efiling_integration.yml + - docassemble.EFSPIntegration:toga_payments.yml +--- +if: al_person_answering == "user" +code: | + # The default needs the court to file in first, not doing that. + efile_setup = len(available_efile_courts) > 0 +--- +code: | + available_initial_efile_courts = proxy_conn.get_courts(fileable_type="INITIAL", with_names=False).data or [] +--- +if: al_person_answering != "user" +code: | + # For now, the attorney stuff doesn't work still + efile_setup = False +--- +code: | + efile_case_category_filters = [CodeType('5990'), 'Small Claims'] +--- +code: | + if claim_amount <= 500: + efile_case_type_filters = [CodeType('5994'), 'Small Claims $500 or less', ['Small Claims', '500']] + elif claim_amount > 500 and claim_amount <= 2000: + efile_case_type_filters = [CodeType('5993'), 'Small Claims $501 - $2000', ['Small Claims', '501', '2000']] + elif claim_amount > 2000 and claim_amount <= 5000: + efile_case_type_filters = [CodeType('5991'), 'Small Claims $2001 - $5000', ['Small Claims', '2001', '5000']] + elif claim_amount > 5000: + efile_case_type_filters = [CodeType('5992'), 'Small Claims over $5000', ['Small Claims', 'over', '5000']] + else: + efile_case_type_filters = [] + + efile_case_type_filters.append('Small Claims') +--- +code: | + small_claims_bundle.filing_type_filters = [CodeType('6143'), 'Statement of Small Claims entered through e-file process', 'Statement of Small Claim', 'Small Claim'] +--- +code: | + exhibit_attachment.filing_type_filters = ['Exhibit or document for inclusion in Small Claims Case filed', ['Exhibit', 'Small claim'], 'Exhibit'] +--- +generic object: ALDocumentBundle +code: | + x.optional_services.there_are_any = False +--- +generic object: ALDocument +code: | + x.optional_services.there_are_any = False +--- +code: | + users[i].party_type_filters = ['Plaintiff'] +--- +code: | + other_parties[i].party_type_filters = ['Defendant'] +--- +generic object: DAObject +code: | + x.filing_description = '' + x.reference_number = None + x.filing_parties = ['users[0]'] + x.filing_action = 'efile' +--- +code: | + small_claims_bundle.description = comments_to_clerk + small_claims_bundle.reference_number = None + small_claims_bundle.filing_parties = ['users[0]'] + small_claims_bundle.filing_action = 'efile' +--- +code: | + is_initial_filing = True +--- +if: can_check_efile +code: | + efile_case_category + efile_case_type + small_claims_bundle.completed + # exhibit_attachment.completed + + if wants_fee_waiver: + affidavitofindigency_attachment.completed + tyler_payment_id = default_jurisdiction_waiver + else: + tyler_payment_id + + all_required_screens_shown + set_efile_variables = True +--- +if: not can_check_efile +code: | + set_efile_variables = True +--- +code: | + small_claims_bundle.description = comments_to_clerk + efile + sent_email_to_court + efile_and_email = True +--- +code: | + should_cc_user = False +--- +code: | + users[0].is_form_filler = al_person_answering == "user" +--- +id: user-wants-efile-no-specific-court +question: | + Do you want to e-file this document directly with the court? +subquestion: | + You may be able to electronically-file (e-file) this document with the court, if the court allows it. + + This means you don't have to print out the document. The court + will communicate with you through your email or phone. + + You will have to provide your email to e-file this document. If you don't wish to provide that, + you can choose not to efile. +fields: + - Do you want to e-file?: user_wants_efile + datatype: yesnoradio +--- +id: you-will-not-be-able-to-efile +question: | + You will *not* be able to e-file this document +subquestion: | + % if al_person_answering == "attorney": + Unfortunately, e-filing as an attorney is not yet supported. + % else: + Unfortunately, you cannot e-file this document at the court through this program. + % endif + + However, you can still continue and download a completed form at the end. +continue button field: show_no_efile +--- \ No newline at end of file diff --git a/docassemble/MATCSmallClaims/data/questions/small_claims.yml b/docassemble/MATCSmallClaims/data/questions/small_claims.yml index 70a572b..2dea2c3 100644 --- a/docassemble/MATCSmallClaims/data/questions/small_claims.yml +++ b/docassemble/MATCSmallClaims/data/questions/small_claims.yml @@ -1,10 +1,12 @@ --- include: - docassemble.AssemblyLine:assembly_line.yml + - docassemble.EFSPIntegration:efiling_integration.yml - docassemble.MassAccess:massaccess.yml - docassemble.ALAffidavitOfIndigency:affidavit_body.yml - docassemble.MATCMilitaryAffidavit:military_affidavit.yml - docassemble.MATCTheme:matc_theme.yml + - efiling.yml --- metadata: title: >- @@ -61,23 +63,22 @@ code: | code: | al_form_type = "starts_case" --- +code: | + jurisdiction_id = 'massachusetts' +--- +code: | + proxy_conn = ProxyConnection(credentials_code_block='tyler_login', default_jurisdiction=jurisdiction_id) +--- code: | plaintiffs = users defendants = other_parties --- objects: - - users: ALPeopleList.using(complete_attribute=['name.first', 'address.address', 'email', 'phone_number']) + - users: ALPeopleList.using(complete_attribute='complete') - attorneys: ALPeopleList.using(complete_attribute=['bbo_number', 'address.address', 'phone_number']) - other_parties: ALPeopleList.using( there_are_any=True, - complete_attribute=['address.address', 'phone_number', 'email']) - - exhibit_attachment: ALExhibitDocument.using( - title="Exhibits", - filename="exhibits", - add_page_numbers=True, - include_table_of_contents=True, - include_exhibit_cover_pages=True, - ) + complete_attribute='complete') --- sections: - introduction: Getting started @@ -101,7 +102,7 @@ code: | nav.set_section("required_info") small_claims_intro filing_fee_acknowledged - + nav.set_section("wants_fee_waiver") if wants_fee_waiver: is_indigent @@ -113,7 +114,10 @@ code: | attorneys.there_are_any = True else: attorneys.there_are_any = False - + + if can_check_efile: + tyler_login + attorneys.gather() if attorneys.number_gathered() > 0: attorneys[0].bbo_number @@ -154,6 +158,8 @@ code: | trial_court trial_court.department + set_efile_variables + users[0].states_above_true nav.set_section("review_small_claims") small_claims_preview_question @@ -250,9 +256,9 @@ continue button field: filing_fee_acknowledged question: | Filing fees for small claims subquestion: | - To file a small claim, you must also pay a filing fee based on the amount of your claim. If you cannot afford the filing fee, you can use this interview to fill out a document requesting the court to determine if you may file your small claim for free. + To file a small claim, you must also pay a one time fee to start the case based on the amount of your claim. If you cannot afford the fee, you can use this interview to fill out a document requesting the court to determine if you may file your small claim for free. - Amount of your claim | Filing fee + Amount of your claim | Initiation fee ---------------------|----------- $500 or less | $40 $501–2,000 | $50 @@ -323,6 +329,25 @@ fields: under text: | [Visit the Board of Bar Overseers site](https://www.massbbo.org/bbolookup.php) to look up your BBO number. --- +code: | + users[i].name.first + users[i].address.address + users[i].email + if can_check_efile: + users[i].is_form_filler + users[i].party_type + users[i].is_new + users[i].complete = True +--- +code: | + other_parties[i].name.first + other_parties[i].address.address + other_parties[i].email + if can_check_efile: + other_parties[i].party_type + other_parties[i].is_new + other_parties[i].complete = True +--- sets: - attorneys[i].address.address - attorneys[i].address.city @@ -356,6 +381,7 @@ fields: - Phone: attorneys[i].phone_number required: False - "Email (required)": attorneys[i].email + datatype: email required: True validation code: | if not attorneys[i].email and not attorneys[i].phone_number: @@ -401,6 +427,21 @@ fields: label: Suffix (such as Jr., Sr., or III; leave blank if none) required: False --- +sets: + - x.address.address + - x.address.city + - x.address.zip + - x.address.unit + - x.address.state + - x.address.country +id: persons address +generic object: ALIndividual +question: | + What is ${ x.possessive('address') }? +fields: + - code: | + x.address_fields(country_code=AL_DEFAULT_COUNTRY, default_state=AL_DEFAULT_STATE, required={'zip': True}) +--- id: plaintiff's address question: | % if i == 0 and al_person_answering == "user": @@ -460,16 +501,27 @@ question: | What is ${ users[0] }'s contact information? % endif subquestion: | - If you do not have a phone number or email address, write the phone number or email of someone who can reach you. Providing an email address is optional, **but recommended**. + If you do not have a phone number or email address, write the phone number or email of someone who can reach you. + % if can_check_efile: + Providing an email address is required when e-filing. + % else: + Providing an email address is optional, **but recommended**. + % endif ${ collapse_template(why_contact_info_needed_template) } fields: - Phone number: users[0].phone_number required: False - - "Email address (recommended)": users[0].email + - label: | + % if can_check_efile: + Email address (required) + % else: + Email address (recommended) + % endif + field: users[0].email datatype: email - required: False + required: can_check_efile - Other ways to reach you: users[0].other_contact_method input type: area required: False @@ -506,11 +558,7 @@ validation code: | --- id: any other opposing parties question: | - % if user_started_case: - Are there any other defendants? - % else: Are there any other defendants? - % endif subquestion: | % if len(other_parties.elements) > 0: So far, you have told us about ${comma_and_list(other_parties.complete_elements())}. @@ -545,18 +593,8 @@ if: | len(all_matches) and all_courts.filter_courts(allowed_courts) id: choose a court (courts matching provided address were found) question: | - % if al_form_type == 'starts_case': Where do you want to file your claim? - % elif al_form_type == 'appeal': - In which trial court did you first file your claim? - % else: - Where was your claim originally filed? - % endif subquestion: | - % if not al_form_type == 'starts_case': - Find the court name on your documents and match it with the court name here. - % endif - % if len(all_matches) > 0: Below is a map of the court(s) that serve the address you gave us, @@ -591,7 +629,27 @@ fields: - no label: trial_court datatype: object object labeler: court_short_label - choices: all_courts.filter_courts(allowed_courts) + choices: | + all_courts.filter_courts(allowed_courts, search_column="tyler_code", search_func=lambda c: c in available_initial_efile_courts) + css class: not-required-if-disabled +--- +if: | + not len(all_matches) and all_courts.filter_courts(allowed_courts) +id: choose a court (no courts matching address) +question: | + Where do you want to file your claim? +subquestion: | + ${map_of(combined_locations(all_matches))} + + ${ collapse_template(how_to_pick_court_help_template) } + ${ collapse_template(court_selection_help_template) } + ${ collapse_template(address_help_template)} +fields: + - no label: trial_court + datatype: object + object labeler: court_short_label + choices: | + all_courts.filter_courts(allowed_courts, search_column="tyler_code", search_func=lambda c: c in available_initial_efile_courts) css class: not-required-if-disabled --- template: court_selection_help_template @@ -651,7 +709,7 @@ question: | How much money are you asking the defendant to pay? fields: - Amount owed: claim_amount -# datatype: currency + datatype: currency min: 0 - "Your claim is for more than $7,000": reason_pexceeds_7000 datatype: radio @@ -660,7 +718,7 @@ fields: - I am suing for unfair and deceptive practices under Chapter 93A or under the security deposit statute. The base amount of my claim is still $7,000 or less js show if: | val("claim_amount") > 7000 - - Filing fee: court_costs_amount + - Initiation fee: court_costs_amount input type: hidden - html: |