3
* This file is part of Sylar.
5
* Sylar is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU Lesser General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* (at your option) any later version.
10
* Sylar is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU Lesser General Public License for more details.
15
* You should have received a copy of the GNU Lesser General Public License
16
* along with Sylar. If not, see <http://www.gnu.org/licenses/>.
18
* @copyright Copyright Sylar Development Team
19
* @license http://www.gnu.org/licenses/ GNU Public License V2.0
20
* @see https://launchpad.net/sylar/
21
* @see http://www.giano-solutions.com
25
import('sylar.presentation.html.components.FormComponent');
30
* Implements the INPUT TYPE=PASSWORD html tag
35
* @author Gianluca Giusti [brdp] <g.giusti@giano-solutions.com>
36
* @copyright Sylar Development Team
39
class Sylar_FormInputPassword extends Sylar_FormComponent{
42
function __construct($sId=null, $sName=null, $Value=null){
44
$this->setAttribute("type", "password");
51
$this->setName($sName);
55
$this->setValue($Value);
60
function __destruct(){
61
// nothing to do at the moment
65
// Getter and Setter Methods
66
//__________________________________________________________________________
69
public function setValue($sValue){
70
$this->setAttribute("value", $sValue);
72
public function getValue(){
73
return $this->getAttribute("value");
77
public function setSize($sSize){
78
$this->setAttribute("size", $sSize);
80
public function getSize(){
81
return $this->getAttribute("size");
85
public function setMaxLen($sMaxLen){
86
$this->setAttribute("maxlength", $sMaxLen);
88
public function getMaxLen(){
89
$this->getAttribute("maxlength");
96
* Set RedOnly on or off
97
* @param boolean $fReadOnly
99
public function setReadOnly($fReadOnly){
101
$this->setAttribute("readonly", "readonly");
103
$this->removeAttribute("readonly");
111
//__________________________________________________________________________
116
* return the Html source
117
* it return html code of entire object
119
* implements the abstract method
123
public function getHtmlSource(){
124
return $this->render();
130
* it prints the object Html source on screen
132
* implements the abstract method
136
public function show(){
137
echo $this->render();
144
//__________________________________________________________________________
148
* Design Html INPUT tag
149
* Using parent method
152
* @see Sylar_Html::provideTagWithAttributes()
154
protected function render(){
155
return parent::provideTagWithAttributes("input");
164
//__________________________________________________________________________
b'\\ No newline at end of file'