From 2a56ce28bd78b167d5ac416176ed28c1f4e047eb Mon Sep 17 00:00:00 2001 From: Jimako Date: Fri, 21 Sep 2018 22:12:04 +0200 Subject: [PATCH] {AUTHOR_INPUT} - added classes parameters --- e107_core/shortcodes/batch/comment_shortcodes.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/e107_core/shortcodes/batch/comment_shortcodes.php b/e107_core/shortcodes/batch/comment_shortcodes.php index 5a71895df..77258d4ec 100644 --- a/e107_core/shortcodes/batch/comment_shortcodes.php +++ b/e107_core/shortcodes/batch/comment_shortcodes.php @@ -239,7 +239,8 @@ class comment_shortcodes extends e_shortcode } } - + /* example {AUTHOR_INPUT} */ + /* example {AUTHOR_INPUT: inputclass=form-control&class=form-group} */ function sc_author_input($parm = '') { if($this->mode == 'edit') @@ -248,8 +249,11 @@ class comment_shortcodes extends e_shortcode { $form = e107::getForm(); + $inputclass = (!empty($parm['class'])) ? $parm['class'] : 'comment author form-control'; + $class = (!empty($parm['class'])) ? $parm['class'] : 'form-group'; + $options = array( - 'class' => 'comment author form-control', + 'class' => $inputclass, 'placeholder' => COMLAN_16, 'size' => 61, ); @@ -260,7 +264,7 @@ class comment_shortcodes extends e_shortcode $options['disabled'] = 'disabled'; } - $text = '
'; + $text = '
'; $text .= $form->text('author_name', $_SESSION['comment_author_name'], 100, $options); $text .= '
';