This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new d0243fe6 Don't submit form if no name
d0243fe6 is described below
commit d0243fe6ad752457c6d273a0b21dfefd8594b538
Author: Sebb <[email protected]>
AuthorDate: Mon Feb 3 21:54:38 2025 +0000
Don't submit form if no name
---
www/members/proxy.cgi | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/www/members/proxy.cgi b/www/members/proxy.cgi
index 16fb80b2..51db2ec3 100755
--- a/www/members/proxy.cgi
+++ b/www/members/proxy.cgi
@@ -102,7 +102,7 @@ def emit_form(cur_mtg_dir, meeting, volunteers, disabled)
}
else
_div.well.well_lg do
- _form method: 'POST' do
+ _form method: 'POST', onsubmit: 'return validateForm();' do
_div.form_group do
_label 'Select proxy'
_b do
@@ -163,6 +163,14 @@ def emit_form(cur_mtg_dir, meeting, volunteers, disabled)
_script src: "js/bootstrap-combobox.js" # TODO do we need this still?
_script_ %{
+ function validateForm() {
+ if ($('.combobox').val() == '') {
+ alert("A proxy name is required");
+ return false;
+ }
+ return true;
+ }
+
// convert select into combobox
$('.combobox').combobox();