Exemplo n.º 1
0
 /**
  * @param $attribute
  * @param null $value
  * @param null $name
  * @param array $htmlOptions
  * @return mixed|null|string
  */
 public static function renderField($attribute, $value = null, $name = null, $htmlOptions = [])
 {
     $name = $name ?: 'Attribute[' . $attribute->id . ']';
     switch ($attribute->type) {
         case Attribute::TYPE_SHORT_TEXT:
             return CHtml::textField($name, $value, $htmlOptions);
             break;
         case Attribute::TYPE_TEXT:
             return Yii::app()->getController()->widget(Yii::app()->getModule('store')->getVisualEditor(), ['name' => $name, 'value' => $value], true);
             break;
         case Attribute::TYPE_DROPDOWN:
             $data = CHtml::listData($attribute->options, 'id', 'value');
             return CHtml::dropDownList($name, $value, $data, array_merge($htmlOptions, ['empty' => '---']));
             break;
         case Attribute::TYPE_CHECKBOX_LIST:
             $data = CHtml::listData($attribute->options, 'id', 'value');
             return CHtml::checkBoxList($name . '[]', $value, $data, $htmlOptions);
             break;
         case Attribute::TYPE_CHECKBOX:
             return CHtml::checkBox($name, $value, CMap::mergeArray(['uncheckValue' => 0], $htmlOptions));
             break;
         case Attribute::TYPE_NUMBER:
             return CHtml::numberField($name, $value, $htmlOptions);
             break;
         case Attribute::TYPE_FILE:
             return CHtml::fileField($name . '[name]', null, $htmlOptions);
             break;
     }
     return null;
 }
Exemplo n.º 2
0
	public function checkBoxList($model, $attribute)
	{
		if ($model !== null) {
			return CHtml::activeCheckBoxList($model, $attribute, $this->all);
		} else 	
			return CHtml::checkBoxList($attribute, '', $this->all);
			
	}
 public function listing($model, $listModel, $relational, $type = 'checkbox')
 {
     self::startWidget(Ucfirst($listModel));
     echo " <div style='max-height:300px;overflow:auto;border:1px solid #ddd;padding:10px;'>";
     $cat = CHtml::listData($listModel::model()->findAll(array("order" => "name ASC")), 'term_id', 'name');
     $selected_keys = array_keys(CHtml::listData($model->{$relational}, 'term_id', 'term_id'));
     if ($type == 'checkbox') {
         $selected_keys = isset($_POST[$relational]) ? $_POST[$relational] : $selected_keys;
         echo CHtml::checkBoxList($relational, $selected_keys, $cat, array('separator' => '', 'template' => '<label class="' . $type . '"> {input}{label} </label>'));
     } else {
         $radioSelect = isset($_POST[$relational]) ? $_POST[$relational] : '';
         foreach ($selected_keys as $key) {
             $radioSelect = $key;
         }
         echo CHtml::radioButtonList($relational, $radioSelect, $cat, array('separator' => '', 'template' => '<label class="' . $type . '"> {input}{label} </label>'));
     }
     echo "  </div>";
     self::endWidget();
 }
Exemplo n.º 4
0
                <label for='company_type'><?php 
    $clang->eT("Company Type* : ");
    ?>
</label>
            </td>
            <td>
                <?php 
    $test = explode(',', $mrw['company_type_id']);
    $test1 = explode(',', $mrw['company_type']);
    $t = array_combine($test, $test1);
    foreach ($t as $key => $val) {
        $testkey[] = $key . '__' . $val;
    }
    $ctype = Company_type::model()->findAll(array('select' => 'concat(company_type_id,"__", company_type) as company_type_id , company_type_name', 'condition' => "Istitle = '1'"));
    $ctypelist = CHtml::listData($ctype, 'company_type_id', 'company_type_name');
    echo CHtml::checkBoxList('company_type', $testkey, $ctypelist, array('onChange' => 'javascript:hideshow(this.value,this.id)', 'required' => true));
    ?>
            </td>
        </tr>
        <tr>
            <td align="right" style="text-align: right; display: none">
                <label for='IsListProvider'><?php 
    $clang->eT("IsListProvider : ");
    ?>
</label>
            </td>
            <td style="display: none">
                <?php 
    echo CHtml::radioButtonList('IsListProvider', $mrw['is_list_provider'], array('1' => 'Yes', '0' => 'No'), array('separator' => ' '));
    ?>
            </td>
Exemplo n.º 5
0
Arquivo: view.php Projeto: uldisn/ace
    }
}
$body = CHtml::checkBoxList('user_sys_ccmp_id', $aChecked, $list, array('labelOptions' => array('style' => 'display: inline'), 'template' => '{input}<span class="lbl"></span> {label}', 'class' => 'ace'));
$this->widget('AceBox', array('header_text' => UserModule::t('Sys companies'), 'body' => $body));
/**
 * IP Tables
 */
