You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2017/07/18 01:34:46 UTC
[whimsy] branch master updated: Fix issues identified in:
This is an automated email from the ASF dual-hosted git repository.
rubys 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 a1bbdf6 Fix issues identified in:
a1bbdf6 is described below
commit a1bbdf685b032dba1e074ded42aab1d9b2649b10
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Mon Jul 17 21:34:10 2017 -0400
Fix issues identified in:
https://lists.apache.org/thread.html/f507692eb830915e23f5bb69ff7ad541f25cb78cf8dc285f270bb112@%3Cdev.whimsical.apache.org%3E
https://lists.apache.org/thread.html/23bb59637bca89b92c9780aabf8e63ae07f39ff722250690a549bf28@%3Cdev.whimsical.apache.org%3E
---
lib/whimsy/asf/ldap.rb | 1 +
www/secretary/workbench/views/forms/icla.js.rb | 19 +++++++++++++------
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index 63955a7..b680bfe 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -1043,6 +1043,7 @@ module ASF
# return committee only if it actually exits
def self.[] name
committee = super
+ return committee if GUINEAPIGS.include? name
committee.members.empty? ? nil : committee
end
diff --git a/www/secretary/workbench/views/forms/icla.js.rb b/www/secretary/workbench/views/forms/icla.js.rb
index 33fa486..4c81414 100644
--- a/www/secretary/workbench/views/forms/icla.js.rb
+++ b/www/secretary/workbench/views/forms/icla.js.rb
@@ -116,12 +116,19 @@ class ICLA < React
# new account request form - perform checks only if user is valid
user = document.querySelector("input[name=user]")
- if user.value.length > 0 and user.validity.valid
- %w(project votelink).each do |name|
- input = document.querySelector("input[name=#{name}]")
- input.required = @user && !@user.empty?
- valid &= input.validity.valid
- end
+ project = document.querySelector("input[name=project]")
+ votelink = document.querySelector("input[name=votelink]")
+
+ # always validate project
+ valid &= project.validity.valid
+
+ # project votelink are only required with valid users; only validate
+ # votelink if the user is valid
+ if user.validity.valid and user.value.length > 0
+ project.required = votelink.required = true
+ valid &= votelink.validity.valid
+ else
+ project.required = votelink.required = false
end
$file.disabled = !valid or @filed or @submitted
--
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].