Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e12eaf66
authored
May 25, 2017
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
issue
#244
fixed
parent
c38782c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
sails/src/assets/scripts/modules/login/controllers/signin.js
sails/src/assets/scripts/modules/login/views/signin.html
sails/src/assets/scripts/modules/login/controllers/signin.js
View file @
e12eaf66
...
...
@@ -41,7 +41,7 @@ function SignInCtrl($scope,
email
:
''
,
logoUrl
:
''
},
office_idx
:
-
1
id_off
:
-
1
};
};
...
...
@@ -92,7 +92,12 @@ function SignInCtrl($scope,
return
;
}
if
(
$scope
.
formdata
.
role
==
'therapist_nooffice'
&&
$scope
.
formdata
.
office
.
country
==
'00'
)
{
if
((
$scope
.
formdata
.
role
==
'therapist_office'
||
$scope
.
formdata
.
role
==
'tutor_office'
)
&&
$scope
.
formdata
.
id_off
==
-
1
)
{
ngToast
.
danger
({
content
:
$translate
.
instant
(
'select_office'
)
});
return
;
}
if
(
$scope
.
formdata
.
role
==
'therapist_nooffice'
&&
$scope
.
formdata
.
office
.
country
==
'00'
)
{
ngToast
.
danger
({
content
:
$translate
.
instant
(
'country_office_requested'
)
});
return
;
}
...
...
@@ -112,10 +117,8 @@ function SignInCtrl($scope,
$scope
.
showdialog
=
true
;
if
(
$scope
.
formdata
.
office_idx
!=
-
1
)
{
$scope
.
formdata
.
id_off
=
$scope
.
offices
[
$scope
.
formdata
.
office_idx
].
id
;
delete
$scope
.
formdata
.
office_idx
;
}
if
(
$scope
.
formdata
.
id_off
==
-
1
)
delete
$scope
.
formdata
.
id_off
;
if
(
$scope
.
formdata
.
role
===
'tutor_nooffice'
)
{
$scope
.
formdata
.
office
.
name
=
'no_office'
;
...
...
sails/src/assets/scripts/modules/login/views/signin.html
View file @
e12eaf66
...
...
@@ -223,9 +223,9 @@
<div
class=
"form-group"
id=
"office_selection"
>
<legend
translate
>
office_center
</legend>
<select
class=
"form-control"
ng-model=
"formdata.
office_idx
"
ng-required=
"formdata.role == 'therapist_office' || formdata.role == 'tutor_office'"
>
<select
class=
"form-control"
ng-model=
"formdata.
id_off
"
ng-required=
"formdata.role == 'therapist_office' || formdata.role == 'tutor_office'"
>
<option
selected
disabled
hidden
value=
"-1"
>
{{ 'select_office' | translate }}
</option>
<option
ng-repeat=
"office in offices | orderBy: 'name' track by
$index"
ng-value=
"$index
"
>
{{ office.name }}
</option>
<option
ng-repeat=
"office in offices | orderBy: 'name' track by
office.id"
ng-value=
"office.id
"
>
{{ office.name }}
</option>
</select>
</div>
...
...
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