2016-08-19 10:51:35 +12:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\Forms;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Readonly version of {@link InlineFormAction}.
|
|
|
|
*/
|
|
|
|
class InlineFormAction_ReadOnly extends FormField
|
|
|
|
{
|
|
|
|
|
2016-11-29 12:31:16 +13:00
|
|
|
protected $readonly = true;
|
2016-08-19 10:51:35 +12:00
|
|
|
|
2016-11-29 12:31:16 +13:00
|
|
|
/**
|
|
|
|
* @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,
|
|
|
|
));
|
|
|
|
}
|
2016-08-19 10:51:35 +12:00
|
|
|
|
2016-11-29 12:31:16 +13:00
|
|
|
public function Title()
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2016-08-19 10:51:35 +12:00
|
|
|
}
|