Add some redundancy to get more implicitness

Although this commit does not seem reasonable
at first the "big" picture proves its necessity!

refs #7163
This commit is contained in:
Johannes Meyer 2014-09-29 11:20:39 +02:00
parent 4f688fa544
commit 380ffe45b9
6 changed files with 45 additions and 9 deletions

View File

@ -29,6 +29,15 @@ class DbResourceForm extends Form
*/
public function createElements(array $formData)
{
$this->addElement(
'text',
'name',
array(
'required' => true,
'label' => t('Resource Name'),
'description' => t('The unique name of this resource')
)
);
$this->addElement(
'select',
'db',

View File

@ -25,6 +25,15 @@ class FileResourceForm extends Form
*/
public function createElements(array $formData)
{
$this->addElement(
'text',
'name',
array(
'required' => true,
'label' => t('Resource Name'),
'description' => t('The unique name of this resource')
)
);
$this->addElement(
'text',
'filename',

View File

@ -29,6 +29,15 @@ class LdapResourceForm extends Form
*/
public function createElements(array $formData)
{
$this->addElement(
'text',
'name',
array(
'required' => true,
'label' => t('Resource Name'),
'description' => t('The unique name of this resource')
)
);
$this->addElement(
'text',
'hostname',

View File

@ -29,6 +29,15 @@ class LivestatusResourceForm extends Form
*/
public function createElements(array $formData)
{
$this->addElement(
'text',
'name',
array(
'required' => true,
'label' => t('Resource Name'),
'description' => t('The unique name of this resource')
)
);
$this->addElement(
'text',
'socket',

View File

@ -26,6 +26,15 @@ class StatusdatResourceForm extends Form
*/
public function createElements(array $formData)
{
$this->addElement(
'text',
'name',
array(
'required' => true,
'label' => t('Resource Name'),
'description' => t('The unique name of this resource')
)
);
$this->addElement(
'text',
'status_file',

View File

@ -224,15 +224,6 @@ class ResourceConfigForm extends ConfigForm
$resourceTypes['db'] = t('SQL Database');
}
$this->addElement(
'text',
'name',
array(
'required' => true,
'label' => t('Resource Name'),
'description' => t('The unique name of this resource')
)
);
$this->addElement(
'select',
'type',