Skip to content

Commit

Permalink
Add some redundancy to get more implicitness
Browse files Browse the repository at this point in the history
Although this commit does not seem reasonable
at first the "big" picture proves its necessity!

refs #7163
  • Loading branch information
Johannes Meyer committed Sep 29, 2014
1 parent 4f688fa commit 380ffe4
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 9 deletions.
9 changes: 9 additions & 0 deletions application/forms/Config/Resource/DbResourceForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ public function init()
*/
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',
Expand Down
9 changes: 9 additions & 0 deletions application/forms/Config/Resource/FileResourceForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ public function init()
*/
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',
Expand Down
9 changes: 9 additions & 0 deletions application/forms/Config/Resource/LdapResourceForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ public function init()
*/
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',
Expand Down
9 changes: 9 additions & 0 deletions application/forms/Config/Resource/LivestatusResourceForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ public function init()
*/
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',
Expand Down
9 changes: 9 additions & 0 deletions application/forms/Config/Resource/StatusdatResourceForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ public function init()
*/
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',
Expand Down
9 changes: 0 additions & 9 deletions application/forms/Config/ResourceConfigForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,6 @@ public function createElements(array $formData)
$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',
Expand Down

0 comments on commit 380ffe4

Please sign in to comment.