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
68a9ed2a
Commit
68a9ed2a
authored
Feb 10, 2016
by
Виталий Мурашко
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes
parent
7c426cbc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
8 deletions
+27
-8
common/models/LoginForm.php
common/models/LoginForm.php
+18
-0
common/modules/school/views/course/index.php
common/modules/school/views/course/index.php
+2
-2
common/modules/users/models/User.php
common/modules/users/models/User.php
+1
-1
frontend/web/css/screen.css
frontend/web/css/screen.css
+1
-1
frontend/web/js/common.js
frontend/web/js/common.js
+5
-4
No files found.
common/models/LoginForm.php
View file @
68a9ed2a
...
...
@@ -32,6 +32,7 @@ class LoginForm extends Model
[
'phone'
,
'safe'
],
// password is validated by validatePassword()
[
'password'
,
'validatePassword'
],
[
'username'
,
'validateStatus'
],
];
}
...
...
@@ -52,6 +53,23 @@ class LoginForm extends Model
}
}
/**
* Validates the status.
* This method serves as the inline validation for status.
*
* @param string $attribute the attribute currently being validated
* @param array $params the additional name-value pairs given in the rule
*/
public
function
validateStatus
(
$attribute
,
$params
)
{
if
(
!
$this
->
hasErrors
())
{
$user
=
$this
->
getUser
();
if
(
$user
->
status
!=
User
::
STATUS_ACTIVE
)
{
$this
->
addError
(
$attribute
,
'Пожалуйста, активируйте свой аккаунт.'
);
}
}
}
/**
* Logs in a user using the provided username and password.
*
...
...
common/modules/school/views/course/index.php
View file @
68a9ed2a
...
...
@@ -97,7 +97,7 @@
<div
class=
"row"
>
<div
class=
"col-md-3 col-xs-3 col-sm-12"
>
<div
class=
"foot_logo"
>
<img
src=
"images/foot_logo.png"
height=
"51"
width=
"192"
alt=
""
>
<img
src=
"
/
images/foot_logo.png"
height=
"51"
width=
"192"
alt=
""
>
</div>
</div>
<div
class=
"col-md-6 col-xs-6 col-sm-12"
>
...
...
@@ -111,7 +111,7 @@
</ul>
</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>
<div
class=
"taskon"
><img
src=
"
/
images/taskon.png"
height=
"31"
width=
"100"
alt=
""
></div>
<div
class=
"copyring"
>
Powered by Taskon
<br>
Собственная разработка Арт Проект
</div>
</div>
</div>
...
...
common/modules/users/models/User.php
View file @
68a9ed2a
...
...
@@ -247,7 +247,7 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
*/
public
static
function
findByUsername
(
$username
)
{
return
static
::
findOne
([
'email'
=>
$username
,
'status'
=>
self
::
STATUS_ACTIVE
]);
return
static
::
findOne
([
'email'
=>
$username
/*, 'status' => self::STATUS_ACTIVE*/
]);
}
/**
...
...
frontend/web/css/screen.css
View file @
68a9ed2a
...
...
@@ -11473,7 +11473,7 @@ h6 {
color
:
#698387
;
font-size
:
14px
;
}
a
.submit_form_reg
,
a
.submit_form_reg_popup
{
a
.submit_form_reg
,
a
.submit_form_reg_popup
,
a
.submit_form_login
,
a
.submit_form_login_popup
{
text-decoration
:
none
;
}
.errors-reg
,
.errors-reg_popup
,
.errors_login
,
.errors_login_popup
{
...
...
frontend/web/js/common.js
View file @
68a9ed2a
...
...
@@ -621,27 +621,24 @@ $(document).ready(function() {
// bind to the form's submit event
$
(
'
#login_form_popup
'
).
submit
(
function
()
{
$
(
'
.errors_login_popup
'
).
append
(
''
);
$
(
this
).
ajaxSubmit
(
optionsLoginPopup
);
return
false
;
});
// bind to the form's submit event
$
(
'
#login_form
'
).
submit
(
function
()
{
$
(
'
.errors_login
'
).
append
(
''
);
$
(
'
.errors_login
'
).
html
(
''
);
$
(
this
).
ajaxSubmit
(
optionsLogin
);
return
false
;
});
// bind to the form's submit event
$
(
'
#sh_reg_form
'
).
submit
(
function
()
{
$
(
'
.errors-reg
'
).
append
(
''
);
$
(
this
).
ajaxSubmit
(
options
);
return
false
;
});
// bind to the form's submit event
$
(
'
#reg_form_popup
'
).
submit
(
function
()
{
$
(
'
.errors-reg_popup
'
).
append
(
''
);
$
(
this
).
ajaxSubmit
(
optionsPopup
);
return
false
;
});
...
...
@@ -696,6 +693,7 @@ function showRequest(formData, jqForm, options) {
// post-submit callback
function
showResponse
(
responseText
,
statusText
,
xhr
,
$form
)
{
$
(
'
.errors-reg
'
).
html
(
''
);
if
(
responseText
.
errors
){
$
.
each
(
responseText
.
errors
,
function
(
key
,
value
)
{
$
(
'
.errors-reg
'
).
append
(
value
+
'
<br>
'
);
...
...
@@ -708,6 +706,7 @@ function showResponse(responseText, statusText, xhr, $form) {
}
// post-submit callback
function
showResponsePopup
(
responseText
,
statusText
,
xhr
,
$form
)
{
$
(
'
.errors-reg_popup
'
).
html
(
''
);
if
(
responseText
.
errors
){
$
.
each
(
responseText
.
errors
,
function
(
key
,
value
)
{
$
(
'
.errors-reg_popup
'
).
append
(
value
+
'
<br>
'
);
...
...
@@ -721,6 +720,7 @@ function showResponsePopup(responseText, statusText, xhr, $form) {
}
// post-submit callback
function
showResponseLogin
(
responseText
,
statusText
,
xhr
,
$form
)
{
$
(
'
.errors_login
'
).
html
(
''
);
if
(
responseText
.
errors
){
$
.
each
(
responseText
.
errors
,
function
(
key
,
value
)
{
$
(
'
.errors_login
'
).
append
(
value
+
'
<br>
'
);
...
...
@@ -731,6 +731,7 @@ function showResponseLogin(responseText, statusText, xhr, $form) {
// post-submit callback
function
showResponseLoginPopup
(
responseText
,
statusText
,
xhr
,
$form
)
{
$
(
'
.errors_login_popup
'
).
html
(
''
);
if
(
responseText
.
errors
){
$
.
each
(
responseText
.
errors
,
function
(
key
,
value
)
{
$
(
'
.errors_login_popup
'
).
append
(
value
+
'
<br>
'
);
...
...
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