Esempio n. 1
0
<?php

use yii\helpers\Html;
use yii\helpers\Url;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use kartik\sidenav\SideNav;
use app\bundles\AppBundle;
use app\components\widgets\Alert;
/* @var $this \yii\web\View */
/* @var $content string */
AppBundle::register($this);
$moduleID = $this->context->module->id;
$controllerID = $this->context->id;
$actionID = $this->context->action->id;
$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">
        <link rel="shortcut icon" href="<?php 
echo Yii::$app->getHomeUrl();
Esempio n. 2
0
$noreplyEmail = Yii::$app->settings->get("app.noreplyEmail");
// Emails to show in the form
$emails = array('Emails' => [$adminEmail => $adminEmail, $supportEmail => $supportEmail, $noreplyEmail => $noreplyEmail]);
// Email fields of the form
$emailLabels = $formDataModel->getEmailLabels();
$emailFields = array(Yii::t('app', 'Email Fields') => $emailLabels);
// If the form has email fields, add to config form
if (sizeof($emailLabels) > 0) {
    $emails = array_merge($emails, $emailFields);
}
// PHP options required by editor.js
$options = array("endPoint" => Url::to(['app/preview']), "formID" => $formModel->id, "iframe" => "formI", "iHeight" => 250);
// Pass php options to javascript, and load before form.settings.js
$this->registerJs("var options = " . json_encode($options) . ";", $this::POS_BEGIN, 'editor-options');
// Load form.settings.js after AppBundle
$this->registerJsFile('@web/static_files/js/form.settings.js', ['depends' => \app\bundles\AppBundle::className()]);
?>
<div class="form-config-page">

    <div class="page-header">
        <h1><?php 
echo Html::encode($this->title);
?>
 <small><?php 
echo Yii::t('app', 'Settings');
?>
</small></h1>
    </div>

    <?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_VERTICAL]);