From f885535a7ce4bedbffec693b22ff6c02e422d054 Mon Sep 17 00:00:00 2001 From: yogesh sirsat Date: Wed, 20 Jul 2022 20:51:40 +0530 Subject: [PATCH] custom_profile_fields: Add form ID to add new custom profile field form. This makes it easy to support submitting this form when pressing enter by passing the `form_id` parameter to `dialog_widget.launch()`. --- static/js/settings_profile_fields.js | 1 + static/templates/settings/add_new_custom_profile_field_form.hbs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/static/js/settings_profile_fields.js b/static/js/settings_profile_fields.js index eaa5f576fa..1bdcb7f616 100644 --- a/static/js/settings_profile_fields.js +++ b/static/js/settings_profile_fields.js @@ -233,6 +233,7 @@ function open_custom_profile_field_form_modal() { } dialog_widget.launch({ + form_id: "add-new-custom-profile-field-form", help_link: "/help/add-custom-profile-fields", html_heading: $t_html({defaultMessage: "Add a new custom profile field"}), html_body, diff --git a/static/templates/settings/add_new_custom_profile_field_form.hbs b/static/templates/settings/add_new_custom_profile_field_form.hbs index e88e3d1ece..918e907a45 100644 --- a/static/templates/settings/add_new_custom_profile_field_form.hbs +++ b/static/templates/settings/add_new_custom_profile_field_form.hbs @@ -1,4 +1,4 @@ -
+