Commit 8a304c6f authored by Виталий Мурашко's avatar Виталий Мурашко

Merge branch 'master' of http://git.task-on.com/ktask/task-on.com

parents 4779d796 0e149db4
......@@ -195,7 +195,7 @@ JS;
case 'email':
$tmp = $this->field($this->model, $key, $optEl)->input($element['type'], $opt);
if(!empty($element['hint'])) $tmp = $tmp->hint($element['hint']);
if($element['options']['label'] === false) $tmp = $tmp->label(false);
if(array_key_exists('options', $element) && $element['options']['label'] === false) $tmp = $tmp->label(false);
$config['options'][] = $tmp;
break;
case 'password':
......@@ -216,7 +216,7 @@ JS;
//$optEl['template'] = '{label}<div class="col-md-8">{input}</div>{error}{hint}';
$tmp = $this->field($this->model, $key, $optEl)->dropDownList($element['items'],$opt);
if(!empty($element['hint'])) $tmp = $tmp->hint($element['hint']);
if($element['options']['label'] === false) $tmp = $tmp->label(false);
if(array_key_exists('options', $element) && $element['options']['label'] === false) $tmp = $tmp->label(false);
$config['options'][] = $tmp;
break;
case 'listBox':
......
<?php
namespace common\components;
/**
* API UniSender
*
......@@ -76,7 +76,7 @@ class UnisenderAPI {
public function createList($title=null){
if ($title===null) {
$date = new DateTime;
$date = new \DateTime;
$title = $date->format('YmdHis').(rand(100000, 999999));
}
return $this->callMethod(
......@@ -87,6 +87,15 @@ class UnisenderAPI {
);
}
public function getVisitedLinks($campaign_id){
return $this->callMethod(
'getVisitedLinks',
[
'campaign_id' => $campaign_id
]
);
}
public function createCampaign($message_id){
return $this->callMethod(
'createCampaign',
......
......@@ -36,7 +36,7 @@ class Settings extends \common\components\ActiveRecordModel
public function rules()
{
return [
[['module_id', 'code', 'name', 'value', 'element', 'description'], 'required'],
[['module_id', 'code', 'name', /*'value',*/ 'element', /*'description'*/], 'required'],
[['value', 'element'], 'string'],
[['hidden'], 'integer'],
[['module_id', 'code'], 'string', 'max' => 50],
......
......@@ -19,7 +19,6 @@ class BidAdminController extends AdminController
'Manage' => 'Управление заявками',
'Create' => 'Добавление заявки',
'Update' => 'Редактирование заявки',
'Delete' => 'Удаление заявки',
'View' => 'Просмотр заявки',
];
}
......@@ -103,19 +102,6 @@ class BidAdminController extends AdminController
}
}
/**
* Deletes an existing Bid model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
* @return mixed
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
return $this->redirect(['index']);
}
/**
* Finds the Bid model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
......
......@@ -19,11 +19,24 @@ class Bid extends \common\components\ActiveRecordModel
{
const SCENARIO_PROJECT = 'project';
const SCENARIO_CALLBACK = 'callback';
const SCENARIO_SUBSCRIBE = 'subscribe';
const FORM_SUBSCRIBE = 'subscribe';
const FORM_CALLBACK = 'callback';
const FORM_PROJECT = 'project';
const FORM_MESSAGE = 'message';
const FILE_FOLDER = '/uploads/bids/';
public $file;
public static $form_titles = [
self::FORM_PROJECT => 'Расчитать проект',
self::FORM_CALLBACK => 'Обратный звонок',
self::FORM_SUBSCRIBE => 'Подписка',
self::FORM_MESSAGE => 'Сообщение с сайта',
];
/**
* @inheritdoc
*/
......@@ -47,16 +60,18 @@ class Bid extends \common\components\ActiveRecordModel
{
return [
[['name', 'phone', 'email'], 'required', 'on' => self::SCENARIO_PROJECT],
[['email'], 'email', 'on' => self::SCENARIO_PROJECT],
[['email'], 'email'],
[['name', 'phone'], 'required', 'on' => self::SCENARIO_CALLBACK],
[['email'], 'required', 'on' => self::SCENARIO_SUBSCRIBE],
[['file'], 'file', 'skipOnEmpty' => true, 'extensions' => 'png, jpg, jpeg, gif, xls, xlsx, doc, docx, pdf'],
[['text'], 'string'],
[['name'], 'string', 'max' => 100],
[['phone'], 'string', 'max' => 30],
[['email'], 'string', 'max' => 70],
[['filename'], 'string', 'max' => 50],
[['filename', 'form'], 'string', 'max' => 50],
];
}
......@@ -73,6 +88,7 @@ class Bid extends \common\components\ActiveRecordModel
'filename' => 'Прикрепленный файл',
'file' => 'Прикрепленный файл',
'text' => 'Сообщение',
'form' => 'Форма отправки',
'created_at' => 'Дата добавления',
'updated_at' => 'Дата обновления',
];
......@@ -101,20 +117,26 @@ class Bid extends \common\components\ActiveRecordModel
public function send()
{
$email = Settings::getValue('bids-support-email');
try
{
$email = Settings::getValue('bids-support-email');
$message = Yii::$app->controller->view->render('@common/modules/bids/views/bid/mail-all', [
'model' => $this
]);
$message = Yii::$app->controller->view->render('@common/modules/bids/views/bid/mail-all', [
'model' => $this
]);
$headers = "MIME-Version: 1.0\r\n".
"Content-Transfer-Encoding: 8bit\r\n".
"Content-Type: text/html; charset=\"UTF-8\"\r\n".
"X-Mailer: PHP v.".phpversion()."\r\n".
"From: Заявка с сайта TaskOn <robot@task-on.com>\r\n";
$headers = "MIME-Version: 1.0\r\n".
"Content-Transfer-Encoding: 8bit\r\n".
"Content-Type: text/html; charset=\"UTF-8\"\r\n".
"X-Mailer: PHP v.".phpversion()."\r\n".
"From: Заявка с сайта TaskOn <robot@task-on.com>\r\n";
$subject = "Заявка с сайта TaskOn";
$subject = "Заявка с сайта TaskOn";
mail($email, $subject, $message, $headers);
@mail($email, $subject, $message, $headers);
}
catch (Exception $e)
{
}
}
}
......@@ -19,7 +19,7 @@ class SearchBid extends Bid
{
return [
[['id'], 'integer'],
[['name', 'phone', 'email', 'filename', 'text', 'created_at'], 'safe'],
[['name', 'phone', 'email', 'filename', 'text', 'created_at', 'form'], 'safe'],
];
}
......@@ -60,6 +60,7 @@ class SearchBid extends Bid
// grid filtering conditions
$query->andFilterWhere([
'id' => $this->id,
'form' => $this->form,
'created_at' => ($this->created_at?strtotime($this->created_at):$this->created_at),
]);
......
......@@ -34,6 +34,14 @@ $this->params['breadcrumbs'][] = $this->title;
}
],
'text:ntext',
[
'attribute' => 'form',
'filter' => Bid::$form_titles,
'value' => function($model)
{
return ($model->form?Bid::$form_titles[$model->form]:null);
}
],
[
'attribute' => 'created_at',
'format' => ['date', 'php:d.m.Y H:i:s']
......
......@@ -3,7 +3,12 @@
namespace common\modules\content\models;
use Yii;
use yii\behaviors\TimestampBehavior;
use himiklab\sitemap\behaviors\SitemapBehavior;
use \yii\helpers\Url;
use common\modules\content\models\CoBlocks;
use common\modules\content\models\CoContentLang;
use common\modules\languages\models\Languages;
use common\models\MetaTags;
......@@ -47,7 +52,29 @@ class CoContent extends \common\components\ActiveRecordModel
],
'langs' => [
'class' => 'common\modules\content\components\CoContentLangBehavior',
]
],
'timestamp' => [
'class' => TimestampBehavior::className(),
'createdAtAttribute' => 'created_at',
'updatedAtAttribute' => 'updated_at',
'value' => time(),
],
'sitemap' => [
'class' => SitemapBehavior::className(),
'scope' => function ($model) {
/** @var \yii\db\ActiveQuery $model */
$model->select(['url', 'updated_at', 'priority']);
// $model->andWhere(['is_deleted' => 0]);
},
'dataClosure' => function ($model) {
return [
'loc' => Url::to($model->url, true),
'lastmod' => date('c', $model->updated_at),
'changefreq' => SitemapBehavior::CHANGEFREQ_DAILY,
'priority' => $model->priority
];
}
],
];
}
......@@ -68,7 +95,8 @@ class CoContent extends \common\components\ActiveRecordModel
[['image'], 'file', 'skipOnEmpty' => true, 'extensions' => 'png, jpg, jpeg, gif'],
[['url'], 'required'],
[['url'], 'string', 'max' => 250],
[['category_id'], 'safe']
[['category_id', 'priority'], 'safe'],
[['priority'], 'double']
];
}
......@@ -83,6 +111,7 @@ class CoContent extends \common\components\ActiveRecordModel
'url' => Yii::t('content', 'Url'),
'name' => Yii::t('content', 'Name'),
'image' => 'Превью',
'priority' => 'Приоритет в Sitemap',
'title' => Yii::t('content', 'Title'),
'text' => Yii::t('content', 'Content'),
'active' => Yii::t('content', 'Active'),
......
......@@ -70,6 +70,8 @@ $blocks = \common\modules\content\models\CoBlocks::find()->all();
'label' => ' '
], false); ?>
<?= $form->field($model, 'priority')->textInput(['maxlength' => 3])->hint('По умолчанию: 0.8') ?>
<?php if($model->preview)
{
echo Html::img(\Yii::$app->params['frontUrl'] . CoContent::PHOTO_FOLDER . $model->preview);
......
......@@ -2,7 +2,9 @@
use yii\helpers\Html;
use yii\helpers\Url;
use yii\helpers\ArrayHelper;
use yii\grid\GridView;
use common\modules\content\models\CoCategory;
/* @var $this yii\web\View */
/* @var $searchModel common\modules\content\models\SearchCoContent */
......@@ -18,7 +20,7 @@ use yii\grid\GridView;
<?= \common\components\zii\AdminGrid::widget([
'dataProvider' => $dataProvider,
//'filterModel' => $searchModel,
'filterModel' => $searchModel,
'columns' => [
// 'name',
//'url:url',
......@@ -31,6 +33,7 @@ use yii\grid\GridView;
],
[
'attribute' => 'category_id',
'filter' => ArrayHelper::map(CoCategory::find()->all(), 'id', 'name'),
'format' => 'text',
'value' => function($data) {
if(!empty($data->category))
......
......@@ -3,14 +3,14 @@
namespace common\modules\faq\models;
use Yii;
use \common\components\validators\TransliterateValidator;
use yii\behaviors\TimestampBehavior;
use \yii\helpers\StringHelper;
use \common\models\MetaTags;
use yii\helpers\Url;
use yii\db\Expression;
use himiklab\sitemap\behaviors\SitemapBehavior;
use \common\models\MetaTags;
use \common\components\validators\TransliterateValidator;
/**
* This is the model class for table "faq".
*
......@@ -44,23 +44,6 @@ class Faq extends \common\components\ActiveRecordModel
'meta' => [
'class' => 'common\components\activeRecordBehaviors\MetaTagBehavior',
],
'sitemap' => [
'class' => SitemapBehavior::className(),
'scope' => function ($model) {
/** @var \yii\db\ActiveQuery $model */
$model->select(['url', 'updated_at']);
// $model->andWhere(['is_deleted' => 0]);
},
'dataClosure' => function ($model) {
/** @var self $model */
return [
'loc' => Url::to($model->url, true),
'lastmod' => date('c', $model->updated_at),
'changefreq' => SitemapBehavior::CHANGEFREQ_DAILY,
'priority' => 0.8
];
}
],
'timestamp' => [
'class' => TimestampBehavior::className(),
'createdAtAttribute' => 'created_at',
......
......@@ -21,7 +21,7 @@ class Conditions {
*/
public static function init(){
// Переопределили переменную конфиг (чтобы в дальнейшем было проще обращатся)
self::$config = require(__DIR__.'\config\main.php');
self::$config = require(__DIR__.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'main.php');
// Сначала производится проверка всех классов условий на наличие необходимых констант и переменных
self::createConditions();
// Если до этого момента скрипт не остановился и не вернул ошибку, значит возвращаем экземпляр класса
......@@ -38,7 +38,7 @@ class Conditions {
// Перебираем все условия что указаны в конфиге
foreach(self::$config as $condition) {
// Если путь к классу указан, и файл по этому пути существует
if (isset($condition['class']) && file_exists(\Yii::getAlias('@mainRoot').DIRECTORY_SEPARATOR.$condition['class'].'.php')) {
if (isset($condition['class']) && file_exists(\Yii::getAlias('@mainRoot').DIRECTORY_SEPARATOR.str_replace('\\', DIRECTORY_SEPARATOR, $condition['class']).'.php')) {
// Занесли класс в переменную
$class = $condition['class']::init();
// Проверяем наличие обязательных констант
......
......@@ -30,7 +30,8 @@ class TriggerAdminController extends AdminController {
'Getconditionhtml' => 'Получаем html блок с условием',
'Getandconditionhtml' => 'Получаем html новой строки с условиями',
'Testing' => 'Testing page'
'Testing' => 'Testing page',
'Getresult' => 'Testing page',
];
}
......@@ -50,6 +51,12 @@ class TriggerAdminController extends AdminController {
);
}
public function actionGetresult($id){
$obj=new \UnisenderAPI();
$result = $obj->getVisitedLinks($id);
var_dump($result);
}
/**
* @return string
*/
......
......@@ -93,10 +93,10 @@ class TriggerTrigger extends \common\components\ActiveRecordModel
// Тут добавляем кнопки управления
if (count($this->conditions)>0) {
foreach($this->conditions as $condition_array) {
$table .= self::getControlButtons($condition_array);
$table .= Conditions::getControlButtons($condition_array);
}
} else
$table .= self::getControlButtons();
$table .= Conditions::getControlButtons();
$table .= '</tbody>';
// Формируем футер
$table .= '<tfoot>';
......
<?php
use \common\components\UnisenderAPI;
use \yii\helpers\Json;
$email = 'bystrov@kupitsite.ru';
$sender = new UnisenderAPI();
// Create the send list
$newListId = $sender->createList();
// Subscribe user to new List
$sender->subscribe(['list_ids' => $newListId, 'fields' => ['email' => $email]]);
// Create new message
$newMessageId=$sender->createEmailMessage('bystrov', $email, 'Testing Subject', 'Testing Body', $newListId);
// Create new campaign
$newCampaign = $sender->createCampaign($newMessageId);
$newList = $sender->createList();
$newListObject=Json::decode($newList);
if (array_key_exists('result', $newListObject) && array_key_exists('id', $newListObject['result'])) {
$newListId=$newListObject['result']['id'];
// Subscribe user to new List
$sender->subscribe(['list_ids' => $newListId, 'fields' => ['email' => $email]]);
// Create new message
$newMessageId=$sender->createEmailMessage('bystrov', $email, 'Testing Subject', 'Testing Body <br><a href="http://www.google.com/">Testing link</a>', $newListId);
// Create new campaign
$newCampaign = $sender->createCampaign($newMessageId);
}
echo 'Рассылка: '.((isset($newCampaign)) ? $newCampaign : 'Not found');
echo '<br>';
echo 'Список: '.((isset($newListId)) ? $newListId : 'Not found');
echo '<br>';
echo 'Сообщение: '.((isset($newMessageId)) ? $newMessageId : 'Not found');
\ No newline at end of file
......@@ -410,13 +410,13 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
public function getRole()
{
$auth = AuthItem::find()->joinWith('assignment', true)
->andWhere(['rule_name' => 'group'])
->andWhere(['auth_assignment.user_id' => $this->id])
->one();
return $auth->name;
/*$assigment = AuthAssignment::find(['userid' => $this->id])->one();
// $auth = AuthItem::find()->joinWith('assignment', true)
// ->andWhere(['rule_name' => 'group'])
// ->andWhere(['auth_assignment.user_id' => $this->id])
// ->one();
//
// return $auth->name;
$assigment = AuthAssignment::find(['userid' => $this->id])->one();
if (!$assigment)
{
$assigment = new AuthAssignment();
......@@ -426,7 +426,7 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
}
return $assigment->role;
return 'admin';*/
return 'admin';
}
public function getRoleName()
......
<?php
use yii\db\Schema;
use yii\db\Migration;
class m160205_084445_addcolumn_bids extends Migration
{
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
$this->addColumn('bids', 'form', Schema::TYPE_STRING . '(50) DEFAULT NULL');
}
public function safeDown()
{
$this->dropColumn('bids', 'form');
}
}
<?php
use yii\db\Schema;
use yii\db\Migration;
class m160205_104801_add_column_co_content extends Migration
{
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
$this->addColumn('co_content', 'priority', "FLOAT( 3, 1 ) DEFAULT '0.8' AFTER url");
}
public function safeDown()
{
$this->dropColumn('co_content', 'priority');
}
}
<?php
use yii\db\Migration;
use yii\db\Schema;
class m160205_131239_add_new_column_to_trigger_schedule extends Migration
{
public function safeUp()
{
$this->addColumn(
'trigger_schedule',
'list_id',
Schema::TYPE_INTEGER.' DEFAULT NULL'
);
}
public function safeDown()
{
$this->dropColumn(
'trigger_schedule',
'list_id'
);
}
}
......@@ -27,36 +27,21 @@ return [
'class' => 'himiklab\sitemap\Sitemap',
'models' => [
// your models
'common\modules\faq\models\Faq',
'common\modules\content\models\CoContent',
],
'urls'=> [
// your additional urls
[
'loc' => '/faq',
'changefreq' => \himiklab\sitemap\behaviors\SitemapBehavior::CHANGEFREQ_DAILY,
'priority' => 0.8,
'faq' => [
'publication' => [
'name' => 'Вопрос-Ответ',
'language' => 'ru',
],
// 'access' => 'Subscription',
// 'genres' => 'Blog, UserGenerated',
// 'publication_date' => 'YYYY-MM-DDThh:mm:ssTZD',
// 'title' => 'Example Title',
// 'keywords' => 'example, keywords, comma-separated',
// 'stock_tickers' => 'NASDAQ:A, NASDAQ:B',
],
// 'images' => [
// [
// 'loc' => 'http://example.com/image.jpg',
// 'caption' => 'This is an example of a caption of an image',
// 'geo_location' => 'City, State',
// 'title' => 'Example image',
// 'license' => 'http://example.com/license',
// ],
// ],
],
// // your additional urls
// [
// 'loc' => '/faq',
// 'changefreq' => \himiklab\sitemap\behaviors\SitemapBehavior::CHANGEFREQ_DAILY,
// 'priority' => 0.8,
// 'faq' => [
// 'publication' => [
// 'name' => 'Вопрос-Ответ',
// 'language' => 'ru',
// ],
// ],
// ],
],
'enableGzip' => true, // default is false
'cacheExpire' => 1, // 1 second. Default is 24 hours
......
......@@ -22,7 +22,9 @@ use common\modules\bids\models\Bid;
],
]); ?>
<?php echo Html::hiddenInput('scenario', $model->scenario); ?>
<?php echo Html::hiddenInput('scenario', $model->scenario, ['class' => 'not_clear']); ?>
<?php echo Html::hiddenInput('Bid[form]', Bid::FORM_CALLBACK, ['class' => 'not_clear']); ?>
<?php echo $form->field($model, 'name', [
'template' => '<div class="row"><div class="col-sm-4">{input}</div></div>',
......
<?php
use yii\widgets\ActiveForm;
use yii\helpers\Html;
use common\modules\bids\models\Bid;
?>
<div class="row">
<div class="col-md-12 col-xs-12 col-sm-12">
<div class="keys_send_mail">
<p>Процесс создания кейса очень трудоемкий.Поэтому мы занимаемся созданием кейсов свободное от работы время. Подпишитесь, чтобы следить за обновлениями.</p>
<form class="keys_mail_form">
<input type="email" placeholder="E-mail*" class="field-input required email"></input>
<button class="save-button">Подписаться</button>
</form>
<div class="send_secce">Вы успешно подписались на обновление раздела «Кейсы». Нам приятно, что вы следите за нашим развитием :-)</div>
<?php
$model = new Bid;
$model->scenario = Bid::SCENARIO_SUBSCRIBE;
$form = ActiveForm::begin([
'action' => '/',
'options' => [
'class' => 'keys_mail_form bids-form',
],
]); ?>
<?php echo Html::hiddenInput('scenario', $model->scenario, ['class' => 'not_clear']); ?>
<?php echo Html::hiddenInput('Bid[form]', Bid::FORM_SUBSCRIBE, ['class' => 'not_clear']); ?>
<?php echo $form->field($model, 'email', [
'template' => '<div class="row"><div class="col-sm-4">{input}</div></div>',
'errorOptions' => []
])->textInput([
'placeholder' => 'E-mail*'
]); ?>
<?php echo Html::submitButton('Подписаться', ['class' => 'save-button']); ?>
<?php ActiveForm::end(); ?>
<div class="send_secce" style="display:none;">Вы успешно подписались на обновление раздела «Кейсы». Нам приятно, что вы следите за нашим развитием :-)</div>
</div>
</div>
</div>
\ No newline at end of file
<?php
use common\models\Settings;
?>
<ul class="social_link">
<?php $s = Settings::getValue('social-link-vk'); if($s): ?><li><a href="<?=$s?>" class="soc_item"><i class="fa fa-vk"></i></a></li><? endif; ?>
<?php $s = Settings::getValue('social-link-fb'); if($s): ?><li><a href="<?=$s?>" class="soc_item"><i class="fbicon"></i></a></li><? endif; ?>
<?php $s = Settings::getValue('social-link-youtube'); if($s): ?><li><a href="<?=$s?>" class="soc_item"><i class="fa fa-youtube"></i></a></li><? endif; ?>
<?php $s = Settings::getValue('social-link-instagram'); if($s): ?><li><a href="<?=$s?>" class="soc_item"><i class="fa fa-instagram"></i></a></li><? endif; ?>
<?php $s = Settings::getValue('social-link-twitter'); if($s): ?><li><a href="<?=$s?>" class="soc_item"><i class="fa fa-twitter"></i></a></li><? endif; ?>
<?php $s = Settings::getValue('social-link-google'); if($s): ?><li><a href="<?=$s?>" class="soc_item"><i class="gplusicon"></i></a></li><? endif; ?>
</ul>
\ No newline at end of file
......@@ -28,7 +28,9 @@ use common\modules\bids\models\Bid;
],
]); ?>
<?php echo Html::hiddenInput('scenario', $model->scenario); ?>
<?php echo Html::hiddenInput('scenario', $model->scenario, ['class' => 'not_clear']); ?>
<?php echo Html::hiddenInput('Bid[form]', Bid::FORM_PROJECT, ['class' => 'not_clear']); ?>
<?php echo $form->field($model, 'name', [
'template' => '<div class="row"><div class="col-sm-4">{input}</div></div>',
......@@ -98,14 +100,9 @@ use common\modules\bids\models\Bid;
</div>
</div>
<div class="col-md-6 col-xs-6 col-sm-12">
<ul class="social_link">
<li><a href="#" class="soc_item"><i class="fa fa-vk"></i></a></li>
<li><a href="#" class="soc_item"><i class="fbicon"></i></a></li>
<li><a href="#" class="soc_item"><i class="fa fa-youtube"></i></a></li>
<li><a href="#" class="soc_item"><i class="fa fa-instagram"></i></a></li>
<li><a href="#" class="soc_item"><i class="fa fa-twitter"></i></a></li>
<li><a href="#" class="soc_item"><i class="gplusicon"></i></a></li>
</ul>
<?php echo $this->render('block/social'); ?>
</div>
<div class="col-md-3 col-xs-3 col-sm-12">
<div class="taskon"><img src="/images/taskon.png" height="31" width="100" alt=""></div>
......
......@@ -18,14 +18,9 @@
</div>
</div>
<div class="col-md-6 col-xs-6 col-sm-12">
<ul class="social_link">
<li><a href="#" class="soc_item"><i class="fa fa-vk"></i></a></li>
<li><a href="#" class="soc_item"><i class="fbicon"></i></a></li>
<li><a href="#" class="soc_item"><i class="fa fa-youtube"></i></a></li>
<li><a href="#" class="soc_item"><i class="fa fa-instagram"></i></a></li>
<li><a href="#" class="soc_item"><i class="fa fa-twitter"></i></a></li>
<li><a href="#" class="soc_item"><i class="gplusicon"></i></a></li>
</ul>
<?php echo $this->render('block/social'); ?>
</div>
<div class="col-md-3 col-xs-3 col-sm-12">
<div class="taskon"><img src="/images/taskon.png" height="31" width="100" alt=""></div>
......
......@@ -11,7 +11,7 @@ use common\modules\languages\widgets\Languages;
<div class="phone_menu"><?=\common\models\Settings::getValue('content-phone')?></div>
<ul>
<li><?=Html::a(\Yii::t('menu', 'About'), ['/about']);?></li>
<li><?=Html::a(\Yii::t('menu', 'Portfolio'), ['/case']);?></li>
<li><?=Html::a(\Yii::t('menu', 'Portfolio'), ['/portfolio']);?></li>
<li><?=Html::a(\Yii::t('menu', 'Blog'), ['/#']);?></li>
<!-- <li><?=Html::a(\Yii::t('menu', 'Analytics school'), ['/school']);?></li> -->
<li><?=Html::a(\Yii::t('menu', 'Contacts'), ['/contacts']);?></li>
......@@ -30,7 +30,7 @@ use common\modules\languages\widgets\Languages;
<nav class="top_nav clearfix">
<ul>
<li><?=Html::a(\Yii::t('menu', 'About'), ['/about']);?></li>
<li><?=Html::a(\Yii::t('menu', 'Portfolio'), ['/case']);?></li>
<li><?=Html::a(\Yii::t('menu', 'Portfolio'), ['/portfolio']);?></li>
<li><?=Html::a(\Yii::t('menu', 'Blog'), ['/#']);?></li>
<!-- <li><?=Html::a(\Yii::t('menu', 'Analytics school'), ['/school']);?></li> -->
<li><?=Html::a(\Yii::t('menu', 'Contacts'), ['/contacts']);?></li>
......
......@@ -92,7 +92,9 @@ use \common\modules\bids\models\Bid;
],
]); ?>
<?php echo Html::hiddenInput('scenario', $model->scenario); ?>
<?php echo Html::hiddenInput('scenario', $model->scenario, ['class' => 'not_clear']); ?>
<?php echo Html::hiddenInput('Bid[form]', Bid::FORM_MESSAGE, ['class' => 'not_clear']); ?>
<?php echo $form->field($model, 'name', [
'template' => '<div class="row"><div class="col-sm-4">{input}</div></div>',
......
......@@ -34,7 +34,8 @@ $('form.bids-form').on('beforeSubmit', function(e) {
if(response.success)
{
form.find('input[name!="scenario"], textarea').val('');
form.find('input:not(.not_clear), textarea').val('');
$('.send_secce').show();
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment