From 007b2c4e2a5bb6dd6bf0e5619888c2c64db9ba04 Mon Sep 17 00:00:00 2001 From: DylanGuedes Date: Tue, 3 May 2016 10:28:19 -0300 Subject: [PATCH] Adds account register module --- src/app/account/.register-component.html.swp | Bin 0 -> 12288 bytes src/app/account/register-component.html | 43 +++++++++++++++++++++++++++++++++++++++++++ src/app/account/register.component.ts | 26 ++++++++++++++++++++++++++ src/app/account/register.html | 10 ++++++++++ src/app/layout/navbar/navbar.html | 6 ++++++ src/app/main/main.component.ts | 13 +++++++++++++ 6 files changed, 98 insertions(+), 0 deletions(-) create mode 100644 src/app/account/.register-component.html.swp create mode 100644 src/app/account/register-component.html create mode 100644 src/app/account/register.component.ts create mode 100644 src/app/account/register.html diff --git a/src/app/account/.register-component.html.swp b/src/app/account/.register-component.html.swp new file mode 100644 index 0000000..671cbae Binary files /dev/null and b/src/app/account/.register-component.html.swp differ diff --git a/src/app/account/register-component.html b/src/app/account/register-component.html new file mode 100644 index 0000000..25c835c --- /dev/null +++ b/src/app/account/register-component.html @@ -0,0 +1,43 @@ +
+

Ótimo ter você aqui!

+

+ "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..." + "There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..." +

+

Saiba mais informações

+
+
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+ + +
+
diff --git a/src/app/account/register.component.ts b/src/app/account/register.component.ts new file mode 100644 index 0000000..05d8e37 --- /dev/null +++ b/src/app/account/register.component.ts @@ -0,0 +1,26 @@ +import { Inject, Input, Component, Output, EventEmitter, } from 'ng-forward'; + +@Component({ + selector: 'noosfero-register', + templateUrl: 'app/account/register-component.html', +}) + +@Inject("$http") +export class RegisterComponent { + constructor(private $http: ng.IHttpService) { } + + signup (account: any) { + if (account.password === account.passwordConfirmation) { + this.$http.post("http://localhost:3000/api/v1/register", { + "login": account.login, + "email": account.email, + "password": account.password + }).then((response) => { + console.log(response); + }); + } else { + alert("Wrong password confirmation."); + } + } + +} diff --git a/src/app/account/register.html b/src/app/account/register.html new file mode 100644 index 0000000..18a6fa2 --- /dev/null +++ b/src/app/account/register.html @@ -0,0 +1,10 @@ +
+
+ + +
+ +
+ +
+
diff --git a/src/app/layout/navbar/navbar.html b/src/app/layout/navbar/navbar.html index 71c30f7..c0abec8 100644 --- a/src/app/layout/navbar/navbar.html +++ b/src/app/layout/navbar/navbar.html @@ -22,6 +22,12 @@ {{"navbar.login" | translate}} +
  • + + Sign Up + +
  • +