예제 #1
0
파일: profile.php 프로젝트: oakcms/oakcms
use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use app\modules\admin\widgets\ActiveForm;
use app\modules\admin\widgets\Button;
use app\modules\user\models\UserProfile;
use app\modules\system\models\Language;
/* @var $this yii\web\View */
/* @var $model UserProfile */
/* @var $form yii\bootstrap\ActiveForm */
$this->title = Yii::t('backend', 'Edit profile');
$this->params['actions_buttons'] = [['label' => $model->isNewRecord ? Yii::t('admin', 'Create') : Yii::t('admin', 'Update'), 'options' => ['form' => 'user-id', 'type' => 'submit'], 'icon' => 'fa fa-save', 'iconPosition' => Button::ICON_POSITION_LEFT, 'size' => Button::SIZE_SMALL, 'disabled' => false, 'block' => false, 'type' => Button::TYPE_CIRCLE, 'color' => 'btn-success']];
?>
<div class="user-profile-form">
    <?php 
$form = ActiveForm::begin(['options' => ['id' => 'user-id', 'enctype' => 'multipart/form-data']]);
?>
    <div class="form-group">
        <div class="row">
            <div class="col-md-3">

            </div>
            <div class="col-md-9">
                <?php 
echo Html::img($model->getUploadUrl('avatar') ?: '/uploads/user/non_image.png', ['class' => 'img-thumbnail', 'style' => 'max-width:300px']);
?>
            </div>
        </div>
    </div>
    <?php 
echo $form->field($model, 'avatar')->fileInput(['accept' => 'image/*']);
예제 #2
0
파일: _form.php 프로젝트: oakcms/oakcms
<?php

use yii\helpers\Html;
use app\modules\admin\widgets\Button;
use app\modules\admin\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model app\modules\language\models\Language */
/* @var $form yii\widgets\ActiveForm */
$this->params['actions_buttons'] = [['label' => $model->isNewRecord ? Yii::t('language', 'Create') : Yii::t('language', 'Update'), 'options' => ['form' => 'language-id', 'type' => 'submit'], 'icon' => 'fa fa-save', 'iconPosition' => Button::ICON_POSITION_LEFT, 'size' => Button::SIZE_SMALL, 'disabled' => false, 'block' => false, 'type' => Button::TYPE_CIRCLE, 'color' => 'btn-success'], ['label' => Yii::t('language', 'Save & Continue Edit'), 'options' => ['onclick' => 'sendFormReload("#language-id")'], 'icon' => 'fa fa-check-circle', 'iconPosition' => Button::ICON_POSITION_LEFT, 'size' => Button::SIZE_SMALL, 'disabled' => false, 'block' => false, 'type' => Button::TYPE_CIRCLE, 'color' => 'btn-success']];
?>

<div class="language-form">

    <?php 
$form = ActiveForm::begin(['options' => ['id' => 'language-id']]);
?>

    <?php 
echo $form->field($model, 'language_id')->textInput(['maxlength' => true]);
?>
    <?php 
echo $form->field($model, 'language')->textInput(['maxlength' => true]);
?>
    <?php 
echo $form->field($model, 'country')->textInput(['maxlength' => true]);
?>
    <?php 
echo $form->field($model, 'url')->textInput(['maxlength' => true]);
?>
    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
예제 #3
0
파일: update.php 프로젝트: hackvijay/yii-qa
if ($type == Item::TYPE_ROLE) {
    $name = '角色';
    $key = 'roles';
} else {
    $name = '权限';
    $key = 'permissions';
}
$this->title = $opeartion . $name;
$this->params['breadcrumbs'] = [['url' => ['/admin/rbac'], 'label' => '角色与权限'], ['url' => ['/admin/rbac/' . $key], 'label' => $name . '列表'], $this->title];
$this->params['activeMenu'] = 'rbac/' . $key;
?>

    <div class="box">
        <div class="box-body">
            <?php 
$form = ActiveForm::begin();
?>
            <div class="page-header"><?php 
echo $name;
?>
属性</div>
            <?php 
echo $form->field($authItemForm, 'description');
?>
            <?php 
echo $form->field($authItemForm, 'name');
?>
            <?php 
echo $form->field($authItemForm, 'ruleName');
?>
            <?php 