$security_policy = Yii::app()->getModule('user')->SecurityPolicy;
if ($security_policy['useIpTables']) {
    $aChecked = UxipUserXIpTable::model()->getUserIpTables($model->id);
    $Iptb_list = IptbIpTable::model()->findAll();
    $list = array();
    foreach ($Iptb_list as $Iptb) {
        $list[$Iptb['iptb_id']] = Yii::t('roles', $Iptb['iptb_name']);
    }
    $body = CHtml::checkBoxList('ip_tables', $aChecked, $list, array('labelOptions' => array('style' => 'display: inline'), 'template' => '{input}<span class="lbl"></span> {label}', 'class' => 'ace'));
    $this->widget('AceBox', array('header_text' => UserModule::t('IP Tables'), 'body' => $body));
}
?>
    

        <div class="btn-toolbar pull-left">
            <div class="btn-group">

                <?php 
$this->widget("bootstrap.widgets.TbButton", array("label" => UserModule::t("Save"), "icon" => "icon-thumbs-up icon-white", "size" => "large", "type" => "primary", "htmlOptions" => array("onclick" => "\$('#user-rolls').submit();"), "visible" => Yii::app()->user->checkAccess("UserAdmin")));
?>

            </div>
        </div>
Exemplo n.º 6
0
 public function getPropCheckBoxListValues($label = '', $selected = '', $class = '', $type = 'props', $child_type = '')
 {
     $cri = new CDbCriteria(array('condition' => 'prop_id =' . $this->prop_id, 'order' => 'sort_order asc, value_id asc'));
     $PropValues = PropValue::model()->findAll($cri);
     $list = CHtml::listData($PropValues, 'value_id', 'value_name');
     foreach ($list as $k => $v) {
         $data[$this->prop_id . ':' . $k] = $v;
     }
     echo '<ul class="sku-list">';
     if ($child_type) {
         echo CHtml::checkBoxList('Item[' . $type . '][' . $child_type . '][' . $this->prop_id . ']', $selected, $data, array('template' => '<label class="checkbox inline">{input}{label}</label>', 'label' => $label, 'separator' => '', 'class' => $class, 'labelOptions' => array('class' => 'labelForRadio')));
     } else {
         echo CHtml::checkBoxList('Item[' . $type . '][' . $this->prop_id . ']', $selected, $data, array('template' => '<label class="checkbox inline">{input}{label}</label>', 'label' => $label, 'separator' => '', 'class' => $class, 'labelOptions' => array('class' => 'labelForRadio')));
     }
     echo '</ul>';
 }
Exemplo n.º 7
0
<?php

$data = array();
foreach ($this->roles as $role) {
    $data[$role->name] = $role->description;
}
$selected = array();
foreach ($this->currentRoles as $role) {
    $selected[] = $role;
}
echo CHtml::checkBoxList('roles', $selected, $data);
Exemplo n.º 8
0
$this->pageTitle = 'Vendor Care';
$form = $this->beginWidget('AdminForm', array('action' => $this->createUrl('vendorCare'), 'id' => 'vendor-care-filter-form', 'method' => 'get'));
$activeBranches = CHtml::listData(Branch::model()->active()->findAll(), 'bra_id', 'bra_title');
?>
<fieldset>
	<div class="block-header">Search</div>
	<div class="content">
		<div class="control-group">
			<label class="control-label">
				Branch
				<input type="checkbox" id="branch-trigger" checked="checked">
			</label>

			<div class="controls">
				<?php 
echo CHtml::checkBoxList('Deal[dea_branch]', isset($_GET['Deal']['dea_branch']) ? $_GET['Deal']['dea_branch'] : array_keys($activeBranches), $activeBranches, ['class' => 'branch-checkbox deal_branch', 'separator' => ' ']);
?>
			</div>
			<div class="block-buttons force-margin">
				<?php 
echo CHtml::submitButton('Search', ['class' => 'btn']);
?>
			</div>
		</div>


	</div>
