当前位置: 首页>>代码示例>>PHP>>正文


PHP CHtml::passwordField方法代码示例

本文整理汇总了PHP中CHtml::passwordField方法的典型用法代码示例。如果您正苦于以下问题:PHP CHtml::passwordField方法的具体用法?PHP CHtml::passwordField怎么用?PHP CHtml::passwordField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CHtml的用法示例。


在下文中一共展示了CHtml::passwordField方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: formInput

	public function formInput(&$controller, $tagOptions=array())
	{
		ob_start();
		$inputName = $this->formInputName();
		$inputID = "i_{$inputName}";
		echo CHtml::label($this->label, $inputID);
		echo CHtml::tag('br');
		if($this->isReadonly)
			$tagOptions['disabled'] = true;

		$tagOptions['id'] = $inputID;
		if($this->value)
		{
			$tagOptions['value'] = 1;
			?>
			<div>
				<?php echo Yii::t('AutoAdmin.form', '<span class="warning">Replace</span> password')?> (<?php echo Yii::t('AutoAdmin.form', 'set checkbox on for confirm')?>):
				<br/><label><?php echo CHtml::checkBox("{$inputName}[is_new]", null, $tagOptions)?>&nbsp;<?php echo Yii::t('AutoAdmin.common', 'Yes')?></label>
			</div>
			<?php
			echo CHtml::passwordField("{$inputName}[val]", '******', array('disabled'=>true));
		}
		else
		{
			if(!empty($this->options['pattern']))
				$tagOptions['pattern'] = $this->options['pattern'];
			if(isset($this->options['maxlength']))
				$tagOptions['maxlength'] = $this->options['maxlength'];
			echo CHtml::passwordField("{$inputName}[val]", $this->value, $tagOptions);
		}

		return ob_get_clean();
	}
开发者ID:nico13051995,项目名称:IntITA,代码行数:33,代码来源:AAFieldPassword.php

示例2: newLoginForm

 public function newLoginForm()
 {
     $sUserName = '';
     $sPassword = '';
     if (Yii::app()->getConfig("demoMode") === true && Yii::app()->getConfig("demoModePrefill") === true) {
         $sUserName = Yii::app()->getConfig("defaultuser");
         $sPassword = Yii::app()->getConfig("defaultpass");
     }
     $this->getEvent()->getContent($this)->addContent(CHtml::tag('li', array(), "<label for='user'>" . gT("Username") . "</label>" . CHtml::textField('user', $sUserName, array('size' => 40, 'maxlength' => 40))))->addContent(CHtml::tag('li', array(), "<label for='password'>" . gT("Password") . "</label>" . CHtml::passwordField('password', $sPassword, array('size' => 40, 'maxlength' => 40))));
 }
开发者ID:rouben,项目名称:LimeSurvey,代码行数:10,代码来源:Authdb.php

示例3: passwordField

 /**
  * Generates a password field input.
  * @param string the input name
  * @param string the input value
  * @param array additional HTML attributes. Besides normal HTML attributes, a few special
  * attributes are also recognized (see {@link clientChange} and {@link tag} for more details.)
  * @return string the generated input field
  * @see clientChange
  * @see inputField
  */
 public static function passwordField($name, $value = '', $htmlOptions = array())
 {
     if (isset($htmlOptions['class'])) {
         if (stripos($htmlOptions['class'], 'ui-corner-all') === false) {
             $htmlOptions['class'] .= ' ui-corner-all';
         }
     } else {
         $htmlOptions['class'] = 'ui-corner-all';
     }
     return parent::passwordField($name, $value, $htmlOptions);
 }
开发者ID:kit9,项目名称:ERP_Accounting_Indonesia,代码行数:21,代码来源:UHtml.php

示例4: run

 /**
  * Run this widget.
  * This method registers necessary CSS and JS files and renders the needed JS and HTML code.
  */
 public function run()
 {
     list($name, $id) = $this->resolveNameID();
     if (isset($this->htmlOptions['id'])) {
         $id = $this->htmlOptions['id'];
     } else {
         $this->htmlOptions['id'] = $id;
     }
     if (isset($this->htmlOptions['name'])) {
         $name = $this->htmlOptions['name'];
     }
     if ($this->hasModel()) {
         echo CHtml::activePasswordField($this->model, $this->attribute, $this->htmlOptions);
     } else {
         echo CHtml::passwordField($name, $this->value, $this->htmlOptions);
     }
     $this->registerClientScript();
     $this->registerClientScriptFiles();
 }
