Example #1
0
        ?>
                            </div>
                        </td>
                        <td>
                            <?php 
        if (Landing::STATUS_DISABLE == $landing->getStatus()) {
            $status = 'default';
        } else {
            $status = 'primary';
        }
        ?>
                            <span class="label label-<?php 
        echo $status;
        ?>
"><?php 
        echo LandingHelper::getStatusNameByCode($landing->getStatus());
        ?>
</span>
                        </td>
                        <td>
                            <a href="<?php 
        echo Url::to(['/landing/delete', 'id' => $landing->getLandingId()]);
        ?>
">
                                <i class="fa fa-trash"></i>
                            </a>
                        </td>
                    </tr>
                <?php 
    }
    ?>
Example #2
0
?>

<div class="ibox-content">
    <?php 
$form = ActiveForm::begin(['id' => 'landing-form', 'layout' => 'horizontal', 'fieldConfig' => ['template' => "{label}\n{beginWrapper}\n{input}\n{hint}\n{error}\n{endWrapper}", 'horizontalCssClasses' => ['label' => 'col-sm-2', 'wrapper' => 'col-sm-10', 'error' => '', 'hint' => '']], 'options' => ['enctype' => 'multipart/form-data']]);
?>


    <?php 
echo $form->field($model, 'name')->textInput();
?>
    <?php 
echo $form->field($model, 'description')->textarea(['rows' => 5]);
?>
    <?php 
echo $form->field($model, 'status')->radioList(LandingHelper::getStatuses());
?>
    <div class="form-group">
        <div class="col-sm-4 col-sm-offset-2">
            <?php 
if ($model->getLandingId()) {
    $buttonName = 'Изменить данные';
} else {
    $buttonName = 'Добавить';
}
?>
            <?php 
echo Html::submitButton($buttonName, ['class' => 'btn btn-primary']);
?>
        </div>
    </div>