Ejemplo n.º 1
0
            <div class="form-group<?php echo $form->hasErrorClass($UserProfile, 'WorkPhone'); ?>">
                <?php echo $form->labelEx($UserProfile, 'WorkPhone'); ?>
                <?php echo $form->textField($UserProfile,'WorkPhone', array('class'=>'form-control','maxlength'=>17)); ?>
                <?php echo $form->error($UserProfile, 'WorkPhone'); ?>
            </div>

            <div class="form-group<?php echo $form->hasErrorClass($UserLogin, 'LoginEmail'); ?>">
                <?php echo $form->labelEx($UserLogin, 'LoginEmail'); ?>
                <?php echo $form->textField($UserLogin,'LoginEmail', array('class'=>'form-control')); ?>
                <?php echo $form->error($UserLogin, 'LoginEmail'); ?>
            </div>
        </div>

        <div class="form-buttons well">
            <?php echo BetterCHtml::makeButton('<i class="fa fa-save"></i> Save',array('class'=>'btn btn-primary')); ?>
            <a href="<?php echo Yii::app()->createUrl('/user/profile-password-update'); ?>" class="btn btn-default"><i class="fa fa-pencil"></i> Create New Password</a>
        </div>
    </div>

    <?php $this->endWidget(); ?>
</div>

<script>
    jQuery(document).ready(function() {
        App.init();

        $('#UserProfile_WorkPhone').inputmask('mask', {
            mask: '(99) 999-999-9999'
        }); //specifying fn & options
    });
Ejemplo n.º 2
0
 /**
  * Returns label text for a model attribute
  *
  * @param CActiveRecord $model Model attribute belongs to
  * @param string $attribute Name of attribute
  * @return string Attribute label
  */
 public function labelText($model, $attribute)
 {
     return BetterCHtml::activeLabelText($model, $attribute);
 }