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


PHP CHtml::activeLabel方法代码示例

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


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

示例1: rowStart

 private static function rowStart(CModel $model, $ngFieldName)
 {
     echo '<div class="control-group">';
     if ($ngFieldName != "") {
         CHtml::activeLabel($ngFieldName, $model);
     }
     echo '<div class="controls">';
 }
开发者ID:Rustam44,项目名称:ASUPortalPHP,代码行数:8,代码来源:NgHtml.class.php

示例2: checkBox

 /**
  * Renders a checkbox.
  * @return string the rendered content
  */
 protected function checkBox()
 {
     $attribute = $this->attribute;
     echo '<label class="checkbox" for="' . $this->getAttributeId($attribute) . '">';
     echo $this->form->checkBox($this->model, $this->attribute, $this->htmlOptions) . PHP_EOL;
     $attr = CHtml::resolveName($this->model, $attribute);
     // strip off square brackets if any
     echo CHtml::activeLabel($this->model, $attribute);
     echo $this->getError() . $this->getHint();
     echo '</label>';
 }
开发者ID:niranjan2m,项目名称:Voyanga,代码行数:15,代码来源:BootInputVertical.php

示例3: renderLabel

 /**
  * Renders the label for this input.
  * The default implementation returns the result of {@link CHtml activeLabelEx}.
  * @return string the rendering result
  */
 public function renderLabel()
 {
     $options = array('label' => $this->getLabel(), 'required' => $this->getRequired(), 'class' => 'control-label');
     if ($this->parent->layout == 'horizontal') {
         $options['class'] .= ' col-sm-3';
     }
     if (!empty($this->attributes['id'])) {
         $options['for'] = $this->attributes['id'];
     }
     return CHtml::activeLabel($this->getParent()->getModel(), $this->name, $options);
 }
开发者ID:hung5s,项目名称:yap,代码行数:16,代码来源:XBootstrapInputElement.php

示例4: renderLabel

 public function renderLabel()
 {
     $options = array('label' => $this->getLabel(), 'class' => 'control-label');
     if ($this->getRequired()) {
         $options['class'] .= ' required';
     }
     //Agrego la clase required al label
     if (!empty($this->attributes['id'])) {
         $options['for'] = $this->attributes['id'];
     }
     return CHtml::activeLabel($this->getParent()->getModel(), $this->name, $options);
 }
开发者ID:Telemedellin,项目名称:tm,代码行数:12,代码来源:CustomFormInputElement.php

示例5: renderInputs

 public function renderInputs()
 {
     $this->attributes = array('oauthAccessToken' => null, 'oauthAccessTokenSecret' => null, 'consumerKey' => null, 'consumerSecret' => null);
     echo CHtml::activeLabel($this, 'consumerKey');
     $this->renderInput('consumerKey');
     echo CHtml::activeLabel($this, 'consumerSecret');
     $this->renderInput('consumerSecret');
     echo CHtml::activeLabel($this, 'oauthAccessToken');
     $this->renderInput('oauthAccessToken');
     echo CHtml::activeLabel($this, 'oauthAccessTokenSecret');
     $this->renderInput('oauthAccessTokenSecret');
     echo CHtml::errorSummary($this);
 }
开发者ID:keyeMyria,项目名称:CRM,代码行数:13,代码来源:TwitterApp.php

示例6: run

 public function run()
 {
     $attr = $this->attribute;
     if (!$this->model->{$attr} instanceof JSONEmbeddedModel) {
         $this->model->instantiateField($attr);
     }
     echo '<br />';
     echo '<br />';
     echo CHtml::activeLabel($this->model, $attr);
     echo '<hr />';
     $this->model->{$attr}->renderInputs();
     echo '<br />';
     echo '<br />';
 }
开发者ID:keyeMyria,项目名称:CRM,代码行数:14,代码来源:EmbeddedModelForm.php

