예제 #1
0
<?php 
$form = $this->beginWidget('bootstrap.widgets.BsActiveForm', array('id' => 'method-of-collection-data-form', 'enableAjaxValidation' => false));
?>

    <p class="help-block">Поля, помеченные <span class="required">*</span>, обязательны для заполнения.</p>

    <?php 
echo $form->errorSummary($model);
?>

    <?php 
echo $form->textFieldControlGroup($model, 'title', array('maxlength' => 255));
?>
    <?php 
echo $form->dropDownListControlGroup($model, 'type', MethodOfCollectionDataHelper::getAvailableTypes());
?>
    <?php 
echo $form->numberFieldControlGroup($model, 'price', array('maxlength' => 19, 'step' => 0.01));
?>
    <?php 
echo $form->numberFieldControlGroup($model, 'duration');
?>
    <?php 
echo $form->textAreaControlGroup($model, 'comments', array('rows' => 6));
?>
    <?php 
echo $form->numberFieldControlGroup($model, 'defaultCount');
?>
    <?php 
echo $form->numberFieldControlGroup($model, 'sortOrder');
예제 #2
0
/* @var $this MethodOfCollectionDataController */
/* @var $model MethodOfCollectionData */
/* @var $form BSActiveForm */
?>

<?php 
$form = $this->beginWidget('bootstrap.widgets.BsActiveForm', array('id' => 'method-of-collection-data-form', 'enableAjaxValidation' => false));
?>

    <p class="help-block">Поля, помеченные <span class="required">*</span>, обязательны для заполнения.</p>

    <?php 
echo $form->errorSummary($model);
?>

    <?php 
echo $form->textFieldControlGroup($model, 'title', array('maxlength' => 255));
?>
    <?php 
echo $form->dropDownListControlGroup($model, 'serviceId', MethodOfCollectionDataHelper::getAvailableServices(), array("class" => "bs"));
?>
    <?php 
echo $form->numberFieldControlGroup($model, 'sortOrder');
?>

    <?php 
echo BsHtml::submitButton('Сохранить', array('color' => BsHtml::BUTTON_COLOR_PRIMARY));
?>

<?php 
$this->endWidget();
예제 #3
0
<?php

/* @var $this MethodOfCollectionDataController */
/* @var $model MethodOfCollectionData */
?>

<?php 
$this->menu = array(array('icon' => 'glyphicon glyphicon-tasks', 'label' => 'Управление методами сбора', 'url' => array('admin')), array('icon' => 'glyphicon glyphicon-plus-sign', 'label' => 'Создать метод сбора', 'url' => array('create')), array('icon' => 'glyphicon glyphicon-edit', 'label' => 'Изменить метод сбора', 'url' => array('update', 'id' => $model->id)), array('icon' => 'glyphicon glyphicon-minus-sign', 'label' => 'Удалить метод сбора', 'url' => array('delete', 'id' => $model->id), 'onclick' => "return confirm('Вы уверены, что хотите удалить метод сбора?');"));
?>

<?php 
echo BsHtml::pageHeader($model->title);
?>

<?php 
$this->widget('zii.widgets.CDetailView', array('htmlOptions' => array('class' => 'table table-striped table-condensed table-hover'), 'data' => $model, 'attributes' => array('id', 'title', array("name" => 'type', 'value' => MethodOfCollectionDataHelper::getTranslatedTypeName($model->type)), 'price', 'duration', 'comments', 'sortOrder', 'readOnly', 'selectable', 'defaultCount')));