diff --git a/apcd-cms/src/apps/admin_regis_table/templates/view_registration_modal.html b/apcd-cms/src/apps/admin_regis_table/templates/view_registration_modal.html index 30ba464e..cfbbc04c 100644 --- a/apcd-cms/src/apps/admin_regis_table/templates/view_registration_modal.html +++ b/apcd-cms/src/apps/admin_regis_table/templates/view_registration_modal.html @@ -24,6 +24,8 @@

Organization

Other {% endif %} +
Registration Year
+
{{r.view_modal_content.year}}
Type
{{r.view_modal_content.type}}
Business Name
diff --git a/apcd-cms/src/apps/registrations/templates/submission_form/registration_form_body.html b/apcd-cms/src/apps/registrations/templates/submission_form/registration_form_body.html index 1d039cfe..b5f26e12 100644 --- a/apcd-cms/src/apps/registrations/templates/submission_form/registration_form_body.html +++ b/apcd-cms/src/apps/registrations/templates/submission_form/registration_form_body.html @@ -56,6 +56,24 @@ +
+ + + + + +
+
diff --git a/apcd-cms/src/apps/utils/apcd_database.py b/apcd-cms/src/apps/utils/apcd_database.py index 795dcb7f..950f1a9d 100644 --- a/apcd-cms/src/apps/utils/apcd_database.py +++ b/apcd-cms/src/apps/utils/apcd_database.py @@ -225,7 +225,7 @@ def create_registration(form, renewal=False): _clean_value(form['city']), form['state'][:2], form['zip_code'], - "{}".format(datetime.now().year + (1 if renewal else 0)) + form['reg_year'] ) cur.execute(operation, values) conn.commit() @@ -264,7 +264,8 @@ def update_registration(form, reg_id): city = %s, state = %s, zip = %s, - updated_at= %s + updated_at= %s, + registration_year = %s WHERE registration_id = %s RETURNING registration_id""" values = ( @@ -276,6 +277,7 @@ def update_registration(form, reg_id): form['state'][:2], form['zip_code'], datetime.now(), + form['reg_year'], reg_id ) cur.execute(operation, values) diff --git a/apcd-cms/src/apps/utils/registrations_data_formatting.py b/apcd-cms/src/apps/utils/registrations_data_formatting.py index 13c560c1..c36f6365 100644 --- a/apcd-cms/src/apps/utils/registrations_data_formatting.py +++ b/apcd-cms/src/apps/utils/registrations_data_formatting.py @@ -74,6 +74,7 @@ def _set_modal_content(reg, reg_ent, reg_cont, org_types): 'address': reg[8], 'zip': reg[11], 'for_self': reg[4], + 'year': reg[12], 'entities': [_set_entities(ent) for ent in reg_ent], 'contacts': [_set_contacts(cont) for cont in reg_cont], 'org_types': org_types,