示例7: renderInputs

 public function renderInputs()
 {
     $this->password = null;
     echo CHtml::activeLabel($this, 'senderName');
     $this->renderInput('senderName');
     echo CHtml::activeLabel($this, 'email');
     $this->renderInput('email');
     echo CHtml::activeLabel($this, 'user');
     $this->renderInput('user');
     echo CHtml::activeLabel($this, 'password');
     $this->renderInput('password');
     echo '<br/>';
     echo CHtml::errorSummary($this);
 }
开发者ID:dsyman2,项目名称:X2CRM,代码行数:14,代码来源:MandrillAccount.php

示例8: label

 /**
  * Renders an HTML label for a model attribute.
  * This method is a wrapper of {@link CHtml::activeLabel}.
  * Please check {@link CHtml::activeLabel} for detailed information
  * about the parameters for this method.
  * @param CModel $model the data model
  * @param string $attribute the attribute
  * @param array $htmlOptions additional HTML attributes.
  * @return string the generated label tag
  */
 public function label($model, $attribute, $htmlOptions = array())
 {
     return CHtml::activeLabel($model, $attribute, $htmlOptions);
 }
开发者ID:alsvader,项目名称:hackbanero,代码行数:14,代码来源:CActiveForm.php

示例9: array

				<?php 
echo CHtml::activeTextField($form, 'sms_message', array('style' => 'width: 130px;'));
?>
				<?php 
echo CHtml::error($form, 'sms_message');
?>
			</td>

		</tr>
		<tr>
			<th><?php 
echo CHtml::activeLabel($form, 'lat');
?>
:</th>
			<th><?php 
echo CHtml::activeLabel($form, 'lng');
?>
:</th>
		</tr>    
		<tr>
			<td><?php 
echo CHtml::activeTextField($form, 'lat', array('style' => 'width: 130px;'));
echo CHtml::error($form, 'lat');
?>
</td>
			<td><?php 
echo CHtml::activeTextField($form, 'lng', array('style' => 'width: 130px;'));
echo CHtml::error($form, 'lng');
?>
</td>
		</tr>    
开发者ID:anton-itscript,项目名称:WM,代码行数:31,代码来源:station_save.php

示例10:

					<?php 
echo CHtml::errorSummary($model);
?>
					<fieldset class="top">
						<div class="row clearfix">
							<?php 
echo CHtml::activeLabel($model, 'course_code');
?>
							<?php 
echo CHtml::activeTextField($model, 'course_code');
?>
						</div>

						<div class="row clearfix">
							<?php 
echo CHtml::activeLabel($model, 'user_id');
?>
							<?php 
echo CHtml::activeTextField($model, 'user_id');
?>
						</div>
					</fieldset>
					<fieldset class="buttons bottom">
						<?php 
echo CHtml::submitButton('Assign');
?>
					</fieldset>
				<?php 
echo CHtml::endForm();
?>
			</div>
开发者ID:jayrulez,项目名称:kcconline,代码行数:31,代码来源:assignInstructor.php

示例11: array

    <?php 
echo CHtml::endForm();
?>
    <h1>Import settings</h1>


    <?php 
echo CHtml::beginForm($this->createUrl('superadmin/exportadminssettings'), 'post', array('id' => 'formimportadminssettings', 'enctype' => 'multipart/form-data'));
?>
    <?php 
echo CHtml::hiddenField('type', 'import');
?>
    <table class="">
        <tr>
            <th><?php 
echo CHtml::activeLabel($importAdminsSettings, 'imported_file');
?>
:</th>
            <td><?php 
echo CHtml::activeFileField($importAdminsSettings, 'imported_file');
?>
</td>
        </tr>
    </table>
    <br/><br/>
    <?php 
echo CHtml::submitButton('Import');
?>
    <?php 
echo CHtml::endForm();
?>
开发者ID:anton-itscript,项目名称:WM-Web,代码行数:31,代码来源:exportadminssettings.php

示例12: array_slice

                <?php 
    echo CHtml::activeDropDownList($user, 'role', array_slice(Yii::app()->params['user_role'], 0), array('style' => 'width: 270px;'));
    ?>
            </td>
        </tr>

        <tr>
            <th><?php 
    echo CHtml::activeLabel($user, 'access');
    ?>
