whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: enable form; fix email
Date Fri, 05 Aug 2016 16:09:30 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  c95179a   enable form; fix email
c95179a is described below

commit c95179a742d0a9e8c77e8df86facb3e51747c57e
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Fri Aug 5 12:09:15 2016 -0400

    enable form; fix email
---
 www/officers/acreq.cgi | 54 ++++++++++++++++++++------------------------------
 1 file changed, 21 insertions(+), 33 deletions(-)

diff --git a/www/officers/acreq.cgi b/www/officers/acreq.cgi
index c031b50..8ee42e6 100755
--- a/www/officers/acreq.cgi
+++ b/www/officers/acreq.cgi
@@ -231,7 +231,7 @@ _html do
           _textarea name: "comments", id: "comments" 
         end
 
-        _input type: "submit", value: "Submit", disabled: true
+        _input type: "submit", value: "Submit"
       end
     end
 
@@ -258,8 +258,7 @@ _html do
         _div.error "Unrecognized PMC name #{@pmc}"
       else
 
-        # verb tense to be used in messages
-        tobe = 'to be ' if DEMO_MODE
+        tobe = nil
 
         # build the line to be added
         line = "#{@user};#{@name};#{@email};#{@pmc};" +
@@ -286,35 +285,25 @@ _html do
           return_path "root@apache.org"
           to      "root@apache.org"
           cc      cc_list
-          subject "[FORM] Account Request - #{requestor}: #{@name}"
+        end
 
-          body <<-EOF.gsub(/^ {12}/, '').gsub(/(Vote reference:)?\n\s+\n/, "\n\n")
-            Prospective userid: #{@user}
-            Full name: #{@name}
-            Forwarding email address: #{@email}
+        mail.subject "[FORM] Account Request - #{requestor}: #{@name}"
 
-            Vote reference:
-              #{@votelink.gsub('mail-search.apache.org/pmc/', 'mail-search.apache.org/members/')}
+        mail.body = <<-EOF.gsub(/^ {10}/, '').gsub(/(Vote reference:)?\n\s+\n/, "\n\n")
+          Prospective userid: #{@user}
+          Full name: #{@name}
+          Forwarding email address: #{@email}
 
-            #{@comments}
+          Vote reference:
+            #{@votelink.to_s.gsub('mail-search.apache.org/pmc/', 'mail-search.apache.org/members/')}
 
-            -- 
-            Submitted by https://#{ENV['HTTP_HOST']}#{ENV['REQUEST_URI'].split('?').first}
-            From #{`/usr/bin/host #{ENV['REMOTE_ADDR'].dup.untaint}`.chomp}
-            Using #{ENV['HTTP_USER_AGENT']}
-          EOF
-        end
+          #{@comments}
 
-        unless DEMO_MODE
-          # deliver the email.  Done first as undeliverable mail stops
-          # the process
-          begin
-            mail.deliver!
-          rescue Exception => exception
-            _pre.error exception.inspect
-            tobe = 'would have been '
-          end
-        end
+          -- 
+          Submitted by https://#{ENV['HTTP_HOST']}#{ENV['REQUEST_URI'].split('?').first}
+          From #{`/usr/bin/host #{ENV['REMOTE_ADDR'].dup.untaint}`.chomp}
+          Using #{ENV['HTTP_USER_AGENT']}
+        EOF
 
         unless tobe
           Dir.mktmpdir do |tmpdir|
@@ -346,12 +335,11 @@ _html do
           end
         end
 
-        # report on status
-        _h2 "New entry #{tobe}added:"
-        _pre line
-        _h2 "Mail #{tobe}sent:"
-        _pre.email mail.to_s
-      end
+      # report on status
+      _h2 "New entry #{tobe}added:"
+      _pre line
+      _h2 "Mail #{tobe}sent:"
+      _pre.email mail.to_s
     end
 
     unless _.post?

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message