예제 #4
0
파일: _form.php 프로젝트: oakcms/oakcms
    $model->parent = $parent;
}
if ($model->isNewRecord) {
    $langueBtn = ['label' => '<img src="' . $asset->baseUrl . '/images/flags/' . $lang->url . '.png" alt="' . $lang->url . '"/> ' . Yii::t('backend', $lang->name), 'options' => ['form' => 'portfolio-id', 'type' => 'submit'], 'encodeLabel' => false, 'icon' => false, 'size' => Button::SIZE_SMALL, 'disabled' => false, 'block' => false, 'type' => Button::TYPE_CIRCLE, 'color' => 'btn-default'];
} else {
    $allLang = Language::getLanguages();
    $langueBtnItems = [];
    foreach ($allLang as $item) {
        if ($lang->language_id != $item->language_id) {
            $langueBtnItems[] = ['label' => '<img src="' . $asset->baseUrl . '/images/flags/' . $item->url . '.png" alt="' . $item->url . '"/> ' . $item->name, 'url' => ['update', 'id' => $model->id, 'language' => $item->url]];
        }
    }
    $langueBtn = ['label' => '<img src="' . $asset->baseUrl . '/images/flags/' . $lang->url . '.png" alt="' . $lang->url . '"/> ' . $lang->name, 'options' => ['class' => 'btn blue btn-outline btn-circle btn-sm', 'data-hover' => "dropdown", 'data-close-others' => "true"], 'encodeLabel' => false, 'dropdown' => ['encodeLabels' => false, 'options' => ['class' => 'pull-right'], 'items' => $langueBtnItems]];
}
$this->params['actions_buttons'] = [$langueBtn, ['label' => $model->isNewRecord ? Yii::t('admin', 'Create') : Yii::t('admin', 'Update'), 'options' => ['form' => 'category-form-id', 'type' => 'submit'], 'icon' => 'fa fa-save', 'iconPosition' => Button::ICON_POSITION_LEFT, 'size' => Button::SIZE_SMALL, 'disabled' => false, 'block' => false, 'type' => Button::TYPE_CIRCLE, 'color' => 'btn-success'], ['label' => Yii::t('admin', 'Save & Continue Edit'), 'options' => ['onclick' => 'sendFormReload("#category-form-id")'], 'icon' => 'fa fa-check-circle', 'iconPosition' => Button::ICON_POSITION_LEFT, 'size' => Button::SIZE_SMALL, 'disabled' => false, 'block' => false, 'type' => Button::TYPE_CIRCLE, 'color' => 'btn-success']];
$form = \app\modules\admin\widgets\ActiveForm::begin(['enableAjaxValidation' => true, 'options' => ['enctype' => 'multipart/form-data', 'id' => 'category-form-id']]);
?>

    <?php 
echo $form->field($model, 'title');
?>
    <?php 
echo $form->field($model, 'slug')->hint(Yii::t('admin', 'If you\'ll leave this field empty, slug will be generated automatically'));
?>
    <?php 
echo isset($parent) ? $form->field($model, 'parent')->dropDownList(ArrayHelper::map(ContentCategory::find()->andFilterWhere(['<>', 'id', $model->id])->all(), 'id', 'title'), ['prompt' => '']) : '';
?>

    <?php 
if ($settings['categoryThumb']['value']) {
    ?>
예제 #5
0
파일: _form.php 프로젝트: oakcms/oakcms
    $allLang = Language::getLanguages();
    $langueBtnItems = [];
    foreach ($allLang as $item) {
        if ($lang->language_id != $item->language_id) {
            $langueBtnItems[] = ['label' => '<img src="' . $asset->baseUrl . '/images/flags/' . $item->url . '.png" alt="' . $item->url . '"/> ' . $item->name, 'url' => ['update', 'id' => $model->id, 'language' => $item->url]];
        }
    }
    $langueBtn = ['label' => '<img src="' . $asset->baseUrl . '/images/flags/' . $lang->url . '.png" alt="' . $lang->url . '"/> ' . $lang->name, 'options' => ['class' => 'btn blue btn-outline btn-circle btn-sm', 'data-hover' => "dropdown", 'data-close-others' => "true"], 'encodeLabel' => false, 'dropdown' => ['encodeLabels' => false, 'options' => ['class' => 'pull-right'], 'items' => $langueBtnItems]];
}
$this->params['actions_buttons'] = [$langueBtn, ['label' => $model->isNewRecord ? Yii::t('content', 'Create') : Yii::t('content', 'Update'), 'options' => ['form' => 'content-pages-id', 'type' => 'submit'], 'icon' => 'fa fa-save', 'iconPosition' => Button::ICON_POSITION_LEFT, 'size' => Button::SIZE_SMALL, 'disabled' => false, 'block' => false, 'type' => Button::TYPE_CIRCLE, 'color' => 'btn-success'], ['label' => Yii::t('content', 'Save & Continue Edit'), 'options' => ['onclick' => 'sendFormReload("#content-pages-id")'], 'icon' => 'fa fa-check-circle', 'iconPosition' => Button::ICON_POSITION_LEFT, 'size' => Button::SIZE_SMALL, 'disabled' => false, 'block' => false, 'type' => Button::TYPE_CIRCLE, 'color' => 'btn-success']];
?>

