passwordField() public static method

Generates a password field input.
See also: self::textInputField
public static passwordField ( string $name, string $value = '', array $htmlOptions = [] ) : string
$name string the input name.
$value string the input value.
$htmlOptions array additional HTML attributes.
return string the generated input field.
Esempio n. 1
0
 public function testPasswordField()
 {
     $I = $this->codeGuy;
     $html = TbHtml::passwordField('password', 'secret', array('class' => 'input'));
     $input = $I->createNode($html, 'input[type=password]');
     $I->seeNodeAttributes($input, array('class' => 'input', 'id' => 'password', 'name' => 'password', 'value' => 'secret'));
 }
Esempio n. 2
0
<?php echo TbHtml::beginFormTb(TbHtml::FORM_LAYOUT_SEARCH); ?>
    <?php echo TbHtml::searchQuery('search'); ?>
    <?php echo TbHtml::submitButton('Submit'); ?>
&lt;?php echo TbHtml::endForm(); ?></pre>

    <h3>Inline form</h3>

    <div class="bs-docs-example">
        <?php 
echo TbHtml::beginFormTb(TbHtml::FORM_LAYOUT_INLINE);
?>
            <?php 
echo TbHtml::textField('email', '', array('placeholder' => 'Email', 'size' => TbHtml::INPUT_SIZE_SMALL));
?>
            <?php 
echo TbHtml::passwordField('password', '', array('placeholder' => 'Password', 'size' => TbHtml::INPUT_SIZE_SMALL));
?>
            <?php 
echo TbHtml::checkBox('rememberMe', false, array('label' => 'Remember me'));
?>
            <?php 
echo TbHtml::submitButton('Sign in');
?>
        <?php 
echo TbHtml::endForm();
?>
    </div>
    <pre class="prettyprint linenums">
&lt;?php echo TbHtml::beginFormTb(TbHtml::FORM_LAYOUT_INLINE); ?>
    &lt;?php echo TbHtml::textField('email', '',
        array('placeholder' => 'Email', 'size' => TbHtml::INPUT_SIZE_SMALL)); ?>
Esempio n. 3
0
<?php echo TbHtml::pageHeader('', 'User Account '); ?>

<fieldset>
    <legend>Change Password</legend>
<?php echo TbHtml::beginFormTb()?>
      <?php echo TbHtml::label('<b>New Password</b>','new_password');?>
      <?php echo TbHtml::passwordField('new_password','',array('placeholder'=>'Enter new password here...')); ?>
      <div class="form-actions">
        <?php echo TbHtml::submitButton('Change',array(
		    'color'=>TbHtml::BUTTON_COLOR_SUCCESS,
		    'size'=>TbHtml::BUTTON_SIZE_DEFAULT,
		)); ?>
      </div>
 

<?php echo TbHtml::endForm();?>
</fieldset>

<?php $this->widget('zii.widgets.CDetailView',array(
    'htmlOptions' => array(
        'class' => 'table table-striped table-condensed table-hover',
    ),
    'data'=>$model,
    'attributes'=>array(
		//'id',
		'username',
		'first_name',
		'middle_name',
		'last_name',
               
                $model->is_mda?