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
17909849
authored
May 08, 2017
by
Jose Antonio
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Issue
#197
, unlimited (10 months) license
parent
1f2ce4a2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
24 deletions
sails/src/assets/app/i18n/en-gb.json
sails/src/assets/app/i18n/es-es.json
sails/src/assets/scripts/modules/admin/controllers/licenses.js
sails/src/assets/scripts/modules/admin/views/licenses.html
sails/src/assets/app/i18n/en-gb.json
View file @
17909849
...
...
@@ -109,7 +109,7 @@
"double_click"
:
"Double click"
,
"down"
:
"Down"
,
"duplicate"
:
"Duplicate"
,
"duration_in_months"
:
"Duration (
in number of
months)"
,
"duration_in_months"
:
"Duration (months)"
,
"drag"
:
"Drag"
,
"edit"
:
"Edit"
,
"email"
:
"Email address"
,
...
...
@@ -427,6 +427,7 @@
"unlink"
:
"Unlink"
,
"up"
:
"Up"
,
"undefined"
:
"Undefined"
,
"unlimited"
:
"Unlimited"
,
"update_office"
:
"Update office"
,
"update_supervisor"
:
"Update supervisor"
,
"upload_image"
:
"Upload image"
,
...
...
sails/src/assets/app/i18n/es-es.json
View file @
17909849
...
...
@@ -109,7 +109,7 @@
"double_click"
:
"Doble clic"
,
"down"
:
"Abajo"
,
"duplicate"
:
"Duplicar"
,
"duration_in_months"
:
"Duración (
en número de
meses)"
,
"duration_in_months"
:
"Duración (meses)"
,
"drag"
:
"Arrastrar"
,
"edit"
:
"Editar"
,
"email"
:
"Correo electrónico"
,
...
...
@@ -426,6 +426,7 @@
"tutors"
:
"Tutores"
,
"undefined"
:
"Sin definir"
,
"unlink"
:
"Desvincular"
,
"unlimited"
:
"Ilimitada"
,
"up"
:
"Arriba"
,
"update_office"
:
"Editar gabinete"
,
"update_supervisor"
:
"Editar supervisor"
,
...
...
sails/src/assets/scripts/modules/admin/controllers/licenses.js
View file @
17909849
...
...
@@ -14,6 +14,7 @@ dashboardControllers.controller('AdminLicensesCtrl', function AdminLicensesCtrl(
repeat
:
1
};
$scope
.
licenses
=
[];
$scope
.
unlimited_state
=
false
;
// Get all licenses for the user
$http
...
...
@@ -46,4 +47,12 @@ dashboardControllers.controller('AdminLicensesCtrl', function AdminLicensesCtrl(
$scope
.
duration_registered
=
$scope
.
formdatalicense
.
duration
;
};
$scope
.
unlimited
=
function
(){
if
(
$scope
.
unlimited_state
){
$scope
.
formdatalicense
.
duration
=
120
;
}
else
{
$scope
.
formdatalicense
.
duration
=
3
;
}
};
});
sails/src/assets/scripts/modules/admin/views/licenses.html
View file @
17909849
...
...
@@ -6,33 +6,42 @@
<div
class=
"col-md-5"
>
<form
role=
"form"
ng-submit=
"create_licenses()"
>
<form
role=
"form"
ng-submit=
"create_licenses()"
>
<div
class=
"row"
>
<div
class=
"col-md-8"
>
<div
class=
"form-group"
>
<label
translate
>
duration_in_months
</label>
<input
type=
"number"
class=
"form-control"
id=
"setup_duration"
placeholder=
"{{ 'duration_in_months' | translate }}"
ng-disabled=
"unlimited_state"
required
ng-model=
"formdatalicense.duration"
/>
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"form-group"
>
<label
translate
>
unlimited
</label>
<input
type=
"checkbox"
class=
"checkbox"
id=
"unlimited"
placeholder=
"{{ 'duration_in_months' | translate }}"
required
ng-model=
"unlimited_state"
ng-change=
"unlimited()"
/>
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
translate
>
duration_in_months
</label>
<input
type=
"number"
class=
"form-control"
id=
"setup_duration"
placeholder=
"{{ 'duration_in_months' | translate }}"
required
ng-model=
"formdatalicense.duration
"
required
/>
</div>
<div
class=
"form-group"
>
<label
translate
>
how_many
</label>
<input
type=
"number"
class=
"form-control"
id=
"setup_repeat"
placeholder=
"{{ 'how_many' | translate }}"
ng-model=
"formdatalicense.repeat
"
required
/>
</div>
<div
class=
"form-group"
>
<label
translate
>
how_many
</label>
<input
type=
"number"
class=
"form-control"
id=
"setup_repeat"
placeholder=
"{{ 'how_many' | translate }}"
ng-model=
"formdatalicense.repeat"
required
/>
</div>
<div
class=
"form-group text-center"
>
<button
type=
"submit"
class=
"btn btn-primary"
translate
>
generate
</button>
</div>
<div
class=
"form-group text-center"
>
<button
type=
"submit"
class=
"btn btn-primary"
translate
>
generate
</button>
</div>
</form>
</form>
<div
ng-show=
"new_numbers.length > 0"
class=
"alert alert-info"
>
<p>
{{ 'licenses_created' | translate }}:
</p><p>
</p>
<div
ng-repeat=
"number in new_numbers track by $index"
>
<p>
<strong>
{{ number }}
</strong></p>
</div>
<p>
{{ 'duration_in_months' | translate }}: {{ duration_registered }}
</p>
</div>
<div
ng-show=
"new_numbers.length > 0"
class=
"alert alert-info"
>
<p>
{{ 'licenses_created' | translate }}:
</p><p>
</p>
<div
ng-repeat=
"number in new_numbers track by $index"
>
<p>
<strong>
{{ number }}
</strong></p>
</div>
<p>
{{ 'duration_in_months' | translate }}: {{ duration_registered }}
</p>
</div>
</div>
</div>
<div
class=
"col-md-2"
>
</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