<div class="content-pages-form">

    <?php 
$form = ActiveForm::begin(['options' => ['id' => 'content-pages-id', 'enctype' => 'multipart/form-data']]);
?>

    <?php 
echo $form->field($model, 'title_h1')->textInput(['maxlength' => true])->translatable();
?>
    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => true])->translatable();
?>
    <?php 
echo $form->field($model, 'subtitle')->textInput(['maxlength' => true])->translatable();
?>
    <?php 
echo $form->field($model, 'slug')->hint(Yii::t('admin', 'If you\'ll leave this field empty, slug will be generated automatically'))->textInput(['maxlength' => true])->translatable();
?>
예제 #6
0
파일: account.php 프로젝트: oakcms/oakcms
 * @var $model \app\modules\user\models\User
 * @var $form yii\bootstrap\ActiveForm
 */
use yii\helpers\Html;
use app\modules\admin\widgets\Button;
use app\modules\admin\widgets\ActiveForm;
$this->title = Yii::t('backend', 'Edit account');
$ga = new \Google\Authenticator\GoogleAuthenticator();
$js = "\n\n";
$this->params['actions_buttons'] = [['label' => Yii::t('admin', 'Update'), 'options' => ['form' => 'user-id', 'type' => 'submit'], 'icon' => 'fa fa-save', 'iconPosition' => Button::ICON_POSITION_LEFT, 'size' => Button::SIZE_SMALL, 'disabled' => false, 'block' => false, 'type' => Button::TYPE_CIRCLE, 'color' => 'btn-success']];
?>

<div class="user-profile-form">

    <?php 
$form = ActiveForm::begin(['options' => ['id' => 'user-id']]);
?>
    <?php 
echo $form->field($model, 'username');
?>
    <?php 
echo $form->field($model, 'email');
?>
    <?php 
echo $form->field($model, 'password')->passwordInput();
?>
    <?php 
echo $form->field($model, 'password_confirm')->passwordInput();
?>
    <?php 
//= $form->field($model, 'googleAuthenticator')->checkbox(['class'=>'make-switch', 'data-size'=>'small'], false)
예제 #7
0
파일: _form.php 프로젝트: oakcms/oakcms
<?php

use app\modules\admin\widgets\ActiveForm;
use app\modules\admin\widgets\Button;
/* @var $this yii\web\View */
/* @var $model app\modules\admin\models\ModulesModules */
/* @var $form yii\widgets\ActiveForm */
$this->params['actions_buttons'] = [['label' => $model->isNewRecord ? Yii::t('admin', 'Create') : Yii::t('admin', 'Update'), 'options' => ['form' => 'modules-modules-id', 'type' => 'submit'], 'icon' => 'fa fa-save', 'iconPosition' => Button::ICON_POSITION_LEFT, 'size' => Button::SIZE_SMALL, 'disabled' => false, 'block' => false, 'type' => Button::TYPE_CIRCLE, 'color' => 'btn-success'], ['label' => Yii::t('admin', 'Save & Continue Edit'), 'options' => ['onclick' => 'sendFormReload("#modules-modules-id")'], 'icon' => 'fa fa-check-circle', 'iconPosition' => Button::ICON_POSITION_LEFT, 'size' => Button::SIZE_SMALL, 'disabled' => false, 'block' => false, 'type' => Button::TYPE_CIRCLE, 'color' => 'btn-success']];
?>

<div class="modules-modules-form">
    <?php 
$form = ActiveForm::begin(['enableAjaxValidation' => true, 'options' => ['id' => 'modules-modules-id']]);
?>

    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>
    <?php 
echo $form->field($model, 'class')->textInput(['maxlength' => true]);
?>
    <?php 
echo $form->field($model, 'isFrontend')->textInput();
?>
    <?php 
echo $form->field($model, 'isAdmin')->textInput();
?>
    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>
    <?php 
예제 #8
0
파일: _form.php 프로젝트: oakcms/oakcms
<?php

