You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2020/07/13 13:59:35 UTC
[whimsy] branch master updated: Use member libary routine for text
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 0012d7e Use member libary routine for text
0012d7e is described below
commit 0012d7e94c576ed1c9c53a3b22f3aa246511c177
Author: Sebb <se...@apache.org>
AuthorDate: Mon Jul 13 14:59:24 2020 +0100
Use member libary routine for text
---
.../workbench/views/actions/memapp.json.rb | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/www/secretary/workbench/views/actions/memapp.json.rb b/www/secretary/workbench/views/actions/memapp.json.rb
index 9ff40a8..06051f1 100644
--- a/www/secretary/workbench/views/actions/memapp.json.rb
+++ b/www/secretary/workbench/views/actions/memapp.json.rb
@@ -68,17 +68,17 @@ end
# insert entry into members.txt
task "svn commit foundation/members.txt" do
- # construct line to be inserted
- @entry = [
- "#{@fullname}",
- "#{@addr.gsub(/^/,' ').gsub(/\r/,'')}",
- (" #{@country}" unless @country.empty?),
- " Email: #{@email}",
- (" Tel: #{@tele}" unless @tele.empty?),
- (" Fax: #{@fax}" unless @fax.empty?),
- " Forms on File: ASF Membership Application",
- " Avail ID: #{@availid}"
- ].compact.join("\n") + "\n"
+ # Construct initial entry:
+ fields = {
+ fullname: @fullname,
+ address: @addr,
+ country: @country,
+ email: @email,
+ tele: @tele,
+ fax: @fax,
+ availid: @availid,
+ }
+ @entry = ASF::Member.make_entry(fields)
form do
_textarea @entry, name: 'entry', rows: @entry.split("\n").length