Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zuiketang
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
zuiketang
Commits
bae9eb62
Commit
bae9eb62
authored
Nov 01, 2016
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改提交课堂申请后的提示文字,并自动跳转
parent
be66c8fb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
5 deletions
+18
-5
ClassesInfoController.php
src/frontend/controllers/ClassesInfoController.php
+5
-1
success.php
src/frontend/views/site/success.php
+13
-4
No files found.
src/frontend/controllers/ClassesInfoController.php
View file @
bae9eb62
...
@@ -90,7 +90,11 @@ class ClassesInfoController extends \yii\web\Controller
...
@@ -90,7 +90,11 @@ class ClassesInfoController extends \yii\web\Controller
if
(
!
$agreement
)
{
if
(
!
$agreement
)
{
$model
->
addError
(
'agreement'
,
'必须同意使用协议'
);
$model
->
addError
(
'agreement'
,
'必须同意使用协议'
);
}
elseif
(
$model
->
validate
()
&&
$model
->
save
())
{
}
elseif
(
$model
->
validate
()
&&
$model
->
save
())
{
return
$this
->
render
(
'@app/views/site/success'
,
[
'message'
=>
'您已成功提交课堂申请,我们将尽快为您审核通过。'
]);
return
$this
->
render
(
'@app/views/site/success'
,
[
'message'
=>
'您已成功提交课堂申请,审核结果将以短信形式通知您。'
,
'redirect'
=>
\yii\helpers\Url
::
to
([
'/user-center/info'
]),
'timer'
=>
'2500'
]);
}
}
}
}
...
...
src/frontend/views/site/success.php
View file @
bae9eb62
<?php
<?php
/**
/**
* Created by PhpStorm.
* @var $message string
* User: pader
* @var $redirect string
* Date: 2016/10/20
* @var $timer int
* Time: 19:02
*/
*/
use
frontend\assets\AppAsset
;
use
frontend\assets\AppAsset
;
...
@@ -46,6 +45,16 @@ body{
...
@@ -46,6 +45,16 @@ body{
}
}
CSS;
CSS;
if
(
!
empty
(
$redirect
))
{
$jumpJs
=
<<<EOD
setTimeout(function() {
location.href = "$redirect";
}, $timer);
EOD;
$this
->
registerJs
(
$jumpJs
);
}
$this
->
registerCss
(
$css
);
$this
->
registerCss
(
$css
);
$this
->
title
=
'提示'
;
$this
->
title
=
'提示'
;
?>
?>
...
...
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