public function testPassword()
 {
     //test where valueOrArray is array
     $html = $this->object->password('element', array('arbitrary' => 'arbitrary', 'class' => 'test-class'));
     $this->assertAttributes($html, array('class' => array('test-class', 'ccm-input-password'), 'arbitrary' => 'arbitrary', 'type' => 'password'));
     //test where valueOrArray is value
     $html = $this->object->password('element', 'value', array('arbitrary' => 'arbitrary', 'class' => 'test-class'));
     $this->assertAttributes($html, array('class' => array('test-class', 'ccm-input-password'), 'value' => 'value', 'arbitrary' => 'arbitrary', 'type' => 'password'));
 }
Example #2
0
<?php

FormHelper::create('loginForm');
FormHelper::input('email', "E-mail", Request::post('email'), array('placeholder' => 'Digite o seu e-mail', 'style' => 'max-width:400px', 'validation' => array('regex' => FormHelper::EMAIL, 'message' => 'Digite um <strong>E-mail</strong> válido.')));
FormHelper::password('password', "Senha", Request::post('password'), array('placeholder' => 'Digite o sua senha', 'style' => 'max-width:400px;', 'validation' => array('regex' => FormHelper::NOT_EMPTY, 'message' => 'Digite uma <strong>Senha</strong> para logar.')));
?>
<br/><?php 
FormHelper::startGroup();
FormHelper::submitAjax("Enviar", "auth", array('class' => 'button'));
FormHelper::endGroup();
FormHelper::end();
Example #3
0
</label>
        <div class="col-sm-10">
            <?php 
echo FormHelper::textbox('Login', $this->getModel()->Login);
?>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" for="password_field"><?php 
echo $this->getModel()->fieldTitle('Password');
?>
</label>
        <div class="col-sm-10">
            <?php 
echo FormHelper::password('Password');
?>
        </div>
    </div>

    <div class="form-group">
        <div class="controls">
            <div class="col-sm-offset-2 col-sm-10 checkbox-group">
                <label class="col-sm-10" for="field_RememberMe">
                    <?php 
echo FormHelper::checkbox('RememberMe');
?>
                    <?php 
echo $this->getModel()->fieldTitle('RememberMe');
?>
                </label>
Example #4
0
 public function testInputPassword()
 {
     $this->assertEqual(FormHelper::password('name', 'value', array('class' => 'myClass')), '<input type="password" name="name" class="myClass" value="value" id="name">');
     $this->assertEqual(FormHelper::password('name', $this->Model, array('class' => 'myClass')), '<input type="password" name="name" class="myClass" value="obj" id="name">');
 }
Example #5
0
            content:'';
        }
    }
</style>
<div class="content">
<?php 
global $db;
$u = $db->getResult('user', '*', 'id=' . $id, true);
FormHelper::create('formUsuario');
?>
        <div class="form-group name_group">
            <label for="name">Nome</label><br/> <?php 
echo $u['name'];
?>
        </div>
    <?php 
FormHelper::input('email', "E-mail", $u['email'], array('placeholder' => 'Digite o e-mail', 'style' => 'max-width:400px', 'validation' => array('regex' => FormHelper::EMAIL, 'message' => 'Digite um <strong>E-mail</strong> válido.')));
FormHelper::password('senha', 'Senha', '', array('placeholder' => 'Preencha se quiser alterar a senha', 'style' => 'max-width:400px'));
FormHelper::password('novasenha', 'Nova senha', '', array('placeholder' => 'Digite a senha nova', 'style' => 'max-width:400px'));
FormHelper::password('repetir', 'Repita a nova senha', '', array('placeholder' => 'Repita a senha nova', 'style' => 'max-width:400px'));
?>
<br/><?php 
FormHelper::startGroup();
FormHelper::submitAjax("Salvar", "salvar/" . $u['id'], array('class' => 'button'));
FormHelper::endGroup();
FormHelper::end();
?>
<script type="text/javascript">
    
</script>
</div>
 public function render()
 {
     echo FormHelper::password($this->getAlias(), $this->getValue(), array('class' => 'TextboxField', 'id' => 'field_' . $this->getAlias()));
 }