diff --git a/front/salix/components/index.js b/front/salix/components/index.js
index 3bd24d32f5..f6727fadf4 100644
--- a/front/salix/components/index.js
+++ b/front/salix/components/index.js
@@ -5,10 +5,10 @@ import './descriptor-popover';
import './home/home';
import './layout';
import './left-menu/left-menu';
-import './login/index';
-import './login/login';
-import './login/recover-password';
-import './login/reset-password';
+import './login';
+import './outLayout';
+import './recover-password';
+import './reset-password';
import './module-card';
import './module-main';
import './side-menu/side-menu';
diff --git a/front/salix/components/login/index.html b/front/salix/components/login/index.html
index 186979f8ce..963c230611 100644
--- a/front/salix/components/login/index.html
+++ b/front/salix/components/login/index.html
@@ -1,6 +1,27 @@
-
-
![](./logo.svg)
-
+
+
+
+
+
+
+
diff --git a/front/salix/components/login/index.js b/front/salix/components/login/index.js
index f0e21fa299..150e896a10 100644
--- a/front/salix/components/login/index.js
+++ b/front/salix/components/login/index.js
@@ -1,16 +1,43 @@
import ngModule from '../../module';
-import Component from 'core/lib/component';
import './style.scss';
-export default class OutLayout extends Component {
- constructor($element, $scope) {
- super($element, $scope);
+/**
+ * A simple login form.
+ */
+export default class Controller {
+ constructor($, $element, vnAuth) {
+ Object.assign(this, {
+ $,
+ $element,
+ vnAuth,
+ user: localStorage.getItem('lastUser'),
+ remember: true
+ });
+ }
+
+ submit() {
+ this.loading = true;
+ this.vnAuth.login(this.user, this.password, this.remember)
+ .then(() => {
+ localStorage.setItem('lastUser', this.user);
+ this.loading = false;
+ })
+ .catch(err => {
+ this.loading = false;
+ this.password = '';
+ this.focusUser();
+ throw err;
+ });
+ }
+
+ focusUser() {
+ this.$.userField.select();
+ this.$.userField.focus();
}
}
+Controller.$inject = ['$scope', '$element', 'vnAuth'];
-OutLayout.$inject = ['$element', '$scope'];
-
-ngModule.vnComponent('vnOutLayout', {
+ngModule.vnComponent('vnLogin', {
template: require('./index.html'),
- controller: OutLayout
+ controller: Controller
});
diff --git a/front/salix/components/login/locale/es.yml b/front/salix/components/login/locale/es.yml
index e3a5815c1c..c34861bfb7 100644
--- a/front/salix/components/login/locale/es.yml
+++ b/front/salix/components/login/locale/es.yml
@@ -1,16 +1,5 @@
User: Usuario
Password: Contraseña
-Email: Correo electrónico
Do not close session: No cerrar sesión
Enter: Entrar
I do not remember my password: No recuerdo mi contraseña
-Recover password: Recuperar contraseña
-We will sent you an email to recover your password: Te enviaremos un correo para restablecer tu contraseña
-Notification sent!: ¡Notificación enviada!
-Reset password: Restrablecer contraseña
-New password: Nueva contraseña
-Repeat password: Repetir contraseña
-Password requirements: >
- La contraseña debe tener al menos {{ length }} caracteres de longitud,
- {{nAlpha}} caracteres alfabéticos, {{nUpper}} letras mayúsculas, {{nDigits}}
- dígitos y {{nPunct}} símbolos (Ej: $%&.)
diff --git a/front/salix/components/login/login.html b/front/salix/components/login/login.html
deleted file mode 100644
index 963c230611..0000000000
--- a/front/salix/components/login/login.html
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
diff --git a/front/salix/components/login/login.js b/front/salix/components/login/login.js
deleted file mode 100644
index b5f8c1e7db..0000000000
--- a/front/salix/components/login/login.js
+++ /dev/null
@@ -1,43 +0,0 @@
-import ngModule from '../../module';
-import './style.scss';
-
-/**
- * A simple login form.
- */
-export default class Controller {
- constructor($, $element, vnAuth) {
- Object.assign(this, {
- $,
- $element,
- vnAuth,
- user: localStorage.getItem('lastUser'),
- remember: true
- });
- }
-
- submit() {
- this.loading = true;
- this.vnAuth.login(this.user, this.password, this.remember)
- .then(() => {
- localStorage.setItem('lastUser', this.user);
- this.loading = false;
- })
- .catch(err => {
- this.loading = false;
- this.password = '';
- this.focusUser();
- throw err;
- });
- }
-
- focusUser() {
- this.$.userField.select();
- this.$.userField.focus();
- }
-}
-Controller.$inject = ['$scope', '$element', 'vnAuth'];
-
-ngModule.vnComponent('vnLogin', {
- template: require('./login.html'),
- controller: Controller
-});
diff --git a/front/salix/components/login/style.scss b/front/salix/components/login/style.scss
index 8985893f2a..f13c9cf867 100644
--- a/front/salix/components/login/style.scss
+++ b/front/salix/components/login/style.scss
@@ -1,8 +1,6 @@
@import "variables";
-vn-login,
-vn-reset-password,
-vn-recover-password{
+vn-login{
.footer {
margin-top: 32px;
text-align: center;
@@ -24,69 +22,3 @@ vn-recover-password{
}
}
}
-
-vn-out-layout{
- position: absolute;
- height: 100%;
- width: 100%;
- margin: 0;
- padding: 0;
- color: $color-font;
- font-size: 1.1rem;
- font-weight: normal;
- background-color: $color-bg-dark;
- display: flex;
- justify-content: center;
- align-items: center;
- overflow: auto;
-
- & > .box {
- box-sizing: border-box;
- position: absolute;
- max-width: 304px;
- min-width: 240px;
- padding: 48px;
- background-color: $color-bg-panel;
- box-shadow: 0 0 16px 0 rgba(0, 0, 0, .6);
- border-radius: 8px;
-
- & > img {
- width: 100%;
- padding-bottom: 16px;
- }
- & > form {
- & > .vn-textfield {
- width: 100%;
- }
- & > .vn-check {
- display: block;
- .md-label {
- white-space: inherit;
- }
- }
- }
-
- h5{
- color: $color-primary;
- }
-
- .text-secondary{
- text-align: center;
- padding-bottom: 16px;
- }
-
- }
-
- @media screen and (max-width: 600px) {
- background-color: $color-bg-panel;
-
- & > .box {
- padding: 16px;
- box-shadow: none;
- }
- }
-
- a{
- color: $color-primary;
- }
-}
diff --git a/front/salix/components/outLayout/index.html b/front/salix/components/outLayout/index.html
new file mode 100644
index 0000000000..186979f8ce
--- /dev/null
+++ b/front/salix/components/outLayout/index.html
@@ -0,0 +1,6 @@
+
+
![](./logo.svg)
+
+
diff --git a/front/salix/components/outLayout/index.js b/front/salix/components/outLayout/index.js
new file mode 100644
index 0000000000..f0e21fa299
--- /dev/null
+++ b/front/salix/components/outLayout/index.js
@@ -0,0 +1,16 @@
+import ngModule from '../../module';
+import Component from 'core/lib/component';
+import './style.scss';
+
+export default class OutLayout extends Component {
+ constructor($element, $scope) {
+ super($element, $scope);
+ }
+}
+
+OutLayout.$inject = ['$element', '$scope'];
+
+ngModule.vnComponent('vnOutLayout', {
+ template: require('./index.html'),
+ controller: OutLayout
+});
diff --git a/front/salix/components/login/logo.svg b/front/salix/components/outLayout/logo.svg
similarity index 100%
rename from front/salix/components/login/logo.svg
rename to front/salix/components/outLayout/logo.svg
diff --git a/front/salix/components/outLayout/style.scss b/front/salix/components/outLayout/style.scss
new file mode 100644
index 0000000000..aa94fefb36
--- /dev/null
+++ b/front/salix/components/outLayout/style.scss
@@ -0,0 +1,67 @@
+@import "variables";
+
+vn-out-layout{
+ position: absolute;
+ height: 100%;
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ color: $color-font;
+ font-size: 1.1rem;
+ font-weight: normal;
+ background-color: $color-bg-dark;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ overflow: auto;
+
+ & > .box {
+ box-sizing: border-box;
+ position: absolute;
+ max-width: 304px;
+ min-width: 240px;
+ padding: 48px;
+ background-color: $color-bg-panel;
+ box-shadow: 0 0 16px 0 rgba(0, 0, 0, .6);
+ border-radius: 8px;
+
+ & > img {
+ width: 100%;
+ padding-bottom: 16px;
+ }
+ & > form {
+ & > .vn-textfield {
+ width: 100%;
+ }
+ & > .vn-check {
+ display: block;
+ .md-label {
+ white-space: inherit;
+ }
+ }
+ }
+
+ h5{
+ color: $color-primary;
+ }
+
+ .text-secondary{
+ text-align: center;
+ padding-bottom: 16px;
+ }
+
+ }
+
+ @media screen and (max-width: 600px) {
+ background-color: $color-bg-panel;
+
+ & > .box {
+ padding: 16px;
+ box-shadow: none;
+ }
+ }
+
+ a{
+ color: $color-primary;
+ }
+}
diff --git a/front/salix/components/login/recover-password.html b/front/salix/components/recover-password/index.html
similarity index 100%
rename from front/salix/components/login/recover-password.html
rename to front/salix/components/recover-password/index.html
diff --git a/front/salix/components/login/recover-password.js b/front/salix/components/recover-password/index.js
similarity index 94%
rename from front/salix/components/login/recover-password.js
rename to front/salix/components/recover-password/index.js
index fa9bfc4599..3de7f32669 100644
--- a/front/salix/components/login/recover-password.js
+++ b/front/salix/components/recover-password/index.js
@@ -32,6 +32,6 @@ export default class Controller {
Controller.$inject = ['$scope', '$element', '$http', 'vnApp', '$translate', '$state'];
ngModule.vnComponent('vnRecoverPassword', {
- template: require('./recover-password.html'),
+ template: require('./index.html'),
controller: Controller
});
diff --git a/front/salix/components/recover-password/locale/es.yml b/front/salix/components/recover-password/locale/es.yml
new file mode 100644
index 0000000000..b71c71415c
--- /dev/null
+++ b/front/salix/components/recover-password/locale/es.yml
@@ -0,0 +1,3 @@
+Recover password: Recuperar contraseña
+We will sent you an email to recover your password: Te enviaremos un correo para restablecer tu contraseña
+Notification sent!: ¡Notificación enviada!
diff --git a/front/salix/components/recover-password/style.scss b/front/salix/components/recover-password/style.scss
new file mode 100644
index 0000000000..d3c6f594ed
--- /dev/null
+++ b/front/salix/components/recover-password/style.scss
@@ -0,0 +1,24 @@
+@import "variables";
+
+vn-recover-password{
+ .footer {
+ margin-top: 32px;
+ text-align: center;
+ position: relative;
+ & > .vn-submit {
+ display: block;
+
+ & > input {
+ display: block;
+ width: 100%;
+ }
+ }
+ & > .spinner-wrapper {
+ position: absolute;
+ width: 0;
+ top: 3px;
+ right: -8px;
+ overflow: visible;
+ }
+ }
+}
diff --git a/front/salix/components/login/reset-password.html b/front/salix/components/reset-password/index.html
similarity index 100%
rename from front/salix/components/login/reset-password.html
rename to front/salix/components/reset-password/index.html
diff --git a/front/salix/components/login/reset-password.js b/front/salix/components/reset-password/index.js
similarity index 96%
rename from front/salix/components/login/reset-password.js
rename to front/salix/components/reset-password/index.js
index 9ee1fdb620..20c6c34fe7 100644
--- a/front/salix/components/login/reset-password.js
+++ b/front/salix/components/reset-password/index.js
@@ -43,6 +43,6 @@ export default class Controller {
Controller.$inject = ['$scope', '$element', '$http', 'vnApp', '$translate', '$state', '$location'];
ngModule.vnComponent('vnResetPassword', {
- template: require('./reset-password.html'),
+ template: require('./index.html'),
controller: Controller
});
diff --git a/front/salix/components/login/locale/en.yml b/front/salix/components/reset-password/locale/en.yml
similarity index 71%
rename from front/salix/components/login/locale/en.yml
rename to front/salix/components/reset-password/locale/en.yml
index 1ddd454b70..e5419e1c8d 100644
--- a/front/salix/components/login/locale/en.yml
+++ b/front/salix/components/reset-password/locale/en.yml
@@ -1,7 +1,3 @@
-User: User
-Password: Password
-Do not close session: Do not close session
-Enter: Enter
Password requirements: >
The password must have at least {{ length }} length characters,
{{nAlpha}} alphabetic characters, {{nUpper}} capital letters, {{nDigits}}
diff --git a/front/salix/components/reset-password/locale/es.yml b/front/salix/components/reset-password/locale/es.yml
new file mode 100644
index 0000000000..0771d5dc35
--- /dev/null
+++ b/front/salix/components/reset-password/locale/es.yml
@@ -0,0 +1,8 @@
+Reset password: Restrablecer contraseña
+New password: Nueva contraseña
+Repeat password: Repetir contraseñaç
+Password changed!: ¡Contraseña cambiada!
+Password requirements: >
+ La contraseña debe tener al menos {{ length }} caracteres de longitud,
+ {{nAlpha}} caracteres alfabéticos, {{nUpper}} letras mayúsculas, {{nDigits}}
+ dígitos y {{nPunct}} símbolos (Ej: $%&.)
diff --git a/front/salix/components/reset-password/style.scss b/front/salix/components/reset-password/style.scss
new file mode 100644
index 0000000000..87e4adc8c9
--- /dev/null
+++ b/front/salix/components/reset-password/style.scss
@@ -0,0 +1,24 @@
+@import "variables";
+
+vn-reset-password{
+ .footer {
+ margin-top: 32px;
+ text-align: center;
+ position: relative;
+ & > .vn-submit {
+ display: block;
+
+ & > input {
+ display: block;
+ width: 100%;
+ }
+ }
+ & > .spinner-wrapper {
+ position: absolute;
+ width: 0;
+ top: 3px;
+ right: -8px;
+ overflow: visible;
+ }
+ }
+}