开发者ID:amlap,项目名称:Yii-Extensions,代码行数:23,代码来源:XPasswordStrength.php

示例5: run

 /**
  *### .run()
  *
  * Runs the widget.
  */
 public function run()
 {
     list($name, $id) = $this->resolveNameID();
     if ($this->hasModel()) {
         if ($this->form) {
             echo $this->form->passwordField($this->model, $this->attribute, $this->htmlOptions);
         } else {
             echo CHtml::activePasswordField($this->model, $this->attribute, $this->htmlOptions);
         }
     } else {
         echo CHtml::passwordField($name, $this->value, $this->htmlOptions);
     }
     $this->registerClientScript();
     $options = !empty($this->options) ? CJavaScript::encode($this->options) : '';
     ob_start();
     echo "jQuery('#{$id}').passField({$options})";
     foreach ($this->events as $event => $handler) {
         echo ".on('{$event}', " . CJavaScript::encode($handler) . ")";
     }
     Yii::app()->getClientScript()->registerScript(__CLASS__ . '#' . $this->getId(), ob_get_clean() . ';');
 }
开发者ID:AndressJose,项目名称:sistema-examenes,代码行数:26,代码来源:TbPassfield.php

示例6: isset

echo CHtml::textField('email_address', isset($data['email_address']) ? $data['email_address'] : "", array('class' => "uk-form-width-large", 'data-validation' => "required"));
?>
</div>

<?php 
$FunctionsK = new FunctionsK();
$FunctionsK->clientRegistrationCustomFields(true, $data);
?>

<div class="uk-form-row">
  <label class="uk-form-label"><?php 
echo Yii::t("default", "Password");
?>
</label>
  <?php 
echo CHtml::passwordField('password', '', array('class' => "uk-form-width-large"));
?>
</div>

<div class="uk-form-row">
  <label class="uk-form-label"><?php 
echo Yii::t("default", "Street Address");
?>
</label>
  <?php 
echo CHtml::textField('street', isset($data['street']) ? $data['street'] : "", array('class' => "uk-form-width-large", 'data-validation' => "required"));
?>
</div>

<div class="uk-form-row">
  <label class="uk-form-label"><?php 
开发者ID:ashishvazirani,项目名称:food,代码行数:31,代码来源:customer-add.php

示例7: renderPassword

 public function renderPassword($name, array $metaData, $form = null)
 {
     $out = '';
     $id = $name;
     $value = isset($metaData['current']) ? $metaData['current'] : '';
     if (isset($metaData['label'])) {
         $out .= CHtml::label($metaData['label'], $id, $metaData['labelOptions']);
     }
     $out .= CHtml::passwordField($id, $value, array('id' => $id, 'form' => $form));
     return $out;
 }
开发者ID:jdbaltazar,项目名称:survey-office,代码行数:11,代码来源:SettingsWidget.php

示例8: array

            </div>
            <div class="controls">
                <?php 
echo CHtml::passwordField('Member[pr_member_new_password]', '');
?>
                <div class="help-inline error" id="pr_member_password_confirm_error"><?php 
echo $error['confirm'] . $error['eval'];
?>
</div>
            </div>
        </div>
        <div class="control-group ">
            <div>
                <?php 
echo CHtml::label('Xác nhận mật khẩu <span class="required">*</span>', 'pr_member_confirm_password', array('class' => 'control-label required'));
?>
            </div>
            <div class="controls">
                <?php 
echo CHtml::passwordField('Member[pr_member_confirm_password]', '');
?>
                <div class="help-inline error" id="pr_member_password_confirm_error"></div>
            </div>
        </div>
	<div class="form-actions">
            <?php 
$this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => 'Save', 'ajaxOptions' => array('type' => 'POST')));
?>
	</div>
