diff options
author | Danijel Andjelkovic <adanijel99@gmail.com> | 2022-03-14 23:36:24 +0100 |
---|---|---|
committer | Danijel Andjelkovic <adanijel99@gmail.com> | 2022-03-14 23:36:24 +0100 |
commit | b93854c0f0f9fe011aab6bdef324d236fd8dadc8 (patch) | |
tree | 98808e8b96b588b9d805f5001e8915d1cb367c43 /frontend/src/app/_pages/login-page | |
parent | 6aeb963fa64af9dc0ddf2f9aeaf1903a7db26afc (diff) | |
parent | 7ff5981a464b17f84b7e0268077c5ba6ec131e21 (diff) |
Merge branch 'dev' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into frontendNaslovna
# Conflicts:
# frontend/angular.json
# frontend/src/app/app-routing.module.ts
# frontend/src/app/app.module.ts
Diffstat (limited to 'frontend/src/app/_pages/login-page')
-rw-r--r-- | frontend/src/app/_pages/login-page/login-page.component.html | 68 | ||||
-rw-r--r-- | frontend/src/app/_pages/login-page/login-page.component.ts | 50 |
2 files changed, 14 insertions, 104 deletions
diff --git a/frontend/src/app/_pages/login-page/login-page.component.html b/frontend/src/app/_pages/login-page/login-page.component.html index 8deb5290..3a4244fc 100644 --- a/frontend/src/app/_pages/login-page/login-page.component.html +++ b/frontend/src/app/_pages/login-page/login-page.component.html @@ -1,55 +1,13 @@ -<!--<script> - $(document).ready(function(){ - $(".btn").click(function(){ - $("#exampleModal").modal('show'); - }); - - $('#exampleModal').modal({ - backdrop: 'static', - keyboard: false - }); - }); -</script>--> - -<!-- Button trigger modal --> -<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#modalForLogin" (click)="openModal()"> - Open Modal - </button> - -<!-- -<div style="min-height: 100vh; position: relative;"> - - <div class="container p-5 rounded-3 shadow-sm border" style="max-width: 50em; margin-top: 50px;"> - <h3 class="text-center pb-5">Prijavite se</h3> - <form> - <div class="form-outline mb-4"> - <label class="form-label" for="username">Korisničko ime</label> - <input [(ngModel)]="username" name="username" type="text" id="username" - class="form-control form-control-lg" placeholder="Unesite korisničko ime..." /> - </div> - - <div class="form-outline mb-3"> - <label class="form-label" for="password">Lozinka</label> - <input [(ngModel)]="password" name="password" type="password" id="password" - class="form-control form-control-lg" placeholder="Unesite lozinku..." /> - </div> - - <div class="text-center text-lg-start mt-4 pt-2"> - <p *ngIf="wrongCreds" class="small fw-bold mt-2 pt-1 mb-0 text-danger">Lozinka ili e-mail su pogrešni - </p> - <br> - - <button type="button" class="btn btn-primary btn-lg" - style="padding-left: 2.5rem; padding-right: 2.5rem;" (click)="onSubmit()">Prijava - </button> - - <br> - <p class="small fw-bold mt-2 pt-1 mb-0">Još uvek nemate nalog? - <a routerLink="/register" class="link-danger">Registrujte se</a> - </p> - </div> - </form> - </div> - -</div> --->
\ No newline at end of file +<!-- Button trigger modal, OVO JE U STVARI DUGME U NAVBARU --> +<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#modalForLogin"> + Otvori login modal +</button> + +<!-- Button trigger modal, OVO JE U STVARI DUGME U NAVBARU --> +<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#modalForRegister"> + Otvori register modal +</button> + + +<app-login-modal></app-login-modal> +<app-register-modal></app-register-modal> diff --git a/frontend/src/app/_pages/login-page/login-page.component.ts b/frontend/src/app/_pages/login-page/login-page.component.ts index 26d2547e..58cd75a0 100644 --- a/frontend/src/app/_pages/login-page/login-page.component.ts +++ b/frontend/src/app/_pages/login-page/login-page.component.ts @@ -1,10 +1,5 @@ -import { Component, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; -import { CookieService } from 'ngx-cookie-service'; -import { AuthService } from 'src/app/_services/auth.service'; +import { Component } from '@angular/core'; -import { LoginModalComponent } from 'src/app/_modals/login-modal/login-modal.component'; -import { MDBModalRef, MDBModalService } from 'ng-uikit-pro-standard'; declare var window: any; @@ -17,47 +12,4 @@ declare var window: any; }) export class LoginPageComponent { - modalRef?: MDBModalRef; - - //email: string = ''; - username: string = ''; - password: string = ''; - - public wrongCreds: boolean = false; //RAZMOTRITI - //public notApproved: boolean = false; //RAZMOTRITI - - formModal: any; - - constructor( - private authService: AuthService, - private cookie: CookieService, - private router: Router, - private modalService: MDBModalService - ) { } - - openModal() { - //this.modalRef = this.modalService.show(LoginModalComponent); - } - /* - ngOnInit(): void { - this.formModal = new window.bootstrap.Modal( - document.getElementById("exampleModal") - ); - } - - openModal() { - this.formModal.show(); - //console.log("ok"); - //(<HTMLInputElement>document.getElementById("exampleModal")).style.display = "block"; - } - - onSubmit() { - - this.authService.login(this.username, this.password).subscribe((response) => { - console.log(response); - this.cookie.set('token', response); - this.router.navigate(['add-model']); - }); - } -*/ } |