Since: 2.0
Author: Qiang Xue (qiang.xue@gmail.com)
Inheritance: extends yii\web\AssetBundle
Ejemplo n.º 1
0
<?php

use mirocow\eav\admin\assets\FbAsset;
/**
 * @var \yii\web\View $this
 * @var string $content
 */
FbAsset::register($this);
?>

<div class="form-builder fb-main">
</div>

<?php 
$js_form_builder = <<<JS
  \$(function(){
  
    fb = new Formbuilder({
      uri: '{$url}',
      selector: '.fb-main',
      bootstrapData: {$bootstrapData}
    });

    fb.on('save', function(payload){
      \$.ajax({
        url: '{$urlSave}',
        type: 'post',
        data: {categoryId: {$categoryId}, entityModel: '{$entityModel}', entityName: '{$entityName}', payload: payload, _csrf: yii.getCsrfToken()},        
        dataType: 'json',
      }).success(function(response) {
      });
Ejemplo n.º 2
0
<?php

use mirocow\eav\admin\assets\FbAsset;
use yii\web\View;
/**
 * @var \yii\web\View $this
 * @var string $content
 */
$path = FbAsset::register($this);
?>

    <div class="form-builder fb-main">
    </div>
<?php 
$js_form_builder = <<<JS
  \$(function(){
    fb = new Formbuilder({
      uri: '{$url}',
      selector: '.fb-main',
      bootstrapData: {$bootstrapData},
    });
    fb.on('save', function(payload){
      \$.ajax({
        url: '{$urlSave}',
        type: 'post',
        data: {
          categoryId: {$categoryId}, 
          entityModel: '{$entityModel}', 
          entityName: '{$entityName}', 
          payload: payload, _csrf: yii.getCsrfToken()
        },