コード例 #1
0
ファイル: ComboBox.php プロジェクト: CAPITALOV/capitalov
    /**
     * Registers the needed JavaScript.
     */
    public function registerClientScript()
    {
        \app\assets\FuelUX\Asset::register($this->view);
        $this->options = ArrayHelper::merge($this->getClientOptions(), $this->options);
        $options = Json::encode($this->options);
        $this->getView()->registerJs(<<<JS
\$('#{$this->attrId}').combobox({$options});
JS
);
        if ($this->events) {
            foreach ($this->events as $name => $function) {
                $this->getView()->registerJs(<<<JS
\$('#{$this->attrId}').on('{$name}', {$function});
JS
);
            }
        }
    }
コード例 #2
0
ファイル: add1.php プロジェクト: CAPITALOV/capitalov
<?php

use yii\helpers\Html;
use yii\grid\GridView;
use yii\data\ActiveDataProvider;
use yii\authclient\widgets\AuthChoice;
use yii\bootstrap\ActiveForm;
/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model cs\base\BaseForm */
/* @var $stock \app\models\Stock */
$this->title = 'Оплата прогноза';
\app\assets\FuelUX\Asset::register($this);
$url = \yii\helpers\Url::to(['cabinet_wallet/add_step1_1']);
$this->registerJs(<<<JS
    \$('#myWizard').wizard({
        disablePreviousStep: false
    });
    \$('#buttonNext').click(function() {
    console.log(1);
        ajaxJson({
            url: '{$url}',
            data: {
                monthcounter: \$('#cabinetwalletadd-monthcounter').val(),
                stock_em: \$('input[name="{$model->formName()}[finam_em]"]').val()
            },
            success: function(ret) {
                \$('#customerNumber').val(ret.request.id);
                \$('#sum').val(ret.request.sum);
                \$('#custName').val(ret.user.fio);
                \$('#custEmail').val(ret.user.email);