From a650d165736cfc25bda548285cf64b9af42b0fb2 Mon Sep 17 00:00:00 2001 From: Jimako Date: Thu, 27 Sep 2018 14:09:22 +0200 Subject: [PATCH] {LOGIN_TABLE_SUBMIT} - added class parameter --- e107_core/shortcodes/batch/login_shortcodes.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/e107_core/shortcodes/batch/login_shortcodes.php b/e107_core/shortcodes/batch/login_shortcodes.php index e207959e8..27b4f9037 100644 --- a/e107_core/shortcodes/batch/login_shortcodes.php +++ b/e107_core/shortcodes/batch/login_shortcodes.php @@ -151,15 +151,22 @@ class login_shortcodes extends e_shortcode } + /* example: {LOGIN_TABLE_SUBMIT=large} */ + /* example: {LOGIN_TABLE_SUBMIT: class=btn submit_but} */ + function sc_login_table_submit($parm="") //FIXME use $frm { + if(empty($this->userReg)) { return null; } - $class = ($parm == 'large') ? "btn-large btn-lg" : ""; - return ""; + $oldclass = ($parm == 'large') ? "btn-large btn-lg" : ""; + + $class = (!empty($parm['class'])) ? $parm['class'] : "btn btn-primary ".$oldclass." button"; + + return ""; } @@ -202,4 +209,4 @@ class login_shortcodes extends e_shortcode } -?> \ No newline at end of file +?>