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
119473be
authored
Apr 11, 2017
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
issues with license mask and null in logo_url fixed
parent
6d46926f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
5 deletions
sails/src/api/controllers/OfficeController.js
sails/src/api/controllers/StudentController.js
sails/src/api/models/Office.js
sails/src/assets/scripts/modules/student/views/setup.html
sails/src/assets/scripts/modules/supervisor/views/students_add.html
sails/src/api/controllers/OfficeController.js
View file @
119473be
...
...
@@ -58,7 +58,7 @@ module.exports = {
Office
.
findOne
({
id
:
id
}).
populate
(
'admin'
).
then
(
function
(
office
)
{
if
(
office
)
{
res
.
ok
({
logo_url
:
office
.
logo_url
,
name
:
office
.
name
});
res
.
ok
({
logo_url
:
office
.
logo_url
||
'/app/img/logo_pictogram.png'
,
name
:
office
.
name
});
}
else
{
res
.
notFound
();
}
...
...
sails/src/api/controllers/StudentController.js
View file @
119473be
...
...
@@ -442,7 +442,7 @@ module.exports = {
// update supervisor office if it is linked as therapist
Supervisor
.
findOne
({
id
:
req
.
param
(
'id_sup'
)})
.
then
((
sup
)
=>
{
if
(
sup
)
{
if
(
sup
&&
!
sup
.
office
)
{
Student
.
findOne
({
id
:
req
.
param
(
'id_stu'
)})
.
then
((
stu
)
=>
{
if
(
stu
)
{
...
...
sails/src/api/models/Office.js
View file @
119473be
...
...
@@ -87,7 +87,11 @@ module.exports = {
students
:
{
collection
:
"Student"
,
via
:
'office'
}
},
toJSON
:
function
()
{
if
(
!
attrs
.
logoUrl
)
attrs
.
logoUrl
=
'/app/img/logo_pictogram.png'
;
}
},
beforeCreate
:
function
(
attrs
,
next
)
{
...
...
sails/src/assets/scripts/modules/student/views/setup.html
View file @
119473be
...
...
@@ -49,7 +49,7 @@
</div>
<div
class=
"form-group"
>
<label
translate
>
license_number
</label>
<input
type=
"text"
id=
"setup_license"
class=
"form-control"
mask=
"
9999-9999-9999-9999
"
clean=
"true"
placeholder=
"{{ 'license_number' | translate }}"
ng-model=
"formUser.license_number"
required
>
<input
type=
"text"
id=
"setup_license"
class=
"form-control"
mask=
"
wwww-wwww-wwww-wwww
"
clean=
"true"
placeholder=
"{{ 'license_number' | translate }}"
ng-model=
"formUser.license_number"
required
>
<div
ng-show=
"studentData.license && !studentData.license_expired"
class=
"alert alert-info"
role=
"alert"
>
<i
class=
"fa fa-info-circle"
aria-hidden=
"true"
></i>
{{ 'license_expires' | translate }} {{ studentData.expiration_date }}
...
...
sails/src/assets/scripts/modules/supervisor/views/students_add.html
View file @
119473be
...
...
@@ -26,7 +26,7 @@
</div>
<div
class=
"form-group"
>
<input
class=
"form-control"
type=
"text"
id=
"student_license"
mask=
"
9999-9999-9999-9999
"
clean=
"true"
placeholder=
"{{ 'license_number' | translate }}"
ng-model=
"formdatastudent.license_number"
required
>
<input
class=
"form-control"
type=
"text"
id=
"student_license"
mask=
"
wwww-wwww-wwww-wwww
"
clean=
"true"
placeholder=
"{{ 'license_number' | translate }}"
ng-model=
"formdatastudent.license_number"
required
>
</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