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 2021/07/03 13:22:04 UTC

[whimsy] branch master updated: send_form => process_form

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 81399cf  send_form => process_form
81399cf is described below

commit 81399cfd7a929b54a411e27e679171e251233bd3
Author: Sebb <se...@apache.org>
AuthorDate: Sat Jul 3 14:21:56 2021 +0100

    send_form => process_form
    
    The method does not send the form, it processes the sent data
    after validation
---
 www/test/example.cgi | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/www/test/example.cgi b/www/test/example.cgi
index d5bdbae..8497de6 100755
--- a/www/test/example.cgi
+++ b/www/test/example.cgi
@@ -67,10 +67,10 @@ end
 
 # Handle submission (checkout user's apacheid.json, write form data, checkin file)
 # @return true if we think it succeeded; false in all other cases
-def send_form(formdata: {})
+def process_form(formdata: {})
   # Example that uses SVN to update an existing file: members/mentor-update.cgi
   _p class: 'system' do
-    _ 'If this were a real send_form() it would do something with your data:'
+    _ 'If this were a real process_form() it would do something with your data:'
     _br
     formdata.each do |k,v|
       _ "#{k} = #{v.inspect}"
@@ -199,14 +199,14 @@ _html do
             submission[k] = _.params[k] # Always as ['val'] or ['one', 'two', ...]
           end
           if validate_form(formdata: submission)
-            if send_form(formdata: submission)
+            if process_form(formdata: submission)
               _p.lead "Thanks for Submitting This Form!"
               _p do
-                _ "The send_form method would have done any procesing needed with the data, after calling validate_data."
+                _ "The process_form method would have done any procesing needed with the data, after calling validate_data."
               end
             else
               _div.alert.alert_warning role: 'alert' do
-                _p "SORRY! Your submitted form data failed send_form, please try again."
+                _p "SORRY! Your submitted form data failed process_form, please try again."
               end
             end
           else