mirror of
https://github.com/e107inc/e107.git
synced 2025-08-12 09:34:54 +02:00
Merge pull request #3446 from Jimmi08/patch-2
{AUTHOR_INPUT} - added classes parameters #3444
This commit is contained in:
@@ -242,7 +242,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')
|
||||||
@@ -251,8 +252,11 @@ class comment_shortcodes extends e_shortcode
|
|||||||
{
|
{
|
||||||
$form = e107::getForm();
|
$form = e107::getForm();
|
||||||
|
|
||||||
|
$inputclass = (!empty($parm['inputclass'])) ? $parm['inputclass'] : '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,
|
||||||
);
|
);
|
||||||
@@ -263,7 +267,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>';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user