1 <?php
2
3 4 5 6 7
8
9 namespace nk2580\wordsmith\Inputs\Fields;
10
11 use nk2580\wordsmith\Inputs\Input as Input;
12
13 14 15 16 17
18 class PasswordField extends Input {
19
20 public function printField() {
21 $class = $this->getClassString();
22 if (!$this->readonly) {
23 echo "<label for=\"" . $this->name . "\" >" . $this->label . " <input type=\"password\" name=\"" . $this->name . "\" class=\"" . $class . "\" id=\"" . $this->name . "\" value=\"" . $this->value . "\" /></label>";
24 } else {
25 echo "<label for=\"" . $this->name . "\" >" . $this->label . " <input type=\"password\" readonly name=\"" . $this->name . "\" class=\"" . $class . "\" id=\"" . $this->name . "\" value=\"" . $this->value . "\" /></label>";
26 }
27 echo '<br/>';
28 }
29
30 }
31