silverstripe-framework/Forms/InlineFormAction_ReadOnly.php
Damian Mooyman 8dd644d25d
API Namespace all classes
Namespace all templates
Move difflib and BBCodeParser2 to thirdparty
Remove deprecated API marked for removal in 4.0
2016-09-08 10:23:17 +12:00

34 lines
597 B
PHP

<?php
namespace SilverStripe\Forms;
/**
* Readonly version of {@link InlineFormAction}.
*/
class InlineFormAction_ReadOnly extends FormField
{
protected $readonly = true;
/**
* @param array $properties
* @return string
*/
public function Field($properties = array())
{
return FormField::create_tag('input', array(
'type' => 'submit',
'name' => sprintf('action_%s', $this->name),
'value' => $this->title,
'id' => $this->ID(),
'disabled' => 'disabled',
'class' => 'action disabled ' . $this->extraClass,
));
}
public function Title()
{
return false;
}
}