Update organisation notes

This commit is contained in:
Pea Tyczynska
2021-02-04 17:58:35 +00:00
parent e090d97997
commit 8ea748f6e4
3 changed files with 27 additions and 3 deletions

View File

@@ -542,12 +542,12 @@ def edit_organisation_notes(org_id):
if form.validate_on_submit():
if form.notes.data == current_organisation.notes:
return redirect(url_for('.organisation_settings', service_id=org_id))
return redirect(url_for('.organisation_settings', org_id=org_id))
current_organisation.update(
notes=form.notes.data
)
return redirect(url_for('.organisation_settings', service_id=org_id))
return redirect(url_for('.organisation_settings', org_id=org_id))
return render_template(
'views/organisations/organisation/settings/edit-organisation-notes.html',

View File

@@ -80,7 +80,7 @@
{% call row() %}
{{ text_field('Notes')}}
{{ optional_text_field(current_service.notes, default="No notes yet", wrap=True) }}
{{ optional_text_field(current_org.notes, default="No notes yet", wrap=True) }}
{{ edit_field('Change', url_for('.edit_organisation_notes', org_id=current_org.id), suffix='the notes for the organisation') }}
{% endcall %}