1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 22:27:34 +02:00

{AUTHOR_INPUT} - added classes parameters

This commit is contained in:
Jimako
2018-09-21 22:12:04 +02:00
committed by GitHub
parent 9b17485656
commit 2a56ce28bd

View File

@@ -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 = '') function sc_author_input($parm = '')
{ {
if($this->mode == 'edit') if($this->mode == 'edit')
@@ -248,8 +249,11 @@ class comment_shortcodes extends e_shortcode
{ {
$form = e107::getForm(); $form = e107::getForm();
$inputclass = (!empty($parm['class'])) ? $parm['class'] : 'comment author form-control';
$class = (!empty($parm['class'])) ? $parm['class'] : 'form-group';
$options = array( $options = array(
'class' => 'comment author form-control', 'class' => $inputclass,
'placeholder' => COMLAN_16, 'placeholder' => COMLAN_16,
'size' => 61, 'size' => 61,
); );
@@ -260,7 +264,7 @@ class comment_shortcodes extends e_shortcode
$options['disabled'] = 'disabled'; $options['disabled'] = 'disabled';
} }
$text = '<div class="form-group">'; $text = '<div class="'.$class.'">';
$text .= $form->text('author_name', $_SESSION['comment_author_name'], 100, $options); $text .= $form->text('author_name', $_SESSION['comment_author_name'], 100, $options);
$text .= '</div>'; $text .= '</div>';