This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  71990bdf7965b38307b907ff7921f517bb4a1be2 (commit)
      from  b4d6e5502b03a75677053aff1ad0a29447148804 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=71990bdf7965b38307b907ff7921f517bb4a1be2

commit 71990bdf7965b38307b907ff7921f517bb4a1be2
Author: Franck Villaume <[email protected]>
Date:   Mon Jan 23 22:01:32 2017 +0100

    add new param to functions feedback, error_msg & warning_msg to support 
more html attributes

diff --git a/src/www/include/Layout.class.php b/src/www/include/Layout.class.php
index e5ac4b7..07a631b 100644
--- a/src/www/include/Layout.class.php
+++ b/src/www/include/Layout.class.php
@@ -980,26 +980,28 @@ if (isset($params['group']) && $params['group']) {
         * feedback() - returns the htmlized feedback string when an action is 
performed.
         *
         * @param       string  $feedback       feedback string
+        * @param       array   $attr           html attributes
         * @return      string  htmlized feedback
         */
-       function feedback($feedback) {
+       function feedback($feedback, $attr = array()) {
                if (!$feedback) {
                        return '';
                } else {
-                       return html_e('p', array('class' => 'feedback'), 
strip_tags($feedback, '<br>'), true);
+                       return html_e('p', array_merge(array('class' => 
'feedback'), $attr), strip_tags($feedback, '<br>'), true);
                }
        }
        /**
         * warning_msg() - returns the htmlized warning string when an action 
is performed.
         *
         * @param       string  $msg    msg string
+        * @param       array   $attr   html attributes
         * @return      string  htmlized warning
         */
-       function warning_msg($msg) {
+       function warning_msg($msg, $attr = array()) {
                if (!$msg) {
                        return '';
                } else {
-                       return html_e('p', array('class' => 'warning_msg'), 
strip_tags($msg, '<br>'), true);
+                       return html_e('p', array_merge(array('class' => 
'warning_msg'), $attr), strip_tags($msg, '<br>'), true);
                }
        }
 
@@ -1007,13 +1009,14 @@ if (isset($params['group']) && $params['group']) {
         * error_msg() - returns the htmlized error string when an action is 
performed.
         *
         * @param       string  $msg    msg string
+        * @param       array   $attr   html attributes
         * @return      string  htmlized error
         */
-       function error_msg($msg) {
+       function error_msg($msg, $attr = array()) {
                if (!$msg) {
                        return '';
                } else {
-                       return html_e('p', array('class' => 'error'), 
strip_tags($msg, '<br>'), true);
+                       return html_e('p', array_merge(array('class' => 
'error'), $attr), strip_tags($msg, '<br>'), true);
                }
        }
 

-----------------------------------------------------------------------

Summary of changes:
 src/www/include/Layout.class.php | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to