<?php 
$this->endWidget();
开发者ID:thongnv90,项目名称:bluesms,代码行数:31,代码来源:_form_change_password.php

示例9: isset

    ?>
					</div>
				<?php 
}
?>

				<?php 
if (!$success) {
    ?>
					<p>
						<?php 
    echo Yii::t('DefaultTheme', 'To change the email address associated to your account, please enter your current password.');
    ?>
					</p>
					<?php 
    echo CHtml::passwordField('password', isset($_POST['password']) ? $_POST['password'] : '', array('placeholder' => Yii::t('DefaultTheme', 'Your current password')));
    ?>
					<?php 
    $this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'success', 'label' => 'Submit', 'htmlOptions' => array('id' => 'submit-comment', 'class' => 'sharebox-submit pull-right', 'style' => 'margin-top: -4px')));
    ?>
	            <?php 
}
?>
			</div>
			
			<?php 
$this->endWidget();
?>
		</div>
	</div>
</div>
开发者ID:fandikurnia,项目名称:CiiMS,代码行数:31,代码来源:emailchange.php

示例10:

    		
		<div class="row">
			<?php 
echo $form->labelEx($model, 'username');
?>
			<?php 
echo CHtml::textField("txtUsername");
?>
		</div>
	
		<div class="row">
			<?php 
echo $form->labelEx($model, 'password');
?>
			<?php 
echo CHtml::passwordField("txtPassword");
?>
		</div>
		<?php 
echo CHtml::hiddenField("login", 1);
?>
		<div class="clb"></div>
		<div class="row submit">
			<?php 
echo CHtml::submitButton('Login');
?>
		</div>
	
	<?php 
$this->endWidget();
?>
开发者ID:giangnh264,项目名称:mobileplus,代码行数:30,代码来源:loginCSKH.php

示例11: array

                                                </div>
                                        </div>
                                        <div class="form-group">
                                                <label class="col-lg-2 control-label">Mail username:</label>
                                                <div class="col-lg-4">
                                                        <?php 
echo CHtml::textField('settings[' . Constants::KEY_EMAIL_USERNAME . ']', $settings[Constants::KEY_EMAIL_USERNAME], array('class' => 'form-control'));
?>
                                                        <p class="help-block">e.g noreply@xchnge.co</p>
                                                </div>
                                        </div>
                                        <div class="form-group">
                                                <label class="col-lg-2 control-label">Mail password:</label>
                                                <div class="col-lg-4">
                                                        <?php 
echo CHtml::passwordField('settings[' . Constants::KEY_EMAIL_PASSWORD . ']', $settings[Constants::KEY_EMAIL_PASSWORD], array('class' => 'form-control'));
?>
                                                        <p class="help-block">Password for the username.</p>
                                                </div>
                                        </div>
                                        <div class="form-group">
                                                <label class="col-lg-2 control-label">Mail security:</label>
                                                <div class="col-lg-4">
                                                        <?php 
echo CHtml::dropDownList('settings[' . Constants::KEY_EMAIL_SECURITY . ']', $settings[Constants::KEY_EMAIL_SECURITY], array('' => 'NULL', 'ssl' => 'SSL', 'tls' => 'TLS'), array('class' => 'form-control'));
?>
                                                </div>
                                        </div>
                                </div>
                                <div class="form-group">
                                        <label class="col-lg-2 control-label">Mail Theme:</label>
开发者ID:wanyos2005,项目名称:hsbf,代码行数:31,代码来源:email.php

示例12: renderInputFieldByType

 private function renderInputFieldByType($form, $attribute)
 {
     if (array_search($attribute, $this->password) !== FALSE) {
         echo CHtml::passwordField($attribute, $this->model->{$attribute}, array('size' => 45));
         return;
     }
     if (array_search($attribute, $this->images) !== FALSE) {
         echo $form->fileField($this->model, $attribute);
         return;
     }
     if (array_search($attribute, $this->bool) !== FALSE) {
         echo $form->checkBox($this->model, $attribute);
         return;
     }
     if (isset($this->dropDownData[$attribute])) {
         echo $form->dropDownList($this->model, $attribute, $this->dropDownData[$attribute]);
         return;
     }
     if (array_search($attribute, $this->datetime) !== FALSE) {
         $this->widget('core.extensions.yii-backvendor.extensions.timepicker.EJuiDateTimePicker', array('name' => $this->modelName . '[' . $attribute . ']', 'value' => $this->model->{$attribute}, 'options' => array('dateFormat' => 'yy-mm-dd', 'timeFormat' => 'hh:mm:ss'), 'language' => ''));
         return;
     }
     echo $form->textField($this->model, $attribute, array('size' => 45));
     return;
 }