use yii\helpers\Html;
use app\modules\admin\widgets\Button;
use app\modules\admin\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model app\modules\seo\models\SeoItems */
/* @var $form yii\widgets\ActiveForm */
$this->params['actions_buttons'] = [['label' => $model->isNewRecord ? Yii::t('admin', 'Create') : Yii::t('admin', 'Update'), 'options' => ['form' => 'seo-items-id', 'type' => 'submit'], 'icon' => 'fa fa-save', 'iconPosition' => Button::ICON_POSITION_LEFT, 'size' => Button::SIZE_SMALL, 'disabled' => false, 'block' => false, 'type' => Button::TYPE_CIRCLE, 'color' => 'green-jungle'], ['label' => Yii::t('admin', 'Save & Continue Edit'), 'options' => ['onclick' => 'sendFormReload("#seo-items-id")'], 'icon' => 'fa fa-check-circle', 'iconPosition' => Button::ICON_POSITION_LEFT, 'size' => Button::SIZE_SMALL, 'disabled' => false, 'block' => false, 'type' => Button::TYPE_CIRCLE, 'color' => 'green-jungle']];
?>

<div class="seo-items-form">

    <?php 
$form = ActiveForm::begin(['options' => ['id' => 'seo-items-id']]);
?>

    <?php 
echo $form->field($model, 'link')->textInput(['maxlength' => true]);
?>
    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>
    <?php 
echo $form->field($model, 'keywords')->textarea(['rows' => 3, 'style' => 'resize:none']);
?>
    <?php 
echo $form->field($model, 'description')->textarea(['rows' => 3, 'style' => 'resize:none']);
//widget(\app\widgets\Editor::className());
?>
    <?php 
예제 #9
0
파일: _form.php 프로젝트: oakcms/oakcms
    $allLang = Language::getLanguages();
    $langueBtnItems = [];
    foreach ($allLang as $item) {
        if ($lang->language_id != $item->language_id) {
            $langueBtnItems[] = ['label' => '<img src="' . $asset->baseUrl . '/images/flags/' . $item->url . '.png" alt="' . $item->url . '"/> ' . $item->name, 'url' => ['update', 'id' => $model->id, 'language' => $item->url]];
        }
    }
    $langueBtn = ['label' => '<img src="' . $asset->baseUrl . '/images/flags/' . $lang->url . '.png" alt="' . $lang->url . '"/> ' . $lang->name, 'options' => ['class' => 'btn blue btn-outline btn-circle btn-sm', 'data-hover' => "dropdown", 'data-close-others' => "true"], 'encodeLabel' => false, 'dropdown' => ['encodeLabels' => false, 'options' => ['class' => 'pull-right'], 'items' => $langueBtnItems]];
}
$this->params['actions_buttons'] = [$langueBtn, ['label' => $model->isNewRecord ? Yii::t('carousel', 'Create') : Yii::t('carousel', 'Update'), 'options' => ['form' => 'text-id', 'type' => 'submit'], 'icon' => 'fa fa-save', 'iconPosition' => Button::ICON_POSITION_LEFT, 'size' => Button::SIZE_SMALL, 'disabled' => false, 'block' => false, 'type' => Button::TYPE_CIRCLE, 'color' => 'btn-success'], ['label' => Yii::t('carousel', 'Save & Continue Edit'), 'options' => ['onclick' => 'sendFormReload("#text-id")'], 'icon' => 'fa fa-check-circle', 'iconPosition' => Button::ICON_POSITION_LEFT, 'size' => Button::SIZE_SMALL, 'disabled' => false, 'block' => false, 'type' => Button::TYPE_CIRCLE, 'color' => 'btn-success']];
?>

<div class="text-form">

    <?php 
$form = ActiveForm::begin(['options' => ['id' => 'text-id']]);
?>
    <div class="nav-tabs-custom">
        <ul class="nav nav-tabs">
            <li class="active">
                <a href="#tab_1" data-toggle="tab" aria-expanded="true">
                    <i class="fa fa-file-text-o"></i> <?php 
echo Yii::t('text', 'content');
?>
                </a>
            </li>
            <li>
                <a href="#tab_2" data-toggle="tab" aria-expanded="true">
                    <i class="fa fa-file-text-o"></i> <?php 
echo Yii::t('text', 'Binding to the menu');
?>
예제 #10
0
파일: index.php 프로젝트: oakcms/oakcms
use yii\bootstrap\Html;
use app\modules\admin\widgets\ActiveForm;
use app\modules\admin\widgets\Button;
/**
 * @var $this yii\web\View
 * @var $dataProvider yii\data\ActiveDataProvider
 * @var $model \app\modules\system\models\SystemSettings
 *
 */
