mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
Organisation notes visible on organisation settings page
This commit is contained in:
@@ -20,6 +20,7 @@ from app.main.forms import (
|
||||
AddGPOrganisationForm,
|
||||
AddNHSLocalOrganisationForm,
|
||||
ConfirmPasswordForm,
|
||||
EditNotesForm,
|
||||
GoLiveNotesForm,
|
||||
InviteOrgUserForm,
|
||||
NewOrganisationForm,
|
||||
@@ -531,3 +532,24 @@ def edit_organisation_go_live_notes(org_id):
|
||||
'views/organisations/organisation/settings/edit-go-live-notes.html',
|
||||
form=form,
|
||||
)
|
||||
|
||||
|
||||
@main.route("/organisations/<uuid:org_id>/settings/notes", methods=['GET', 'POST'])
|
||||
@user_is_platform_admin
|
||||
def edit_organisation_notes(org_id):
|
||||
form = EditNotesForm(notes=current_organisation.notes)
|
||||
|
||||
if form.validate_on_submit():
|
||||
|
||||
if form.notes.data == current_organisation.notes:
|
||||
return redirect(url_for('.organisation_settings', service_id=org_id))
|
||||
|
||||
current_organisation.update(
|
||||
notes=form.notes.data
|
||||
)
|
||||
return redirect(url_for('.organisation_settings', service_id=org_id))
|
||||
|
||||
return render_template(
|
||||
'views/organisations/organisation/settings/edit-organisation-notes.html',
|
||||
form=form,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user