mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 00:33:58 -04:00
Change service billing details
View page that lets you change service billing details and update details on form submission.
This commit is contained in:
@@ -43,6 +43,7 @@ from app.main.forms import (
|
||||
RateLimit,
|
||||
RenameServiceForm,
|
||||
SearchByNameForm,
|
||||
ServiceBillingDetailsForm,
|
||||
ServiceContactDetailsForm,
|
||||
ServiceDataRetentionEditForm,
|
||||
ServiceDataRetentionForm,
|
||||
@@ -1213,7 +1214,26 @@ def edit_service_notes(service_id):
|
||||
@main.route("/services/<uuid:service_id>/edit-billing-details", methods=['GET', 'POST'])
|
||||
@user_is_platform_admin
|
||||
def edit_service_billing_details(service_id):
|
||||
pass
|
||||
form = ServiceBillingDetailsForm(
|
||||
billing_contact_email_address=current_service.billing_contact_email_address,
|
||||
billing_contact_name=current_service.billing_contact_name,
|
||||
billing_reference=current_service.billing_reference,
|
||||
purchase_order_number=current_service.purchase_order_number
|
||||
)
|
||||
|
||||
if form.validate_on_submit():
|
||||
current_service.update(
|
||||
billing_contact_email_address=form.billing_contact_email_address.data,
|
||||
billing_contact_name=form.billing_contact_name.data,
|
||||
billing_reference=form.billing_reference.data,
|
||||
purchase_order_number=form.purchase_order_number.data
|
||||
)
|
||||
return redirect(url_for('.service_settings', service_id=service_id))
|
||||
|
||||
return render_template(
|
||||
'views/service-settings/edit-service-billing-details.html',
|
||||
form=form,
|
||||
)
|
||||
|
||||
|
||||
def get_branding_as_value_and_label(email_branding):
|
||||
|
||||
Reference in New Issue
Block a user