</th>
            <td>
                <div>
                    <input type="checkbox" id="check_all_features" onclick="//$('div.checkBoxList input').attr('checked', ($(this).attr('checked') == 'checked' ? true : false));"/>
                    <?php 
    echo CHtml::activeLabel($user, 'allAccess');
    ?>
                </div>
                <?php 
    if (is_array($actions)) {
        foreach ($actions as $value) {
            ?>
                        <div class="checkBoxList">
                            <input type="checkbox" name="access[]" value="<?php 
            echo $value['id'];
            ?>
" <?php 
            echo in_array($value['id'], $access) ? 'checked' : '';
            ?>
/>
                            <?php 
开发者ID:anton-itscript,项目名称:WM,代码行数:31,代码来源:user.php

示例13: array

?>
    <div class="alert alert-warning span12" id="msjError" style="">Atención: Hay un examen en esa fecha de otra materia
        del plan.
    </div>
    <p class="note">
        Campos obligatorios <span class="required">*</span>
    </p>
    <?php 
echo $form->errorSummary($model, '', null, array('class' => 'alert alert-error'));
?>
    <div class="control-group">
        <div class="span10">
            <div class="row">
                <?php 
if (Yii::app()->user->isAdmin()) {
    echo CHtml::activeLabel($model, $model->materia->nombreMateria, array('class' => 'lead'));
    echo $form->hiddenField($model, 'materia_id');
}
?>
            </div>
            <div id="left-content">
                <div class="row">
                    <?php 
echo $form->labelEx($model, 'fechaExamen');
?>
                    <?php 
$this->widget('zii.widgets.jui.CJuiDatePicker', array('model' => $model, 'attribute' => 'fechaExamen', 'language' => 'es', 'themeUrl' => Yii::app()->baseUrl . '/css/jquery-ui-themes/themes', 'theme' => 'bootstrap', 'flat' => true, 'options' => array('onSelect' => 'js: test', 'dateFormat' => 'dd-mm-yy', 'showOtherMonths' => true, 'selectOtherMonths' => true, 'changeYear' => true, 'changeMonth' => true, 'showButtonPanel' => true, 'yearRange' => '2013:2099'), 'htmlOptions' => array('size' => '7', 'readonly' => "readonly", 'maxlength' => '10')));
?>
                    <?php 
echo $form->error($model, 'fechaExamen');
?>
开发者ID:AndressJose,项目名称:sistema-examenes,代码行数:31,代码来源:_formUpdate.php

示例14: array

					<div class="large-4 column">
						<?php 
echo CHtml::activeLabel($model, 'username', array('label' => 'Username:', 'class' => 'align'));
?>
					</div>
					<div class="large-8 column">
						<?php 
echo $form->textField($model, 'username', array('autocomplete' => Yii::app()->params['html_autocomplete'], 'placeholder' => 'Enter username...', 'class' => 'large'));
?>
					</div>
				</div>

				<div class="row field-row">
					<div class="large-4 column">
						<?php 
echo CHtml::activeLabel($model, 'password', array('label' => 'Password:', 'class' => 'align'));
?>
					</div>
					<div class="large-8 column">
						<?php 
echo $form->passwordField($model, 'password', array('autocomplete' => 'off', 'placeholder' => 'Enter password...', 'class' => 'large'));
?>
					</div>
				</div>

				<div class="row field-row text-right">
					<div class="large-12 column">

						<img class="loader" src="<?php 
echo Yii::app()->assetManager->createUrl('img/ajax-loader.gif');
?>
开发者ID:code-4-england,项目名称:OpenEyes,代码行数:31,代码来源:login.php

示例15: array

                    </tr>
                    <tr>
                        <td> <?php 
echo CHtml::activeTextField($model, 'subject');
?>
</td>

                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                    </tr>
                    <tr>
                        <td><?php 
echo CHtml::activeLabel($model, 'body');
?>
</td>

                    </tr>

                    <tr>
                        <td COLSPAN=2><?php 
echo CHtml::activeTextArea($model, 'body', array('rows' => 5, 'cols' => 35));
?>
</td>

                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
开发者ID:laiello,项目名称:flexiblearning,代码行数:30,代码来源:contact.php


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