开发者ID:rosko,项目名称:backvendor,代码行数:25,代码来源:CBackendController.php

示例13: array

    ?>

  <h2><?php 
    echo Yii::t("default", "Reset Password");
    ?>
</h2>
  
  <div class="uk-form-row">  
  <?php 
    echo CHtml::passwordField('password', '', array('class' => "uk-form-width-large", 'data-validation' => "required", 'placeholder' => Yii::t("default", "New Password")));
    ?>
  </div>

  <div class="uk-form-row">  
  <?php 
    echo CHtml::passwordField('confirm_password', '', array('class' => "uk-form-width-large", 'data-validation' => "required", 'placeholder' => Yii::t("default", "Confirm Password")));
    ?>
  </div>
  
  <div class="uk-form-row">   
    <input type="submit" value="<?php 
    echo Yii::t("default", "Submit");
    ?>
" class="change-pass-btn uk-button uk-button-success uk-width-1-4">
  </div>
  </form>
  
  <?php 
} else {
    ?>
  <p class="uk-text-danger"><?php 
开发者ID:ashishvazirani,项目名称:food,代码行数:31,代码来源:forgot-pass.php

示例14: switch

		</div>
        <div
            class="large-<?php 
    echo $layoutColumns['field'];
    ?>
 column<?php 
    if (empty($htmlOptions['append-text']) || empty($layoutColumns['append-text'])) {
        ?>
 end<?php 
    }
    ?>
">
            <?php 
    switch ($htmlOptions['type']) {
        case 'password':
            echo CHtml::passwordField($name, $value, $htmlOptions);
            break;
        case 'number':
            echo CHtml::numberField($name, $value, $htmlOptions);
            break;
        case 'time':
            echo CHtml::timeField($name, $value, $htmlOptions);
            break;
        case 'text':
        default:
            echo CHtml::textField($name, $value, $htmlOptions);
    }
    if (!empty($links)) {
        foreach ($links as $link) {
            echo '<span class="field-info">' . CHtml::link($link['title'], $link['href'], array('id' => $link['id'])) . '</span>';
        }
开发者ID:openeyes,项目名称:openeyes,代码行数:31,代码来源:TextField.php

示例15: array

if (Yii::app()->user->id == $model->id || Yii::app()->user->checkAccess('admin')) {
    ?>
        <div class="form-group">
            <label class="col-sm-2 control-label">Mật khẩu mới</label>
            <div class="col-sm-4">
                <?php 
    echo CHtml::passwordField('new_pass', '', array('class' => 'form-control', 'placeholder' => 'Cập nhật lại mật khẩu nếu cần thay đổi'));
    ?>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">Mật khẩu xác nhận</label>
            <div class="col-sm-4">
                <?php 
    echo CHtml::passwordField('confirm_pass', '', array('class' => 'form-control', 'placeholder' => 'Xác nhận mật khẩu'));
    ?>
            </div>
        </div>

        <div class="form-group">
            <?php 
    echo $form->labelEx($model, 'hvt', array('class' => 'col-sm-2 control-label'));
    ?>
            <div class="col-sm-2">
                <?php 
    echo $form->telField($model, 'lastname', array('class' => 'form-control', 'size' => 20, 'maxlength' => 20, 'placeholder' => 'Họ của bạn...'));
    ?>
                <?php 
    echo $form->error($model, 'lastname');
    ?>
开发者ID:hntvu,项目名称:db_for_site,代码行数:31,代码来源:_formUpdate.php


注:本文中的CHtml::passwordField方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。