Exemple #1
0
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use star\system\models\Tree;
/* @var $this yii\web\View */
/* @var $model star\catalog\models\ItemProp */
/* @var $form yii\widgets\ActiveForm */
list($path, $url) = Yii::$app->assetManager->publish('@star/catalog/assets');
$this->registerJsFile($url . '/js/dynoTable.js', ['depends' => [\core\assets\AppAsset::className()]]);
?>
<div class="content-body">
    <div class="row">
        <div class="col-md-12 col-sm-12 col-xs-12">

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

            <?php 
echo $form->field($model, 'category_id')->dropDownList(Tree::getTreesByName('商品分类'));
?>

            <?php 
echo $form->field($model, 'prop_name')->textInput(['maxlength' => 100]);
?>

            <?php 
echo $form->field($model, 'prop_alias')->textInput(['maxlength' => 100]);
?>
<?php

use core\assets\AppAsset;
use yii\helpers\Html;
/* @var $this \yii\web\View */
/* @var $content string */
AppAsset::register($this);
$this->beginPage();
?>
    <!DOCTYPE html>
    <html lang="<?php 
echo Yii::$app->language;
?>
">
    <head>
        <meta charset="<?php 
echo Yii::$app->charset;
?>
">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <?php 
echo Html::csrfMetaTags();
?>
        <title><?php 
echo Html::encode($this->title);
?>
</title>
        <?php 
$this->head();
?>
    </head>
Exemple #3
0
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use star\system\models\Tree;
use yii\bootstrap\Tabs;
use mihaildev\ckeditor\CKEditor;
use yii\helpers\Url;
use kartik\file\FileInput;
use star\catalog\models\Language;
use star\catalog\models\Currency;
use yii\helpers\ArrayHelper;
/* @var $this yii\web\View */
/* @var $model star\catalog\models\Item */
/* @var $form yii\widgets\ActiveForm */
list($path, $url) = Yii::$app->assetManager->publish('@star/catalog/assets/js');
$this->registerJsFile($url . '/skus.js', ['depends' => [\core\assets\AppAsset::className()]]);
?>

<div class="item-form">

    <?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
$fieldGroups = [];
$fields = [];
$fields[] = $form->field($model, 'title')->textInput(['maxlength' => 255]);
$fields[] = $form->field($model, 'price')->textInput(['maxlength' => 255]);
$currency = Currency::find()->all();
$fields[] = $form->field($model, 'currency')->dropDownList(ArrayHelper::map($currency, 'currency_id', 'name'));
$language = Language::find()->all();
$fields[] = $form->field($model, 'language')->dropDownList(ArrayHelper::map($language, 'language_id', 'name'));
$fieldGroups[] = ['label' => Yii::t('catalog', 'Base Info'), 'content' => implode('', $fields)];
<?php

use yii\helpers\Html;
/* @var $this \yii\web\View */
/* @var $content string */
\core\assets\AppAsset::register($this);
$this->beginPage();
?>
<!DOCTYPE html>
<html lang="<?php 
echo Yii::$app->language;
?>
">
<head>
    <meta charset="<?php 
echo Yii::$app->charset;
?>
">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?php 
echo Html::csrfMetaTags();
?>
    <title><?php 
echo Html::encode($this->title);
?>
</title>
    <?php 
$this->head();
?>
</head>
<body>