summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Geiger2011-10-13 15:34:53 +0200
committerBjörn Geiger2011-10-13 15:34:53 +0200
commitfa527a06464973d1b401e36501e0be4c9ace4924 (patch)
tree4e490f99c744cbdc3b8004de3d1eadf6da9906f5
parentminor (diff)
downloadpbs2-fa527a06464973d1b401e36501e0be4c9ace4924.tar.gz
pbs2-fa527a06464973d1b401e36501e0be4c9ace4924.tar.xz
pbs2-fa527a06464973d1b401e36501e0be4c9ace4924.zip
minor
-rwxr-xr-xapplication/modules/user/forms/Client.php71
-rwxr-xr-xapplication/modules/user/views/scripts/client/index.phtml6
-rwxr-xr-xapplication/modules/user/views/scripts/pool/index.phtml6
3 files changed, 50 insertions, 33 deletions
diff --git a/application/modules/user/forms/Client.php b/application/modules/user/forms/Client.php
index 33a6cf1..2a2191b 100755
--- a/application/modules/user/forms/Client.php
+++ b/application/modules/user/forms/Client.php
@@ -16,45 +16,62 @@ class user_Form_Client extends Zend_Form
private $buttontext = 'Save';
private $groups;
private $page;
-
+
public function setButtontext($v){
$this->buttontext = $v;
}
public function setPage($page){
$this->page = $page;
}
-
- public function init()
- {
- $this->setName("pool");
+
+ public function init()
+ {
+ $this->setName("pool");
$this->setMethod('post');
-
+
$mac = $this->createElement('text', 'macadress', array(
'filters' => array('StringTrim'),
'validators' => array(
- array(
+ array(
'regex',
- false,
- array(
+ false,
+ array(
'/^[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}$/i',
'messages' => array(
- Zend_Validate_Regex::NOT_MATCH => "'%value%' is not a valid Mac-Adress",
- Zend_Validate_Regex::INVALID => 'Mac-Adress contains invalid characters.'
- )
- )
- )
- ),
+ Zend_Validate_Regex::NOT_MATCH => "'%value%' is not a valid Mac-Adress",
+ Zend_Validate_Regex::INVALID => 'Mac-Adress contains invalid characters.'
+ )
+ )
+ )
+ ),
'required' => true,
- 'label' => 'MacAdress:',
+ 'label' => 'MacAddress:',
));
$this->addElement($mac);
-
-
- $this->addElement('text', 'hardwarehash', array(
+
+ $this->addElement('text', 'ip', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(32, 32)),
+ ),
+ 'required' => true,
+ 'label' => 'IpAddress:',
+ ));
+
+ $this->addElement('text', 'ip6', array(
'filters' => array('StringTrim'),
'validators' => array(
- array('StringLength', false, array(32, 32)),
- ),
+ array('StringLength', false, array(32, 32)),
+ ),
+ 'required' => true,
+ 'label' => 'Ip6Address:',
+ ));
+
+ $this->addElement('text', 'hardwarehash', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(32, 32)),
+ ),
'required' => true,
'label' => 'Hardwarehash:',
));
@@ -63,12 +80,12 @@ class user_Form_Client extends Zend_Form
'required' => false,
'ignore' => true,
'label' => $this->buttontext,
- ));
-
- $this->addElement('button', 'Cancel', array(
+ ));
+
+ $this->addElement('button', 'Cancel', array(
'onclick' => 'self.location="/user/client/index/page/'.$this->page.'"'
- ));
-
- }
+ ));
+
+ }
}
diff --git a/application/modules/user/views/scripts/client/index.phtml b/application/modules/user/views/scripts/client/index.phtml
index bf8d8e3..eae3cd2 100755
--- a/application/modules/user/views/scripts/client/index.phtml
+++ b/application/modules/user/views/scripts/client/index.phtml
@@ -52,11 +52,11 @@
<!--<div class='title'>Title</div>-->
<!--<div class='subtitle'>Subtitle</div>-->
<div class='details'>
- <label>MacAdress</label>
+ <label>MacAddress</label>
<div class='item'><?php echo $this->escape($client['macadress']) ?></div>
- <label>IpAdress</label>
+ <label>IpAddress</label>
<div class='item'><?php echo $this->escape($client['ip']); ?>&nbsp;</div>
- <label>Ip6Adress</label>
+ <label>Ip6Address</label>
<div class='item'><?php echo $this->escape($client['ip6']); ?>&nbsp;</div>
<label>Hardwarehash</label>
<div class='item'><?php echo $this->escape($client['hardwarehash']) ?></div>
diff --git a/application/modules/user/views/scripts/pool/index.phtml b/application/modules/user/views/scripts/pool/index.phtml
index 03e9be8..dcf62f4 100755
--- a/application/modules/user/views/scripts/pool/index.phtml
+++ b/application/modules/user/views/scripts/pool/index.phtml
@@ -107,11 +107,11 @@
<?php endif;?>
</div>
<div class='details'>
- <label>MacAdress</label>
+ <label>MacAddress</label>
<div class='item'><?php echo ($cli->macAdress); ?></div>
- <label>IpAdress</label>
+ <label>IpAddress</label>
<div class='item'><?php echo ($cli->ip); ?>&nbsp;</div>
- <label>Ip6Adress</label>
+ <label>Ip6Address</label>
<div class='item'><?php echo ($cli->ip6); ?>&nbsp;</div>
<label>Hardwarehash</label>
<div class='item'><?php echo ($cli->hardwarehash); ?></div>