From 2a56ce28bd78b167d5ac416176ed28c1f4e047eb Mon Sep 17 00:00:00 2001 From: Jimako Date: Fri, 21 Sep 2018 22:12:04 +0200 Subject: [PATCH 1/2] {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 .= '
'; From 44fd129daab362234fd2a54a5ad654ecf5d17084 Mon Sep 17 00:00:00 2001 From: Jimako Date: Fri, 21 Sep 2018 22:18:40 +0200 Subject: [PATCH 2/2] fix for PR --- e107_core/shortcodes/batch/comment_shortcodes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_core/shortcodes/batch/comment_shortcodes.php b/e107_core/shortcodes/batch/comment_shortcodes.php index 77258d4ec..a81cf5ce9 100644 --- a/e107_core/shortcodes/batch/comment_shortcodes.php +++ b/e107_core/shortcodes/batch/comment_shortcodes.php @@ -249,7 +249,7 @@ class comment_shortcodes extends e_shortcode { $form = e107::getForm(); - $inputclass = (!empty($parm['class'])) ? $parm['class'] : 'comment author form-control'; + $inputclass = (!empty($parm['inputclass'])) ? $parm['inputclass'] : 'comment author form-control'; $class = (!empty($parm['class'])) ? $parm['class'] : 'form-group'; $options = array(