$this->title = Yii::t('system', 'System Settings');
$this->params['breadcrumbs'][] = $this->title;
$this->params['actions_buttons'] = [['label' => Yii::t('app', 'Update'), 'options' => ['form' => 'settings', 'type' => 'submit'], 'icon' => 'fa fa-save', 'iconPosition' => Button::ICON_POSITION_LEFT, 'size' => Button::SIZE_SMALL, 'disabled' => false, 'block' => false, 'type' => Button::TYPE_CIRCLE, 'color' => 'green-jungle']];
?>
<div class="system-settings-index">
    <?php 
ActiveForm::begin(['id' => 'settings']);
?>

    <?php 
foreach ($model as $item) {
    ?>
        <div class="form-group">
            <label class="col-md-3 control-label" for="<?php 
    echo $item->param_name;
    ?>
">
                <?php 
    echo Yii::t('system', $item->param_name);
    ?>
            </label>
            <div class="col-md-9">
예제 #11
0
파일: _form.php 프로젝트: oakcms/oakcms
<?php

use yii\helpers\Html;
use app\modules\admin\widgets\Button;
use app\modules\admin\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model app\modules\content\models\ContentCategory */
/* @var $form yii\widgets\ActiveForm */
$this->params['actions_buttons'] = [['label' => $model->isNewRecord ? Yii::t('content', 'Create') : Yii::t('content', 'Update'), 'options' => ['form' => 'content-category-id', 'type' => 'submit'], 'icon' => 'fa fa-save', 'iconPosition' => Button::ICON_POSITION_LEFT, 'size' => Button::SIZE_SMALL, 'disabled' => false, 'block' => false, 'type' => Button::TYPE_CIRCLE, 'color' => 'btn-success'], ['label' => Yii::t('content', 'Save & Continue Edit'), 'options' => ['onclick' => 'sendFormReload("#content-category-id")'], 'icon' => 'fa fa-check-circle', 'iconPosition' => Button::ICON_POSITION_LEFT, 'size' => Button::SIZE_SMALL, 'disabled' => false, 'block' => false, 'type' => Button::TYPE_CIRCLE, 'color' => 'btn-success']];
?>

<div class="content-category-form">

    <?php 
$form = ActiveForm::begin(['options' => ['id' => 'content-category-id']]);
?>

    <div class="nav-tabs-custom">
        <ul class="nav nav-tabs">
            <li class="active">
                <a href="#tab_1" data-toggle="tab" aria-expanded="true">
                    <i class="fa fa-file-text-o"></i> <?php 
echo Yii::t('content', 'Content');
?>
                </a>
            </li>
            <li class="">
                <a href="#tab_2" data-toggle="tab" aria-expanded="false">
                    <i class="fa fa-newspaper-o"></i> <?php 
echo Yii::t('content', 'Publication');
?>
예제 #12
0
파일: _form.php 프로젝트: oakcms/oakcms
{
    switch ($status) {
        case 1:
            return '<span class="label label-primary">' . SystemBackCall::getStatus($status) . '</span>';
            break;
        case 2:
            return '<span class="label label-success">' . SystemBackCall::getStatus($status) . '</span>';
            break;
    }
}
?>

<div class="system-back-call-form">

    <?php 
$form = ActiveForm::begin(['options' => ['id' => 'system-back-call-id']]);
?>

    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>
    <?php 
echo $form->field($model, 'email')->textInput(['maxlength' => true]);
?>
    <?php 
echo $form->field($model, 'phone')->textInput(['maxlength' => true]);
?>
    <?php 
echo $form->field($model, 'comment')->textarea(['maxlength' => true]);
?>
    <?php 
예제 #13
0
">
                        <?php 
} else {
    ?>
                            <?php 
    echo \cebe\gravatar\Gravatar::widget(['email' => $user->email, 'size' => 160, 'options' => ['alt' => Yii::t('app', 'Avatar image for {username}', ['username' => $user->username]), 'class' => 'img-circle']]);
    ?>
                        <?php 
}
?>
                    </div>
                    <!-- /.lockscreen-image -->

                    <!-- lockscreen credentials (contains the form) -->
                    <?php 
$form = ActiveForm::begin(['action' => \yii\helpers\Url::to(['/admin/user/user/login']), 'options' => ['class' => 'lockscreen-credentials']]);
?>
                    <?php 
echo \app\modules\admin\widgets\Html::activeHiddenInput($model, 'username');
?>
                        <div class="input-group">
                            <?php 
echo Html::activeInput('password', $model, 'password', ['placeholder' => Yii::t('admin', 'Password'), 'class' => 'form-control']);
?>

                            <div class="input-group-btn">
                                <button type="submit" class="btn"><i class="fa fa-arrow-right text-muted"></i></button>
                            </div>
                        </div>
                    <?php 
ActiveForm::end();