mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
34 lines
597 B
PHP
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;
|
||
|
}
|
||
|
}
|