writesdown/app-cms

View on GitHub
backend/views/menu/_create.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
/**
 * @link http://www.writesdown.com/
 * @author Agiel K. Saputra <13nightevil@gmail.com>
 * @copyright Copyright (c) 2015 WritesDown
 * @license http://www.writesdown.com/license/
 */

use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $form yii\widgets\ActiveForm */
/* @var $model common\models\Menu */
?>
<?php $form = ActiveForm::begin([
    'id' => 'create-menu-form',
    'action' => Url::to(['create']),
]) ?>

<div class="input-group">
    <?= $form->field($model, 'title', ['template' => '{input}'])->textInput([
        'placeholder' => $model->getAttributeLabel('title'),
    ]) ?>

    <div class="input-group-btn">
        <?= Html::submitButton(Yii::t('writesdown', 'Add New Menu'), ['class' => 'btn btn-flat btn-primary']) ?>

    </div>
</div>
<?php ActiveForm::end() ?>