- edited description
Label Requires Option
Issue #25
resolved
I propose to add this into file "\components\BSHtml.php" on line 1761 (activeControlGroup method):
if ($labelOptions !== false && $layout !== self::FORM_LAYOUT_INLINE) {
if (isset($labelOptions['ex']) && $labelOptions['ex'] === true) {
// todo: consider adding support for overriding the label with plain text.
$output .= parent::activeLabelEx($model, $attribute, $labelOptions);
}
else {
$output .= parent::activeLabel($model, $attribute, $labelOptions);
}
}
Comments (6)
-
reporter -
reporter - marked as minor
-
repo owner At the moment there are
if ($labelOptions !== false && $layout !== self::FORM_LAYOUT_INLINE) { // todo: consider adding support for overriding the label with plain text. $output .= parent::activeLabelEx($model, $attribute, $labelOptions); }
your way forced people to change all her projects plz set other way and send a pull request and a code example
-
repo owner -
assigned issue to
-
assigned issue to
-
reporter Well. Then:
if ($labelOptions !== false && $layout !== self::FORM_LAYOUT_INLINE) { if (isset($labelOptions['ex']) && empty($labelOptions['ex'])) { // todo: consider adding support for overriding the label with plain text. $output .= parent::activeLabel($model, $attribute, $labelOptions); } else { $output .= parent::activeLabelEx($model, $attribute, $labelOptions); } }
It doesn't make anything to rewrite in existing projects. Example label without requires mark "*":
echo $form->textFieldControlGroup($model, 'login', array( 'labelOptions' => array( 'ex' => false, // or => '' ) ));
-
repo owner - changed status to resolved
- Log in to comment