PHP Classes

File: views/backend/menu/_form.php

Recommend this page to a friend!
  Classes of Gabriel Alejandro López López   Yii2 Website Module   views/backend/menu/_form.php   Download  
File: views/backend/menu/_form.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Yii2 Website Module
Add a content page management system to a site
Author: By
Last change:
Date: 1 month ago
Size: 1,042 bytes
 

Contents

Class file image Download
<?php

use yii\helpers\Html;
use
yii\widgets\ActiveForm;
use \
yii\widgets\ListView;
use
yii\data\ArrayDataProvider;

/* @var $this yii\web\View */
/* @var $model daxslab\website\models\Menu */
/* @var $form yii\bootstrap4\ActiveForm */
?>

<div class="menu-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= Html::errorSummary($model) ?>

    <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>

    <?= Html::activeHiddenInput($model, 'website_id') ?>

    <div class="form-group">
        <?= Html::submitButton(Yii::t('website', 'Save'), ['class' => 'btn btn-success']) ?>
<?php if (!$model->isNewRecord): ?>
<?= Html::a(Yii::t('website', 'Delete'), \daxslab\website\components\Lookup::getLink($model, 'delete'), [
               
'class' => 'btn btn-danger',
               
'data-method' => 'post',
               
'data-confirm' => Yii::t('website', 'Are you sure you want to delete this item?')
            ])
?>
<?php endif; ?>
</div>

    <?php ActiveForm::end(); ?>

</div>