You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public function getBetterButtonsActions()
{
$fields = parent::getBetterButtonsActions();
$my_action = BetterButtonCustomAction::create('MyAction', 'My Action');
$my_action = $my_action->performDisabledTransformation();
$fields->push($my_action);
return $fields;
}
The button appears to be still clickable. The reason is simply because the button is an <a> element in the editor's HTML code. It does have an attribute disabled="disabled" but obviously HTML does not support that for <a> elements.
Could it be simply fixed by making the href attribute empty if the field has the $disabled property set to true?
I haven't tried this in SilverStripe 4. If it works in SS 4, then I guess it's not meaningful to spend much time fixing this in SS 3.
The text was updated successfully, but these errors were encountered:
Taitava
changed the title
SS3: BetterButtonCustomAction::performDisabledTransformation() does not diable the button
SS3: BetterButtonCustomAction::performDisabledTransformation() does not disable the button
Oct 6, 2018
Example code:
The button appears to be still clickable. The reason is simply because the button is an
<a>
element in the editor's HTML code. It does have an attributedisabled="disabled"
but obviously HTML does not support that for<a>
elements.Could it be simply fixed by making the
href
attribute empty if the field has the$disabled
property set to true?I haven't tried this in SilverStripe 4. If it works in SS 4, then I guess it's not meaningful to spend much time fixing this in SS 3.
The text was updated successfully, but these errors were encountered: