Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taskonsite-архив-перенесен
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Korolev
taskonsite-архив-перенесен
Commits
31649926
Commit
31649926
authored
Feb 17, 2016
by
Олег Гиммельшпах
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#958 - Активировать формы обратной связи на сайте.
parent
84304dec
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
7 deletions
+22
-7
common/modules/bids/models/Bid.php
common/modules/bids/models/Bid.php
+1
-0
common/modules/content/models/CoContentLang.php
common/modules/content/models/CoContentLang.php
+1
-1
frontend/views/layouts/block/callback.php
frontend/views/layouts/block/callback.php
+6
-1
frontend/views/layouts/block/case-more.php
frontend/views/layouts/block/case-more.php
+6
-1
frontend/views/layouts/head.php
frontend/views/layouts/head.php
+1
-1
frontend/views/site/contacts.php
frontend/views/site/contacts.php
+6
-2
frontend/web/js/bids-form.js
frontend/web/js/bids-form.js
+1
-1
No files found.
common/modules/bids/models/Bid.php
View file @
31649926
...
...
@@ -27,6 +27,7 @@ class Bid extends \common\components\ActiveRecordModel
const
FORM_MESSAGE
=
'message'
;
const
TAG_INVOLVEMENT
=
'Вовлечение'
;
const
TAG_TREATMENT
=
'Обращение'
;
const
FILE_FOLDER
=
'/uploads/bids/'
;
...
...
common/modules/content/models/CoContentLang.php
View file @
31649926
...
...
@@ -136,7 +136,7 @@ class CoContentLang extends \common\components\ActiveRecordModel
$arrWhatReplaceNext
[]
=
'[projects]'
;
$arrReplaceNext
[]
=
CoBlocks
::
printStaticBlock
(
'projects'
);
$arrWhatReplaceNext
[]
=
'[case-subscribe]'
;
$arrReplaceNext
[]
=
CoBlocks
::
printStaticBlock
(
'case-subscribe'
);
$arrReplaceNext
[]
=
CoBlocks
::
printStaticBlock
(
'case-subscribe'
,
[
'title'
=>
$this
->
title
]
);
$arrWhatReplaceNext
[]
=
'[case-more]'
;
$arrReplaceNext
[]
=
CoBlocks
::
printStaticBlock
(
'case-more'
,
[
'model'
=>
$this
->
content
]);
$arrWhatReplaceNext
[]
=
'[footer]'
;
...
...
frontend/views/layouts/block/callback.php
View file @
31649926
...
...
@@ -14,17 +14,22 @@ use common\modules\bids\models\Bid;
<?php
$model
=
new
Bid
;
$model
->
scenario
=
Bid
::
SCENARIO_CALLBACK
;
$model
->
form
=
Bid
::
FORM_CALLBACK
;
$form
=
ActiveForm
::
begin
([
'action'
=>
'/'
,
'enableClientValidation'
=>
false
,
'options'
=>
[
'class'
=>
'valid_form bids-form'
,
'data-title'
=>
'Заказать звонок'
,
'data-form'
=>
'Заказать звонок'
,
'data-tag'
=>
Bid
::
TAG_TREATMENT
],
]);
?>
<?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
,
'form'
,
[
'template'
=>
'{input}'
])
->
hiddenInput
(
[
'class'
=>
'not_clear'
]);
?>
<?php
echo
$form
->
field
(
$model
,
'name'
,
[
'template'
=>
'<div class="row"><div class="col-sm-4">{input}</div></div>'
,
...
...
frontend/views/layouts/block/case-more.php
View file @
31649926
...
...
@@ -45,17 +45,22 @@ $more = CoContent::find()
<?php
$model
=
new
Bid
;
$model
->
scenario
=
Bid
::
SCENARIO_SUBSCRIBE
;
$model
->
form
=
Bid
::
FORM_SUBSCRIBE
;
$form
=
ActiveForm
::
begin
([
'action'
=>
'/'
,
'enableClientValidation'
=>
false
,
'options'
=>
[
'class'
=>
'subsc_form bids-form'
,
'data-title'
=>
'Кейс: '
.
$title
,
'data-form'
=>
'Подписаться на обновление'
,
'data-tag'
=>
Bid
::
TAG_INVOLVEMENT
],
]);
?>
<?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
,
'form'
,
[
'template'
=>
'{input}'
])
->
hiddenInput
(
[
'class'
=>
'not_clear'
]);
?>
<?php
echo
$form
->
field
(
$model
,
'email'
,
[
'template'
=>
'<div class="row"><div class="col-sm-4">{input}</div></div>'
,
...
...
frontend/views/layouts/head.php
View file @
31649926
...
...
@@ -2,7 +2,7 @@
use
common\modules\languages\models\Languages
;
$langs
=
Languages
::
find
()
->
all
();
$langs
=
Languages
::
find
()
->
where
([
'!='
,
'id'
,
Languages
::
getCurrent
()
->
id
])
->
all
();
?>
<meta
name=
"title"
content=
"
<?php
echo
\Yii
::
$app
->
controller
->
meta_title
?>
"
>
...
...
frontend/views/site/contacts.php
View file @
31649926
...
...
@@ -82,19 +82,23 @@ use \common\modules\bids\models\Bid;
<?php
$model
=
new
Bid
;
$model
->
scenario
=
Bid
::
SCENARIO_CALLBACK
;
$model
->
form
=
Bid
::
FORM_MESSAGE
;
$form
=
ActiveForm
::
begin
([
'id'
=>
'form_foot'
,
'action'
=>
'/'
,
'enableClientValidation'
=>
false
,
'options'
=>
[
'class'
=>
'sect_cont_form bids-form'
,
'enctype'
=>
'multipart/form-data'
'data-title'
=>
'Отправить сообщение с сайта'
,
'data-form'
=>
'Отправить сообщение с сайта'
,
'data-tag'
=>
Bid
::
TAG_TREATMENT
],
]);
?>
<?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
,
'form'
,
[
'template'
=>
'{input}'
])
->
hiddenInput
(
[
'class'
=>
'not_clear'
]);
?>
<?php
echo
$form
->
field
(
$model
,
'name'
,
[
'template'
=>
'<div class="row"><div class="col-sm-4">{input}</div></div>'
,
...
...
frontend/web/js/bids-form.js
View file @
31649926
...
...
@@ -50,7 +50,7 @@ $('form.bids-form').on('beforeSubmit', function(e) {
{
errors
=
[];
$
.
each
(
response
,
function
(
key
,
value
)
{
$
(
'
.field-
'
+
key
).
addClass
(
'
has-error
'
);
form
.
find
(
'
.field-
'
+
key
).
addClass
(
'
has-error
'
);
errors
=
errors
.
concat
(
value
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment