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 fb165484 Add code to reject late membership appn
fb165484 is described below
commit fb16548465afd33dc03576f666854ae654bf15e3
Author: Sebb <[email protected]>
AuthorDate: Fri Sep 5 00:15:59 2025 +0100
Add code to reject late membership appn
---
www/secretary/workbench/templates/memlate.erb | 11 ++++++
.../workbench/views/actions/memapplate.json.rb | 39 ++++++++++++++++++++++
www/secretary/workbench/views/parts.js.rb | 22 +++++++++---
3 files changed, 67 insertions(+), 5 deletions(-)
diff --git a/www/secretary/workbench/templates/memlate.erb
b/www/secretary/workbench/templates/memlate.erb
new file mode 100644
index 00000000..2e02549c
--- /dev/null
+++ b/www/secretary/workbench/templates/memlate.erb
@@ -0,0 +1,11 @@
+Dear <%= @fullname %>,
+
+Thank you for your membership application.
+Unfortunately it was received after the closing date so cannot be accepted.
+
+Please see:
+https://www.apache.org/foundation/bylaws-plain-english.html#41-new-members
+
+Warm Regards,
+
+<%= @sig %>
diff --git a/www/secretary/workbench/views/actions/memapplate.json.rb
b/www/secretary/workbench/views/actions/memapplate.json.rb
new file mode 100644
index 00000000..7c339f88
--- /dev/null
+++ b/www/secretary/workbench/views/actions/memapplate.json.rb
@@ -0,0 +1,39 @@
+#
+# - respond to late membership application
+#
+
+# extract message
+message = Mailbox.find(@message)
+@email = message.from
+
+# obtain per-user information
+_personalize_email(env.user)
+
+########################################################################
+# email submitter #
+########################################################################
+
+# send email
+task "email #@email" do
+ to = message.headers[:from]
+ @fullname = message.headers[:name]
+
+ # build mail from template
+ mail = message.reply(
+ subject: @document,
+ from: '[email protected]',
+ to: to,
+ cc: '[email protected]',
+ body: template('memlate.erb')
+ )
+
+ # echo email
+ form do
+ _message mail
+ end
+
+ # deliver mail
+ complete do
+ mail.deliver!
+ end
+end
diff --git a/www/secretary/workbench/views/parts.js.rb
b/www/secretary/workbench/views/parts.js.rb
index 18082bb6..2b412efc 100644
--- a/www/secretary/workbench/views/parts.js.rb
+++ b/www/secretary/workbench/views/parts.js.rb
@@ -161,11 +161,6 @@ class Parts < Vue
onClick: -> {@form = MemApp}
_span 'membership application'
end
- else
- _label do
- _input type: 'radio', name: 'doctype', disabled: true
- _span '(membership application arrived after the closing date)'
- end
end
_label do
@@ -228,6 +223,14 @@ class Parts < Vue
# Defer processing (must be part of POST block)
+ unless @@meeting
+ _label do
+ _input type: 'radio', name: 'doctype', value: 'memapplate',
+ onClick: self.memapplate
+ _span 'late membership application'
+ end
+ end
+
_label do
_input type: 'radio', name: 'doctype', value: 'pubkey',
onClick: self.reject
@@ -712,6 +715,15 @@ class Parts < Vue
)
end
+ ########################################################################
+ # Reject memapp #
+ ########################################################################
+ def memapplate(event)
+ form = jQuery(event.target).closest('form')
+ form.attr('action', '../../tasklist/memapplate')
+ form.submit()
+ end
+
########################################################################
# Reject attachment #
########################################################################