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 3497e42  WHIMSY-326 - point to the acreq tool
3497e42 is described below

commit 3497e4237b40f26a1527b3f8843e84a779ccb42e
Author: Sebb <[email protected]>
AuthorDate: Thu Apr 23 23:25:44 2020 +0100

    WHIMSY-326 - point to the acreq tool
    
    Initial PoC - template needs work
---
 www/secretary/workbench/templates/resubmit.erb     | 15 +++++++++
 .../workbench/views/actions/resubmit.json.rb       | 37 ++++++++++++++++++++++
 www/secretary/workbench/views/parts.js.rb          |  6 ++++
 3 files changed, 58 insertions(+)

diff --git a/www/secretary/workbench/templates/resubmit.erb 
b/www/secretary/workbench/templates/resubmit.erb
new file mode 100644
index 0000000..b8a72f0
--- /dev/null
+++ b/www/secretary/workbench/templates/resubmit.erb
@@ -0,0 +1,15 @@
+Dear <%= @email.display_names.join(', ') %>,
+
+Thanks for the ICLA, however we already have a copy.
+The (P)PMC can use the existing ICLA to request your account by using Whimsy:
+
+https://whimsy.apache.org/officers/acreq.cgi
+
+Please take up any further queries with the (P)PMC.
+
+Warm Regards,
+
+<%= @sig %>
+
+pmc: <%= @pmc %>
+podling: <%= @podling %>
\ No newline at end of file
diff --git a/www/secretary/workbench/views/actions/resubmit.json.rb 
b/www/secretary/workbench/views/actions/resubmit.json.rb
new file mode 100644
index 0000000..53c882c
--- /dev/null
+++ b/www/secretary/workbench/views/actions/resubmit.json.rb
@@ -0,0 +1,37 @@
+# extract message
+message = Mailbox.find(@message)
+
+# obtain per-user information
+_personalize_email(env.user)
+
+# extract/verify project
+_extract_project
+
+########################################################################
+#                           email submitter                            #
+########################################################################
+
+# send rejection email
+task "email #{message.from}" do
+  # build mail from template
+  @email = message.from
+  mail = message.reply(
+    from: @from,
+    cc: [
+      '[email protected]',
+      ("private@#{@pmc.mail_list}.apache.org" if @pmc), # copy pmc
+      (@podling.private_mail_list if @podling) # copy podling
+    ],
+    body: template('resubmit.erb')
+  )
+
+  # echo email
+  form do
+    _message mail.to_s
+  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 a773dd2..99d30f1 100644
--- a/www/secretary/workbench/views/parts.js.rb
+++ b/www/secretary/workbench/views/parts.js.rb
@@ -167,6 +167,12 @@ class Parts < Vue
             end
 
             _label do
+              _input type: 'radio', name: 'doctype', value: 'resubmit',
+                onClick: self.reject
+              _span 'resubmitted form'
+            end
+
+            _label do
               _input type: 'radio', name: 'doctype', value: 'pubkey',
                 onClick: self.reject
               _span 'upload public key'

Reply via email to