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
93039ca9
authored
May 02, 2017
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fixed duplicated pictos (now it is possible)
parent
b5d0af59
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
12 deletions
sails/src/api/controllers/StudentController.js
sails/src/assets/scripts/modules/student/views/setup.html
sails/src/assets/scripts/modules/supervisor/views/students_add.html
sails/src/api/controllers/StudentController.js
View file @
93039ca9
...
...
@@ -883,16 +883,7 @@ module.exports = {
add_picto
:
function
(
req
,
res
)
{
var
params
=
req
.
allParams
();
StuPicto
.
find
({
id_pic
:
params
.
id_picto
,
id_stu
:
params
.
id_stu
})
.
then
((
entries
)
=>
{
if
(
entries
&&
entries
.
length
>
0
)
{
var
err
=
new
Error
(
"Picto already in student's vocabulary"
);
err
.
code
=
sails
.
config
.
pictogram
.
error_codes
.
DUPLICATED_PICTO
;
throw
err
;
}
return
Student
.
findOne
({
id
:
params
.
id_stu
});
})
Student
.
findOne
({
id
:
params
.
id_stu
})
.
then
((
student
)
=>
{
if
(
!
student
)
{
sails
.
log
.
error
(
`Student
${
params
.
id_stu
}
not found`
);
...
...
sails/src/assets/scripts/modules/student/views/setup.html
View file @
93039ca9
...
...
@@ -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 @
93039ca9
...
...
@@ -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