noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 06/07: HtmlInput::button_action: add icon , h


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 06/07: HtmlInput::button_action: add icon , htmlInput : add documentation
Date: Wed, 5 Jul 2017 15:01:29 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 1cd7612ea4878b607dfc42e2e95b1dd2269e7411
Author: Dany De Bontridder <address@hidden>
Date:   Tue Jul 4 00:08:40 2017 +0200

    HtmlInput::button_action: add icon , htmlInput : add documentation
---
 include/lib/class_html_input.php | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/include/lib/class_html_input.php b/include/lib/class_html_input.php
index 6d5a063..e7df44c 100755
--- a/include/lib/class_html_input.php
+++ b/include/lib/class_html_input.php
@@ -463,17 +463,20 @@ class HtmlInput
        return $r;
     }
     /**
-     * button Html
+     * button Html with javascript
      address@hidden $action action action to perform (message) without onclick
      address@hidden $javascript javascript to execute
+     address@hidden $id is the DOM element id 
+     address@hidden $p_class CSS class of the button
+     address@hidden $p_symbole raw symbole to add to the action message
      */
-    static function 
button_action($action,$javascript,$id="xx",$p_class="button")
+    static function 
button_action($action,$javascript,$id="xx",$p_class="button",$p_symbole="")
     {
         if ($id=="xx"){
             $id=HtmlInput::generate_id("xx");
         }
                $r="";
-               $r.='<input type="button" id="'.$id.'" class="'.$p_class.'" 
onclick="'.$javascript.'" value="'.h($action).'">';
+               $r.='<input type="button" id="'.$id.'" class="'.$p_class.'" 
onclick="'.$javascript.'" value="'.$p_symbole.h($action).'">';
                return $r;
 
     }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]