</fieldset>
<?php 
$this->endWidget();
$this->widget('AdminGridView', array('title' => 'Vendor Care - Viewings', 'id' => 'vendor-care-list', 'dataProvider' => $dataProvider, 'afterAjaxUpdate' => 'reinstallDatePicker', 'columns' => array(array('name' => 'propertyAddress', 'header' => "Property", 'value' => function ($data) {
Exemplo n.º 9
0
echo $form->textArea($model, 'company_description', array('class' => 'txtarea'));
?>
	</li>
	<li class="error_message"><?php 
echo $form->error($model, 'company_description');
?>
</li>
</ul>
</fieldset>
<fieldset><legend>Deals In</legend>
<ul>
	<li><span><label for="Property_description" class="required">Specialization <span class="required">*</span></label></span>
		<div class="multi_checkbox avg">
			<?php 
$specialists = isset($_POST['specialist_type_id']) ? $_POST['specialist_type_id'] : null;
echo CHtml::checkBoxList('specialist_type_id', $specialists, CHtml::listData(Specializations::model()->findAll(), 'id', 'specialist'));
?>
		</div>
	</li>
	<li class="error_message"><?php 
echo $form->error($specialistType, 'specialist_type_id');
?>
</li>
</ul>
<?php 
if (isset($_POST['city_id'])) {
    $i = 0;
    $data = 'City';
    foreach ($_POST['city_id'] as $i => $location) {
        if ($i > 0) {
            $data = '&nbsp';
Exemplo n.º 10
0
        <tr>
            <td align="right" style="display: none;">
                <label for='contact_type'><?php 
    $clang->eT("Contact Type* : ");
    ?>
</label>
            </td>
            <td style="display: none;">
                <?php 
    $sql = "SELECT CONCAT(ctm.company_type_id,'__', ctm.company_type) AS company_type_id , company_type_name\n                    FROM {{map_company_n_types}} mct \n                    LEFT JOIN {{company_type_master}} ctm ON ctm.company_type_id = mct.company_type_id\n                    WHERE company_id =" . $mrw['company_id'] . "";
    $uresult = Yii::app()->db->createCommand($sql)->query()->readAll();
    $ctypelist = CHtml::listData($uresult, 'company_type_id', 'company_type_name');
    foreach ($ctypelist as $key => $value) {
        $test[] = $key;
    }
    echo CHtml::checkBoxList('company_type', $test, $ctypelist, array('required' => true));
    ?>
            </td>
            <td align="right" style="text-align: right;">
                <?php 
    $ctypes = Company_type::model()->findAll(array('select' => 'concat(company_type_id,"__", company_type) as company_type_id , company_type_name', 'condition' => "company_type != 'O' AND IsTitle = '1'"));
    $ctypeslist = CHtml::listData($ctypes, 'company_type_id', 'company_type_name');
    foreach ($ctypelist as $key => $value) {
        echo "<label id='titlelabel_" . $key . "'>Contact Title for " . $value . "* : </label>";
        echo '<br/>';
    }
    ?>
            </td>
            <td>
                <?php 
    $titleselected = explode(',', $mrw['contact_title_id']);
Exemplo n.º 11
0
        <?php 
echo CHtml::htmlButton('篩選條件', array('class' => 'search-button'));
?>
      </td>
</tr>
    
     </table>

     



<div class="search-form" style="display:none">
<?php 
if (isset($serviceary)) {
    echo CHtml::checkBoxList('qry_serviceno', $qry_serviceno, $serviceary, array('checkAll' => '全選', 'separator' => ' ', 'template' => '<div>{input}&nbsp;{label}</div>'));
}
?>
</div><!-- search-form -->    

<?php 
echo CHtml::endForm();
?>
</div><!-- form -->
</div>
<div class="tableBlue">
    <table >
        <tr>
            <?php 
for ($i = 0; $i < count($col); $i++) {
    ?>
Exemplo n.º 12
0
    public function run()
    {
        $page = $this->page;
        $form = $this->form;
        foreach ($this->fields as $field) {
            switch ($field) {
                case 'title':
                    ?>
                    <div class="row">
                        <?php 
                    echo $form->labelEx($page, 'title');
                    ?>
                        <?php 
                    echo $form->textField($page, 'title', array('size' => 60, 'maxlength' => 255));
                    ?>
                        <?php 
                    echo $form->error($page, 'title');
                    ?>
                    </div>
                    <?php 
                    break;
                case 'slug':
                    if (!Settings::get('SEO', 'slugs_enabled')) {
                        break;
                    }
                    $baseUrl = Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('application.modules.page.assets'));
                    Yii::app()->getClientScript()->registerScriptFile($baseUrl . '/slug.js');
                    if ($this->scenario == 'insert') {
                        Yii::app()->getClientScript()->registerScriptFile($baseUrl . '/create_slug.js');
                    }
                    ?>
                    <div class="row sticky">
                        <span id="slug_label" style="display:inline;"><strong><?php 
                    echo Yii::t('app', 'Link:');
                    ?>
</strong>
                            <?php 
                    echo 'http://' . $_SERVER['HTTP_HOST'] . Yii::app()->baseUrl . '/';
                    ?>
</span><span id="slug_holder" style="display:inline">
                            <?php 
                    $slug = isset($page->slug->slug) ? $page->slug->slug : '';
                    echo $slug;
                    ?>
                        </span>
                        <?php 
                    echo CHtml::textField("Page[slug]", $slug, array('size' => 65, 'style' => 'display:none;'));
                    ?>
                    </div>
                    <?php 
                    break;
                case 'content':
                    ?>
                    <div class="row">
                        <?php 
                    echo $form->labelEx($page, 'content');
                    ?>
                        <?php 
                    $this->widget('ext.redactor.ERedactorWidget', array("model" => $page, "attribute" => "content", 'options' => array('imageUpload' => Yii::app()->createAbsoluteUrl('/file/redactorUpload'))));
                    ?>
                        <?php 
                    echo $form->error($page, 'content');
                    ?>
                    </div>
                    <?php 
                    break;
                case 'user':
                    if (Yii::app()->getModule('user')->isAdmin()) {
                        if (!isset($page->user)) {
                            $page->user = Yii::app()->user->id;
                        }
                        ?>
                        <div class="row">
                            <?php 
                        echo $form->labelEx($page, 'user_id');
                        ?>
                            <?php 
                        echo $form->dropDownList($page, 'user', CHtml::listData(User::model()->findAll(), 'id', 'username'), array('prompt' => 'None'));
                        ?>
                            <?php 
                        echo $form->error($page, 'user_id');
                        ?>
                        </div>
                        <?php 
                    }
                    break;
                case 'status':
                    ?>
                    <div class="row">
                        <?php 
                    echo $form->labelEx($page, 'status');
                    ?>
                        <?php 
                    echo CHtml::activeDropDownList($page, 'status', array('published' => Yii::t('app', 'Published'), 'trashed' => Yii::t('app', 'Trashed'), 'draft' => Yii::t('app', 'Draft')));
                    ?>
                        <?php 
                    echo $form->error($page, 'status');
                    ?>
                    </div>
                    <?php 
                    break;
                case 'parent':
                    ?>
                    <div class="row">
                        <?php 
                    echo $form->labelEx($page, 'parent_id');
                    ?>
                        <?php 
                    $allModels = Page::findByType(get_class($this->model));
                    foreach ($allModels as $key => $aModel) {
                        if ($aModel->id == $page->id) {
                            unset($allModels[$key]);
                        }
                    }
                    echo $form->dropDownList($page, 'parent', CHtml::listData($allModels, 'id', 'title'), array('prompt' => 'None'));
                    ?>
                        <?php 
                    echo $form->error($page, 'parent_id');
                    ?>
                    </div>
                    <?php 
                    break;
                case 'categories':
                    if (Yii::app()->hasModule('category')) {
                        ?>
                        <div class="row nm_row">
                            <label for="categories"><?php 
                        echo Yii::t('app', 'Categories');
                        ?>
</label>
                            <?php 
                        echo CHtml::checkBoxList('Page[categories]', array_map('Awecms::getPrimaryKey', $page->categories), CHtml::listData(Category::model()->findAll(), 'id', 'name'), array('attributeitem' => 'id', 'checkAll' => 'Select All'));
                        ?>
                        </div>
                        <?php 
                    }
                    break;
                case 'tags':
                    ?>
                    <div class="row">
                        <?php 
                    if (Yii::app()->hasModule('tag')) {
                        Yii::app()->getController()->widget('TagWidget', array('model' => $page));
                    }
                    ?>
                    </div>
                    <?php 
                    break;
                case 'comment_status':
                    ?>
                    <div class="row">
                        <?php 
                    echo $form->labelEx($page, 'Comments');
                    ?>
                        <?php 
                    echo $form->dropDownList($page, 'comment_status', array('enabled' => 'Enabled', 'disabled' => 'Disabled'));
                    ?>
                        <?php 
                    echo $form->error($page, 'comment_status');
                    ?>
                    </div>
                    <?php 
                    break;
                default:
                    break;
            }
        }
    }
Exemplo n.º 13
0
					<?php 
echo $form->error($model, 'logo_bg');
?>
				</div>
			</div>	
			<div class="clear"></div>
		</div>
		<div class="row">
			<div class="label">
				<?php 
echo $form->labelEx($model, 'categories_id');
?>
			</div>
			<div class="field checkbox_list">
				<?php 
echo CHtml::checkBoxList('Categories[]', explode(',', $model->categories_id), Brands::model()->getCategoriesArray(), array('separator' => ' ', 'template' => '<span class="item">{input} {label}</span>'));
?>
				<?php 
echo $form->error($model, 'categories_id');
?>
			</div>		
		</div>	
		<div class="row">
			<div class="label">
				<?php 
echo $form->labelEx($model, 'text');
?>
			</div>
			<div class="field">
				<?php 
$this->widget('application.extensions.tinymce.ETinyMce', array('name' => get_class($model) . '[text]', 'value' => $model->getAttribute('text'), 'height' => '300px'));
Exemplo n.º 14
0
$city = 'любой город';
$city_data = array('-1' => $city);
?>
              			<td align="left" valign="center" class="value">
<?php 
echo CHtml::dropDownList('country_id', $country_id, $countries, array('class' => 'country_id', 'for' => '#city_id', 'fcselect' => "width:'411px'"));
?>
              			</td>
              		</tr>
              		<tr>
              			<td align="right" valign="center" class="label">
              				Города:
              			</td>
              			<td align="left" valign="center" class="value">
<?php 
echo CHtml::checkBoxList('city', '', $city_data, array('container' => 'span class="checkBoxList" id="city_id"  fcselect="width:\'411px\'"'));
?>
              			</td>
              		</tr>
              		<tr>
              			<td align="right" valign="center" class="label">
              				&nbsp;
              			</td>
              			<td align="left" valign="center" class="hint">
                            Вы можете выбрать несколько городов
              			</td>
              		</tr>
              		<tr>
              			<td align="right" valign="center" class="label">
              			</td>
              			<td align="left" valign="center" class="header">
Exemplo n.º 15
0
				<?php 
if ($model->isNewRecord) {
    ?>
				<?php 
    echo $form->textFieldControlGroup($model, 'password', array('maxlength' => 255));
    ?>
				<?php 
}
?>
			</div>

			<div id="groups" class="tab-pane">
				<div class="form-group">
					<div class="col-lg-12">
					<?php 
echo CHtml::checkBoxList('UserGroups', CHtml::listData($userGroups, 'name', 'name'), CHtml::listData($groups, 'name', 'name'));
?>
					</div>
				</div>
			</div>
		</div>
	</div>

	<div id="sidebar" class="col-lg-3">
		<?php 
$this->beginWidget('bootstrap.widgets.BsPanel', array('title' => 'Menu', 'contentCssClass' => '', 'htmlOptions' => array('class' => 'panel sticky'), 'type' => BsHtml::PANEL_TYPE_PRIMARY));
?>
		
		<div class="btn-group btn-group-vertical">
			<?php 
echo BsHtml::submitButton(BsHtml::icon(BsHtml::GLYPHICON_THUMBS_UP) . ' Save');
Exemplo n.º 16
0
echo $form->labelEx($model, 'enabled');
?>
        <?php 
echo $form->checkBox($model, 'enabled');
?>
        <?php 
echo $form->error($model, 'enabled');
?>
    </div><!-- row -->

    <div class="row">
        <?php 
echo $form->labelEx($model, 'role');
?>
        <?php 
echo CHtml::checkBoxList(get_class($model) . '[role]', explode(',', $model->role), $model->roles, array('selected' => 'all'));
?>
        <?php 
echo $form->error($model, 'role');
?>
    </div><!-- row -->


    <div class="row">
        <?php 
echo $form->labelEx($model, 'Open in new tab?');
?>
        <?php 
echo CHtml::checkBox('MenuItem[target]', $model->target == '_blank', array('value' => '_blank'));
?>
        <?php 
Exemplo n.º 17
0
<?php

Yii::app()->clientScript->registerScript('searchView', "\n\$('#select-all').click(function(event) {   \n    if(this.checked) {\n        // Iterate each checkbox\n        \$(':checkbox').each(function() {\n            this.checked = true;                        \n        });\n    } else {\n        \$(':checkbox').each(function() {\n            this.checked = false;                        \n        });\n    }\n})\n");
Yii::app()->clientScript->registerCss('checkBoxListColumn', "\n    #filter input {\n    float: left;\n    margin-right: 10px;\n}\n.checkboxgroup{\n    overflow:auto;\n}\n.checkboxgroup div{\n    width:420px;\n    float:left;\n} \n");
?>

<h1> Colonnes à exporter </h1>
<br>

<?php 
$form = $this->beginWidget('CActiveForm', array('action' => Yii::app()->createUrl($this->route)));
?>
<label><input type="checkbox" name="select-all" id="select-all" />Sélectionner tout</label>
<div class="checkboxgroup"> 
    <?php 
$fiches = Answer::model()->getNomsFichesByFilter($models);
foreach ($fiches as $key => $value) {
    echo "<h3>Fiche " . $value . "</h3>";
    echo CHtml::checkBoxList('filter', 'addFilter', Answer::model()->getAllQuestionsByFilterName($models, $value), array('labelOptions' => array('style' => 'display:inline'), 'separator' => '', 'template' => '<div>{input}&nbsp;{label}</div><br>'));
}
?>
</div><br>
<?php 
echo CHtml::submitButton('Exporter', array('name' => 'exporter', 'class' => 'btn btn-default'));
$this->endWidget();
Exemplo n.º 18
0
 /**
  * @return string checkbox list
  */
 public static function checkBoxList($model)
 {
     $list = CHtml::checkBoxList(static::fieldName(), self::exists($model), static::all(), ['template' => '{beginLabel}{input} {labelTitle}{endLabel}', 'separator' => '']);
     return $list;
 }
Exemplo n.º 19
0
	</li>
	<li class="error_message"><?php 
echo $form->error($modelAmenities, 'amenity_id');
?>
</li>
</ul>

<ul>
	<li><span><label for="Property_description" class="required">External Amenities <span class="required">*</span></label></span>
		<?php 
//echo $form->dropdownList($propertyAmenities,'amenity_id[]',CHtml::listData(CategoryAmenities::model()->findAll(),'id','amenity'),array('size'=>'5','multiple'=>'multiple','id'=>'amenities-multi'))
?>
		<div class="multi_checkbox avg">
			<?php 
$amenities = isset($_POST['amenity_id']) ? $_POST['amenity_id'] : null;
echo CHtml::checkBoxList('amenity_id', $amenities, CHtml::listData(CategoryAmenities::model()->findAll('amenity_type=:amenityType', array(':amenityType' => '1')), 'id', 'amenity'));
?>
		</div>
	</li>
	<li class="error_message"><?php 
echo $form->error($modelAmenities, 'amenity_id');
?>
</li>
</ul>






Exemplo n.º 20
0
     break;
 case 5:
     $url = Yii::app()->request->baseUrl . "/index.php/step/excelComp/" . $issueId . "?" . "elementId=" . $element->id;
     //funciona
     echo "<div title='" . $element->getUserDate($issueId) . "'>";
     echo CHtml::radioButtonList("Result[elementid][{$element->id}]", $element->getResult($issueId), CHtml::listData($element->values, 'id', 'value'));
     echo "</br><div class='exceltools' style='display:none'><input class='Excel'  type='button' value='Excel Chart' onclick=location.href='" . $url . "';></div>";
     if ($element->getUserDate($issueId)) {
         echo "<br><p style='background-color:rgb(220,220,220);font-size:small; display:none; padding:4px; border-radius:3px;' class='info'>" . $element->getUserDate($issueId) . "</p>";
     }
     echo "</div>";
     break;
 case 6:
     $url = Yii::app()->request->baseUrl . "/index.php/step/excelComp/" . $issueId . "?" . "elementId=" . $element->id;
     //funciona
     echo CHtml::checkBoxList("Checks[elementid][{$element->id}]", $element->getResults($issueId), CHtml::listData($element->values, 'id', 'value'), array('labelOptions' => array('title' => $element->getUserForBox2($issueId))));
     echo "</br><div class='exceltools' style='display:none'><input class='Excel'  type='button' value='Excel Chart' onclick=location.href='" . $url . "';></div>";
     echo "<div>" . $element->getUserForBox($issueId) . "</div>";
     break;
 case 7:
     $url = Yii::app()->request->baseUrl . "/index.php/step/excelComp/" . $issueId . "?" . "elementId=" . $element->id;
     //funciona
     echo "<div title='" . $element->getUserDate($issueId) . "'>";
     echo CHtml::dropDownList("Result[elementid][{$element->id}]", $element->getResult($issueId), CHtml::listData($element->values, 'id', 'value'), array('empty' => ''));
     echo "</br><div class='exceltools' style='display:none'><input class='Excel'  type='button' value='Excel Chart' onclick=location.href='" . $url . "';></div>";
     if ($element->getUserDate($issueId)) {
         echo "<br><br><p style='background-color:rgb(220,220,220);font-size:small; display:none ; padding:4px; border-radius:3px;' class='info'>" . $element->getUserDate($issueId) . "</p>";
     }
     echo "</div>";
     break;
 case 3:
Exemplo n.º 21
0
    $mCcgr = $modelCcxg;
    //izlaizj sys group, ja nav admins
    if ($mCcgr->ccxg_ccgr_id == Yii::app()->params['ccgr_group_sys_company'] && !Yii::app()->user->checkAccess("Administrator")) {
        continue;
    }
    $aChecked[] = $mCcgr->ccxg_ccgr_id;
}
if (count($aChecked) == 1) {
    //kaut kads gljuks, nedrikst padot masivu ar vienu elementu
    $aChecked = $aChecked[0];
}
$criteria = new CDbCriteria();
if (!Yii::app()->user->checkAccess("Administrator")) {
    $criteria->addCondition("ccgr_id !=  " . Yii::app()->params['ccgr_group_sys_company']);
}
echo CHtml::checkBoxList('ccxg_ccgr_id', $aChecked, CHtml::listData(CcgrGroup::model()->findAll($criteria), 'ccgr_id', 'ccgr_name'));
?>
            <?php 
//echo $form->error($PxpModel, 'ppxt_id');
?>
        </div>
    <?php 
//  }
?>

    <div class="form-actions">
        
    <?php 
echo CHtml::resetButton(Yii::t('D2companyModule.crud_static', 'Reset'), array('class' => 'btn'));
echo ' ' . CHtml::submitButton(Yii::t('D2companyModule.crud_static', 'Save'), array('class' => 'btn btn-primary', 'name' => 'save_company_group'));
?>
Exemplo n.º 22
0
echo $form->textArea($model, 'company_description', array('class' => 'txtarea'));
?>
	</li>
	<li class="error_message"><?php 
echo $form->error($model, 'company_description');
?>
</li>
</ul>
</fieldset>
<fieldset><legend>Deals In</legend>
<ul>
	<li><span><label for="Property_description" class="required">Property Type <span class="required">*</span></label></span>
		<div class="multi_checkbox avg">
			<?php 
$propertytypes = isset($_POST['property_type_id']) ? $_POST['property_type_id'] : null;
echo CHtml::checkBoxList('property_type_id', $propertytypes, CHtml::listData(PropertyTypes::model()->findAll(), 'id', 'property_type'));
?>
		</div>
	</li>
	<li class="error_message"><?php 
echo $form->error($propertyType, 'property_type_id');
?>
</li>
</ul>
<?php 
if (isset($_POST['city_id'])) {
    $i = 0;
    $data = 'City';
    foreach ($_POST['city_id'] as $i => $location) {
        if ($i > 0) {
            $data = '&nbsp';
Exemplo n.º 23
0
<?php

$this->breadcrumbs = array(Yum::t('Users') => array('//user/user/admin'), Yum::t('Csv export'));
echo CHtml::beginForm(array('//user/csv/export'));
echo CHtml::checkBoxList('profile_fields', array(), $profile_fields, array('checkAll' => Yum::t('Select all')));
echo '<br />';
echo '<br />';
echo CHtml::submitButton(Yum::t('Start export'));
echo CHtml::endForm();
Exemplo n.º 24
0
<?php

echo CHtml::checkBoxList('roles', $this->assigned, $roles, array('container' => 'div'));
Exemplo n.º 25
0
	<li>
		<h3>Property Features</h3>	
		<div class="acc-section">
		<table width="92%" border="0" cellpadding="0" cellspacing="0" align="center">
		<tr>
			<td><label>Type of Ownership</label> <?php 
echo $form->dropdownList($modelProject, 'ownership_type_id', CHtml::listData(CategoryOwnershipTypes::model()->findAll(), 'id', 'ownership_type'), array('empty' => 'All'));
?>
			</td>
		</tr>
		<tr>
			<td><label>Amenities</label><br />
				<div class="multi_checkbox med">
				<?php 
$property_type_id = isset($_POST['property_type_id']) ? $_POST['property_type_id'] : null;
echo CHtml::checkBoxList('amenity_id', $amenities, CHtml::listData(CategoryAmenities::model()->findAll(), 'id', 'amenity'), array('size' => '5', 'multiple' => 'multiple', 'id' => 'project-amenities-multi'));
?>
				</div>
			</td>
		</tr>
	</table>
	</div>
	</li>
	<li>
	<h3>Others</h3>
	<div class="acc-section">
	<table align="center" width="94%">
		<tr>
			<td>Posted by
			<table width="92%" border="0">
				<tr>
Exemplo n.º 26
0
            echo Yii::t('Batch', 'Admission Number');
            ?>
</td>
                    
                    </tr>
                        
						
						<tr><td colspan="3" width="10%">
                                       
                                        
										
										<?php 
            $posts1 = CHtml::listData($posts, 'id', 'Fullname');
            ?>
										<?php 
            echo CHtml::checkBoxList('sid', '', $posts1, array('id' => '1', 'template' => '{input}{label}</tr><tr><td width="10%">', 'checkAll' => 'All'));
            ?>
                                        
                                        </td>
                                        <td colspan="2">
                                        
                                        </td>
                                        </tr>
						
                            
                    </table>
                    
                    <?php 
            $data1 = CHtml::listData(Batches::model()->findAll(array('order' => 'name DESC')), 'id', 'name');
            echo CHtml::dropDownList('batch_id', '', $data1, array('prompt' => 'Select', 'id' => 'batch_id'));
            ?>
Exemplo n.º 27
0
  <!-- hinh anh -->
  <?php 
require_once dirname(__FILE__) . './../jfileupload/_upload.php';
?>
  <?php 
$selected_categories = array();
foreach ($model->categories as $categories) {
    array_push($selected_categories, $categories->id);
}
?>
  <div class="control-group">
    <div class="control-label">
      <label>Loại bài viết</label>
    </div>
    <div class="controls"> <?php 
echo CHtml::checkBoxList('categories', $selected_categories, CHtml::listData(ArticleCategories::model()->findAll('t.active=1 AND t.delete=0'), 'id', 'name'), array('template' => '<label class="checkbox">{input} {label}</label>', 'labelOptions' => array('style' => 'display:inline;'), 'separator' => ''));
?>
 </div>
  </div>
  
  <div class="control-group">
    <div class="control-label"><?php 
echo $form->labelEx($model, 'summary');
?>
</div>
    <div class="controls"><?php 
echo $form->textArea($model, 'summary', array('class' => 'input-xxlarge', 'size' => 60, 'maxlength' => 500));
?>
</div>
    <div class="controls"><?php 
echo $form->error($model, 'summary');
Exemplo n.º 28
0
 /**
  * @param User $user
  * @return string checkbox list
  */
 public static function checkBoxList(User $user)
 {
     $list = CHtml::checkBoxList('cities', self::exists($user), self::all(), ['template' => '{beginLabel}{input} {labelTitle}{endLabel}', 'separator' => '']);
     return $list;
 }
Exemplo n.º 29
0
 public function getPropCheckBoxListValues($label = '', $selected = '')
 {
     $cri = new CDbCriteria(array('condition' => 'prop_id =' . $this->prop_id, 'order' => 'sort_order asc, value_id asc'));
     $PropValues = PropValue::model()->findAll($cri);
     $list = CHtml::listData($PropValues, 'value_id', 'value_name');
     echo CHtml::checkBoxList('Item[props][' . $this->prop_id . ']', $selected, $list, array('label' => $label, 'separator' => '', 'labelOptions' => array('class' => 'labelForRadio')));
 }
Exemplo n.º 30
-1
 public function run()
 {
     // here render procedures
     echo CHtml::beginForm($this->action, $this->method, array('id' => $this->id, 'enctype' => $this->enctype, 'target' => $this->target));
     // you better create a function but
     // for the sake of the example...
     foreach ($this->attributes as $attr) {
         // here we can actually say i
         // this is very simple but you get the idea
         echo CHtml::label($attr['label'], $attr['name']);
         if ($attr['type'] == 'text') {
             echo CHtml::textField($this->model_name . '[' . $this->category . ']' . '[' . $attr['name'] . ']', $attr['value'], $attr['htmlOptions']);
         } else {
             if ($attr['type'] == 'textarea') {
                 echo CHtml::textArea($this->model_name . '[' . $this->category . ']' . '[' . $attr['name'] . ']', $attr['value'], $attr['htmlOptions']);
             } else {
                 if ($attr['type'] == 'password') {
                     echo CHtml::passwordField($this->model_name . '[' . $this->category . ']' . '[' . $attr['name'] . ']', $attr['value'], $attr['htmlOptions']);
                 } else {
                     if ($attr['type'] == 'checkbox') {
                         echo CHtml::checkBox($this->model_name . '[' . $this->category . ']' . '[' . $attr['name'] . ']', $attr['items'], $attr['htmlOptions']);
                     } else {
                         if ($attr['type'] == 'checkboxlist') {
                             echo CHtml::checkBoxList($this->model_name . '[' . $this->category . ']' . '[' . $attr['name'] . ']', $attr['value'], $attr['items'], $attr['htmlOptions']);
                         } else {
                             if ($attr['type'] == 'date') {
                                 echo CHtml::dateField($this->model_name . '[' . $this->category . ']' . '[' . $attr['name'] . ']', $attr['value'], $attr['htmlOptions']);
                             } else {
                                 if ($attr['type'] == 'dropdownlist') {
                                     echo CHtml::dropDownList($this->model_name . '[' . $this->category . ']' . '[' . $attr['name'] . ']', $attr['value'], $attr['items'], $attr['htmlOptions']);
                                 } else {
                                     if ($attr['type'] == 'file') {
                                         echo CHtml::fileField($this->model_name . '[' . $this->category . ']' . '[' . $attr['name'] . ']', $attr['value'], $attr['items'], $attr['htmlOptions']);
                                     } else {
                                         if ($attr['type'] == 'hidden') {
                                             echo CHtml::hiddenField($this->model_name . '[' . $this->category . ']' . '[' . $attr['name'] . ']', $attr['value'], $attr['items'], $attr['htmlOptions']);
                                         } else {
                                             if ($attr['type'] == 'radio') {
                                                 echo CHtml::radioButton($this->model_name . '[' . $this->category . ']' . '[' . $attr['name'] . ']', $attr['items'], $attr['htmlOptions']);
                                             } else {
                                                 if ($attr['type'] == 'radiolist') {
                                                     echo CHtml::radioButtonList($this->model_name . '[' . $this->category . ']' . '[' . $attr['name'] . ']', $attr['value'], $attr['items'], $attr['htmlOptions']);
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
         // do more here
     }
     echo "<br/><br/><div class='row-fluid'>";
     echo CHtml::submitButton($this->submit['label'], $this->submit['options']);
     echo "</div>";
     echo CHtml::endForm();
 }