protected function initOptions()
    {
        $view = Yii::$app->view;

        $opts = [
            'confirmButtonText' => Yii::t('sweetsubmit', 'Ok'),
            'cancelButtonText'  => Yii::t('sweetsubmit', 'Cancel'),
        ];
        $opts = Json::encode($opts);

        $view->registerJs("yii.sweetSubmitOptions = $opts;", View::POS_END);
    }
protected function initOptions()
    {
        $view = Yii::$app->view;

        $opts = [
            'confirmButtonText' => Yii::t('sweetsubmit', 'Ok'),
            'cancelButtonText'  => Yii::t('sweetsubmit', 'Cancel'),
        ];
        $opts = Json::encode($opts);

        $view->registerJs("yii.sweetSubmitOptions = $opts;", View::POS_END);
    }
protected function initOptions ( ) { $ view = Yii :: $ app -> view ; $ opts = [ 'confirmButtonText' => Yii :: t ( 'sweetsubmit' , 'Ok' ) , 'cancelButtonText' => Yii :: t ( 'sweetsubmit' , 'Cancel' ) , ] ; $ opts = Json :: encode ( $ opts ) ; $ view -> registerJs ( "yii.sweetSubmitOptions = $opts;" , View :: POS_END ) ; }
Init plugin optins.
Init plugin optins .