silverstripe / silverstripe-linkfield

Silverstripe module for managing links
BSD 3-Clause "New" or "Revised" License
4 stars 14 forks source link

Disabled state #181

Closed emteknetnz closed 8 months ago

emteknetnz commented 8 months ago

Need to support a disabled state which is set via ->setDisabled(true)

This is similar though not quite the same as ->setReadonly() which had supported on this card

For example, with very quick test locally shows that there is a mouse pointer with the readonly field, though there isn't one with the disabled field

    public function getCMSFields()
    {
        $fields = parent::getCMSFields();
        $fields->insertAfter('Content', new TextField('MyText01'));
        $fields->insertAfter('Content', (new TextField('MyText02'))->setReadonly(true));
        $fields->insertAfter('Content', (new TextField('MyText03'))->setDisabled(true));
        return $fields;
    }   

Some differences between readonly and disabled can be found here

Acceptance criteria

Notes

PR

sabina-talipova commented 8 months ago

PR is merged. Task is completed.