whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject [whimsy] branch master updated: Make links to VOTE and NOTICE dependent on PMC/PPMC selection
Date Mon, 13 Nov 2017 18:47:54 GMT
This is an automated email from the ASF dual-hosted git repository.

clr 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 84d6707  Make links to VOTE and NOTICE dependent on PMC/PPMC selection
     new 2daea90  Merge branch 'master' of github.com:apache/whimsy
84d6707 is described below

commit 84d6707b8da88cc62cb020d5a23d071e7b2d7c23
Author: Craig L Russell <craig.russell@oracle.com>
AuthorDate: Mon Nov 13 10:47:31 2017 -0800

    Make links to VOTE and NOTICE dependent on PMC/PPMC selection
---
 www/project/icla/views/actions/validate.json.rb |   2 +-
 www/project/icla/views/pages/invite.js.rb       | 100 +++++++++++++++---------
 2 files changed, 62 insertions(+), 40 deletions(-)

diff --git a/www/project/icla/views/actions/validate.json.rb b/www/project/icla/views/actions/validate.json.rb
index edbc26f..a68f469 100644
--- a/www/project/icla/views/actions/validate.json.rb
+++ b/www/project/icla/views/actions/validate.json.rb
@@ -72,7 +72,7 @@ if @votelink and not @votelink.empty?
   if not @votelink=~ /.*lists\.apache\.org.*/
     _error "Please link to a message via lists.apache.org"
   end
-  if not @votelink=~ /.*#{pmc.mail_list}.apache\.org.*/
+  if not @votelink=~ /.*#{pmc.mail_list}(\.incubator)?\.apache\.org.*/
     _error "Please link to the [RESULT][VOTE] message sent to the private list."
   end
 
diff --git a/www/project/icla/views/pages/invite.js.rb b/www/project/icla/views/pages/invite.js.rb
index cff1915..e3a03c8 100644
--- a/www/project/icla/views/pages/invite.js.rb
+++ b/www/project/icla/views/pages/invite.js.rb
@@ -9,6 +9,13 @@ class Invite < Vue
     @pmc = ''
     @votelink = ''
     @noticelink = ''
+
+# initialize conditional text
+    @showPMCVoteLink = false;
+    @showPPMCVoteLink = false;
+    @showPMCNoticeLink = false;
+    @showPPMCNoticeLink = false;
+
   end
 
   def render
@@ -57,48 +64,59 @@ class Invite < Vue
       end
     end
 
-    _p %{
-      For PMCs: Fill the following field only if the person was voted by the PMC
-      to become a committer.
-      Link to the [RESULT][VOTE] message in the mail archives.
-    }
-    _p %{
-      For PPMCs: Fill the following field only if the person is an initial
-      committer on a new project accepted for incubation, or the person
-      has been voted as a committer on a podling.
-      For new incubator projects use the
-      http://wiki.apache.org/incubator/XXXProposal link; for existing
-      podlings link to the [RESULT][VOTE] message in the mail archives.
-    }
-    _ 'Navigate to '
-    _a "ponymail", href: "https://lists.apache.org"
-    _ ', select the appropriate message, right-click PermaLink, copy link'
-    _ ' to the clip-board, and paste the link here.'
-    _p
-
-    _div.form_group do
-      _label "VOTE link", for: 'votelink'
-      _input.form_control.votelink! type: 'url', onChange: self.setVoteLink,
+    if @showPMCVoteLink
+      _p %{
+        Fill the following field only if the person was voted by the PMC
+        to become a committer.
+        Link to the [RESULT][VOTE] message in the mail archives.
+      }
+    end
+    if @showPPMCVoteLink
+      _p %{
+        Fill the following field only if the person is an initial
+        committer on a new project accepted for incubation, or the person
+        has been voted as a committer on a podling.
+        For new incubator projects use the
+        http://wiki.apache.org/incubator/XXXProposal link; for existing
+        podlings link to the [RESULT][VOTE] message in the mail archives.
+      }
+    end
+    if @showPMCVoteLink or @showPPMCVoteLink
+      _ 'Navigate to '
+      _a "ponymail", href: "https://lists.apache.org"
+      _ ', select the appropriate message, right-click PermaLink, copy link'
+      _ ' to the clip-board, and paste the link here.'
+      _p
+
+      _div.form_group do
+        _label "VOTE link", for: 'votelink'
+        _input.form_control.votelink! type: 'url', onChange: self.setVoteLink,
         value: @votelink
+      end
     end
-
-    _p %{
-      For PMCs: Fill the following field only if the person was voted by the PMC
-      to become a PMC member. Link to the [NOTICE] message sent to the board.
-      The message must have been in the archives for at least 72 hours.
-    }
-    _p %{
-      For PPMCs: Fill the following field only if the person was voted by the
-      PPMC to be a PPMC member. Link to the [NOTICE] message sent to the incubator PMC.
-      The message must have been in the archives for at least 72 hours.
-    }
-
-    _div.form_group do
-      _label "NOTICE link", for: 'noticelink'
-      _input.form_control.noticelink! type: 'url', onChange: self.setNoticeLink,
-      value: @noticelink
+    if @showPMCNoticeLink
+      _p %{
+        Fill the following field only if the person was voted by the PMC
+        to become a PMC member.
+        Link to the [NOTICE] message sent to the board.
+        The message must have been in the archives for at least 72 hours.
+      }
+    end
+    if @showPPMCNoticeLink
+      _p %{
+        Fill the following field only if the person was voted by the
+        PPMC to be a PPMC member.
+        Link to the [NOTICE] message sent to the incubator PMC.
+        The message must have been in the archives for at least 72 hours.
+      }
+    end
+    if @showPMCNoticeLink or @showPPMCNoticeLink
+      _div.form_group do
+        _label "NOTICE link", for: 'noticelink'
+        _input.form_control.noticelink! type: 'url', onChange: self.setNoticeLink,
+        value: @noticelink
+      end
     end
-
     #
     # Submission button
     #
@@ -174,6 +192,10 @@ class Invite < Vue
 
   def setPMC(event)
     @pmc = event.target.value
+    @showPMCVoteLink = Server.data.pmcs.include? @pmc
+    @showPPMCVoteLink = Server.data.ppmcs.include? @pmc
+    @showPMCNoticeLink = Server.data.pmcs.include? @pmc
+    @showPPMCNoticeLink = Server.data.ppmcs.include? @pmc
     self.checkValidity()
   end
 

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

Mime
View raw message