當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。