Merge pull request #709 from creative-commoners/pulls/5.0/display-rules-message

FIX Update display rules not enabled warning message to be full width
This commit is contained in:
Dylan Wagstaff 2018-02-02 14:37:38 +13:00 committed by GitHub
commit 9ca53d1adb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -343,14 +343,14 @@ class EditableFormField extends DataObject
{ {
// Check display rules // Check display rules
if ($this->Required) { if ($this->Required) {
return new FieldList( return FieldList::create(
LabelField::create( LiteralField::create(
_t( 'DisplayRulesNotEnabled',
'<div class="alert alert-warning">' . _t(
__CLASS__.'.DISPLAY_RULES_DISABLED', __CLASS__.'.DISPLAY_RULES_DISABLED',
'Display rules are not enabled for required fields. Please uncheck "Is this field Required?" under "Validation" to re-enable.' 'Display rules are not enabled for required fields. Please uncheck "Is this field Required?" under "Validation" to re-enable.'
) ) . '</div>'
) )
->addExtraClass('message warning')
); );
} }