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
df6eb0ed
authored
Feb 03, 2017
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
form ready
parent
e4e19f7b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
17 deletions
sails/roles/database/files/pictodb-schema.sql
sails/src/CHANGES.md
sails/src/assets/app/i18n/en-gb.json
sails/src/assets/app/i18n/es-es.json
sails/src/assets/scripts/modules/login/controllers/signin.js
sails/src/assets/scripts/modules/login/views/signin.html
sails/roles/database/files/pictodb-schema.sql
View file @
df6eb0ed
...
...
@@ -366,6 +366,7 @@ CREATE TABLE IF NOT EXISTS `supervisor` (
`gender`
char
(
1
)
COLLATE
utf8_unicode_ci
NOT
NULL
,
`pic`
varchar
(
255
)
COLLATE
utf8_unicode_ci
DEFAULT
'defaultAvatar.jpg'
,
`address`
varchar
(
180
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
`postal_code`
char
(
10
)
COLLATE
utf8_unicode_ci
NOT
NULL
,
`country`
varchar
(
2
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
`email`
varchar
(
80
)
COLLATE
utf8_unicode_ci
NOT
NULL
,
`phone`
varchar
(
20
)
COLLATE
utf8_unicode_ci
DEFAULT
NULL
,
...
...
sails/src/CHANGES.md
View file @
df6eb0ed
...
...
@@ -9,3 +9,7 @@ AngularJS
Database
-
reload trigers-enrolments-integrity-constraints.sql
-
alter table supervisor to add postal_code:
`alter table supervisor add column `
postal_code
` char(10) COLLATE utf8_unicode_ci NOT NULL;`
-
copy postal_code value from office to its supervisors
`update supervisor as sup inner join office as off on off.id = sup.id_off set sup.postal_code = off.postal_code;`
sails/src/assets/app/i18n/en-gb.json
View file @
df6eb0ed
...
...
@@ -63,6 +63,8 @@
"contact_person"
:
"Contact person"
,
"continue_session"
:
"Resume_session"
,
"country"
:
"Country"
,
"country_requested"
:
"Country requested"
,
"country_office_requested"
:
"Country for office/center is mandatory"
,
"create_account"
:
"Create account"
,
"create_an_account"
:
"Create an account"
,
"credentials"
:
"Credentials"
,
...
...
sails/src/assets/app/i18n/es-es.json
View file @
df6eb0ed
...
...
@@ -63,6 +63,8 @@
"contact_person"
:
"Persona de contacto"
,
"continue_session"
:
"Reanudar sesión"
,
"country"
:
"País"
,
"country_requested"
:
"Debe especificar el país"
,
"country_office_requested"
:
"Debe especificar el país del gabinete/centro"
,
"create_account"
:
"Crear cuenta"
,
"create_an_account"
:
"Crear una cuenta"
,
"credentials"
:
"Credenciales"
,
...
...
sails/src/assets/scripts/modules/login/controllers/signin.js
View file @
df6eb0ed
...
...
@@ -21,16 +21,24 @@ function SignInCtrl($scope,
name
:
''
,
surname
:
''
,
address
:
''
,
postal_code
:
''
,
country
:
'00'
,
phone
:
''
,
gender
:
'
M
'
,
gender
:
'
F
'
,
email
:
''
,
email_confirm
:
''
,
password
:
''
,
password_confirm
:
''
,
lang
:
'
es
'
,
role
:
null
,
lang
:
'
00
'
,
role
:
'therapist_office'
,
office
:
{
country
:
'NULL'
name
:
''
,
address
:
''
,
postal_code
:
''
,
country
:
'00'
,
contact_person
:
''
,
phone
:
''
,
email
:
''
},
office_idx
:
-
1
};
...
...
@@ -67,6 +75,16 @@ function SignInCtrl($scope,
return
;
}
if
(
$scope
.
formdata
.
country
==
'00'
)
{
ngToast
.
danger
({
content
:
$translate
.
instant
(
'country_requested'
)
});
return
;
}
if
(
$scope
.
formdata
.
role
==
'therapist_nooffice'
&&
$scope
.
formdata
.
office
.
country
==
'00'
)
{
ngToast
.
danger
({
content
:
$translate
.
instant
(
'country_office_requested'
)
});
return
;
}
if
(
!
$scope
.
formdata
.
disclaimer_accepted
)
{
ngToast
.
danger
({
content
:
$translate
.
instant
(
'disclaimer_requested'
)
});
return
;
...
...
sails/src/assets/scripts/modules/login/views/signin.html
View file @
df6eb0ed
...
...
@@ -33,7 +33,25 @@
</div>
</div>
<div
class=
"form-group"
>
<input
type=
"text"
class=
"form-control"
id=
"signin_address"
placeholder=
"{{ 'address' | translate }}"
ng-model=
"formdata.address"
/>
<input
type=
"text"
class=
"form-control"
id=
"signin_address"
placeholder=
"{{ 'address' | translate }}"
ng-model=
"formdata.address"
/
required
>
</div>
<div
class=
"row"
>
<div
class=
"col-md-4"
>
<div
class=
"form-group"
>
<input
type=
"text"
class=
"form-control"
id=
"signin_postal_code"
placeholder=
"{{ 'postal_code' | translate }}"
required
ng-model=
"formdata.postal_code"
ng-change=
"formdata.postal_code = formdata.postal_code.toUpperCase()"
/>
</div>
</div>
<div
class=
"col-md-8"
>
<div
class=
"form-group"
>
<select
class=
"form-control"
ng-model=
"formdata.country"
required
>
<option
value=
"00"
selected
disabled
hidden
>
{{ 'country' | translate }}
</option>
<option
value=
"ES"
>
España
</option>
<option
value=
"US"
>
United States
</option>
<option
value=
"UK"
>
United Kingdom
</option>
<option
value=
"IE"
>
Ireland
</option>
</select>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
...
...
@@ -90,9 +108,9 @@
<fieldset>
<fieldset>
<label
translate
>
language
</label>
<div
class=
"form-group"
>
<select
class=
"form-control"
name=
"signin_language"
id=
"signin_language"
ng-model=
"formdata.lang"
>
<select
class=
"form-control"
name=
"signin_language"
id=
"signin_language"
ng-model=
"formdata.lang"
required
>
<option
value=
"00"
selected
disabled
hidden
>
{{ 'language' | translate }}
</option>
<option
value=
"es-es"
selected
>
Español
</option>
<option
value=
"en-gb"
>
English
</option>
</select>
...
...
@@ -166,24 +184,24 @@
<div
class=
"form-group"
id=
"office_form"
hidden
>
<legend
translate
>
office_center
</legend>
<div
class=
"form-group"
>
<input
type=
"text"
class=
"form-control"
placeholder=
"{{ 'name' | translate }}"
ng-model=
"formdata.office.name"
/>
<input
type=
"text"
class=
"form-control"
placeholder=
"{{ 'name' | translate }}"
ng-model=
"formdata.office.name"
ng-required=
"formdata.role == 'therapist_nooffice'"
/>
</div>
<div
class=
"form-group"
>
<input
type=
"text"
class=
"form-control"
placeholder=
"{{ 'logo_url' | translate }}"
ng-model=
"formdata.office.logo_url"
/>
</div>
<div
class=
"form-group"
>
<input
type=
"text"
class=
"form-control"
placeholder=
"{{ 'address' | translate }}"
ng-model=
"formdata.office.address"
/>
<input
type=
"text"
class=
"form-control"
placeholder=
"{{ 'address' | translate }}"
ng-model=
"formdata.office.address"
ng-required=
"formdata.role == 'therapist_nooffice'"
/>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<div
class=
"form-group"
>
<input
type=
"
text"
class=
"form-control"
placeholder=
"{{ 'postal_code' | translate }}"
ng-model=
"formdata.office.postal_code
"
/>
<input
type=
"
number"
class=
"form-control"
placeholder=
"{{ 'postal_code' | translate }}"
ng-model=
"formdata.office.postal_code"
ng-change=
"formdata.office.postal_code = formdata.office.postal_code.toUpperCase()"
ng-required=
"formdata.role == 'therapist_nooffice'
"
/>
</div>
</div>
<div
class=
"col-md-6"
>
<div
class=
"form-group"
>
<select
class=
"form-control"
ng-model=
"formdata.office.country"
>
<option
value=
"
NULL
"
selected
disabled
hidden
>
{{ 'country' | translate }}
</option>
<select
class=
"form-control"
ng-model=
"formdata.office.country"
ng-required=
"formdata.role == 'therapist_nooffice'"
>
<option
value=
"
00
"
selected
disabled
hidden
>
{{ 'country' | translate }}
</option>
<option
value=
"ES"
>
España
</option>
<option
value=
"US"
>
United States
</option>
<option
value=
"UK"
>
United Kingdom
</option>
...
...
@@ -193,25 +211,25 @@
</div>
</div>
<div
class=
"form-group"
>
<input
type=
"text"
class=
"form-control"
placeholder=
"{{ 'contact_person' | translate }}"
ng-model=
"formdata.office.contact_person"
/>
<input
type=
"text"
class=
"form-control"
placeholder=
"{{ 'contact_person' | translate }}"
ng-model=
"formdata.office.contact_person"
ng-required=
"formdata.role == 'therapist_nooffice'"
/>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<div
class=
"form-group"
>
<input
type=
"email"
class=
"form-control"
placeholder=
"{{ 'email' | translate }}"
ng-model=
"formdata.office.email"
/>
<input
type=
"email"
class=
"form-control"
placeholder=
"{{ 'email' | translate }}"
ng-model=
"formdata.office.email"
ng-required=
"formdata.role == 'therapist_nooffice'"
/>
</div>
</div>
<div
class=
"col-md-6"
>
<div
class=
"form-group"
>
<input
type=
"text"
class=
"form-control"
placeholder=
"{{ 'phone' | translate }}"
ng-model=
"formdata.office.phone1"
/>
<input
type=
"text"
class=
"form-control"
placeholder=
"{{ 'phone' | translate }}"
ng-model=
"formdata.office.phone1"
ng-required=
"formdata.role == 'therapist_nooffice'"
/>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
id=
"office_selection"
hidden
>
<div
class=
"form-group"
id=
"office_selection"
>
<legend
translate
>
office_center
</legend>
<select
class=
"form-control"
ng-model=
"formdata.office_idx"
>
<select
class=
"form-control"
ng-model=
"formdata.office_idx"
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"
value=
"$index"
>
{{ office.name }}
</option>
</select>
...
...
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