This is an automated email from the ASF dual-hosted git repository.
sebbASF 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 2b3969bc Simplify; only fetch values once
2b3969bc is described below
commit 2b3969bc2e9c8e844957e79b6c082e82dca41a39
Author: Sebb <[email protected]>
AuthorDate: Tue Aug 11 15:06:25 2026 +0100
Simplify; only fetch values once
---
www/officers/acreq.cgi | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/www/officers/acreq.cgi b/www/officers/acreq.cgi
index 6e5aa315..92872ce3 100755
--- a/www/officers/acreq.cgi
+++ b/www/officers/acreq.cgi
@@ -99,14 +99,18 @@ _html do
});
// allow selected fields to be set based on parameters passed
- if (#{@user.to_s.inspect} != '')
- $('#user').val(#{@user.to_s.inspect});
- $('#email').val(#{@email.to_s.inspect}).trigger('change');
- var project = #{(@project || @podling || @pmc).to_s.inspect};
+ const urlParams = new URLSearchParams(window.location.search);
+ const user = urlParams.get('user');
+ if (user != '')
+ $('#user').val(user);
+ const email = urlParams.get('email');
+ $('#email').val(email).trigger('change');
+ const project = urlParams.get('project', urlParams.get('podling',
urlParams.get('pmc')));
$('#project').val(project).trigger('change').
attr('required', 'required');
- if (#{@votelink.to_s.inspect} != '')
- $('#votelink').val(#{@votelink.to_s.inspect});
+ const votelink = urlParams.get('votelink');
+ if (votelink != '')
+ $('#votelink').val(votelink);
});
function validateForm(){
const votelink = document.getElementById("votelink").value;