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
4e2ac8b5
Commit
4e2ac8b5
authored
Apr 25, 2016
by
Shakarim Sapa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fix
parent
54b15339
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
19 deletions
+3
-19
common/modules/blog/controllers/BlogBidController.php
common/modules/blog/controllers/BlogBidController.php
+0
-6
common/modules/blog/views/post/_subscribe.php
common/modules/blog/views/post/_subscribe.php
+3
-13
No files found.
common/modules/blog/controllers/BlogBidController.php
View file @
4e2ac8b5
<?php
/**
* Created by PhpStorm.
* User: PHOENIX
* Date: 25.04.16
* Time: 21:01
*/
namespace
common\modules\blog\controllers
;
...
...
common/modules/blog/views/post/_subscribe.php
View file @
4e2ac8b5
...
...
@@ -56,16 +56,6 @@ if ($cacheEmail!==false && BlogBids::find()->where(['email' => $cacheEmail])->ex
$
(
'
form.blog-bid-form
'
).
on
(
'
beforeSubmit
'
,
function
(
e
)
{
var
form
=
$
(
this
),
xhr
=
new
XMLHttpRequest
,
filebool
=
false
,
file
,
data
=
new
FormData
();
form
.
find
(
'
input, textarea
'
).
each
(
function
(){
data
.
append
(
$
(
this
).
attr
(
'
name
'
),
$
(
this
).
val
());
});
if
(
form
.
find
(
'
input[type=file]
'
).
length
)
{
file
=
form
.
find
(
'
input[type=file]
'
)[
0
].
files
[
0
];
filebool
=
!
filebool
;
data
.
append
(
"
Bid[file]
"
,
file
);
}
xhr
.
open
(
"
POST
"
,
form
.
attr
(
'
action
'
),
true
);
xhr
.
setRequestHeader
(
"
X-Requested-With
"
,
"
XMLHttpRequest
"
);
...
...
@@ -84,7 +74,6 @@ if ($cacheEmail!==false && BlogBids::find()->where(['email' => $cacheEmail])->ex
if
(
response
.
success
)
{
if
(
form
.
find
(
'
.message-box.send_secce
'
).
length
>
0
)
{
console
.
log
(
'
asd
'
);
form
.
find
(
'
.message-box.send_secce
'
).
fadeIn
(
'
fast
'
);
form
.
find
(
'
.content
'
).
css
(
'
visibility
'
,
'
hidden
'
);
...
...
@@ -110,14 +99,15 @@ if ($cacheEmail!==false && BlogBids::find()->where(['email' => $cacheEmail])->ex
form
.
parent
(
'
div
'
).
fadeOut
(
500
);
},
1600
);
}
else
{
else
{
var
errors
=
[];
$
.
each
(
response
,
function
(
key
,
value
)
{
form
.
find
(
'
.field-
'
+
key
).
addClass
(
'
has-error
'
);
errors
=
errors
.
concat
(
value
);
});
console
.
log
(
errors
);
if
(
form
.
find
(
'
.message-box.send_err
'
).
length
>
0
)
{
form
.
find
(
'
.message-box.send_err
'
).
fadeIn
(
'
fast
'
);
...
...
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