add user register/login form and authentication
This commit is contained in:
@@ -8,7 +8,10 @@
|
||||
<body>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/home">Home</a></li>
|
||||
<li><a href="/register">Register</a></li>
|
||||
<li><a href="/login">Login</a></li>
|
||||
<li>Logout</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<main>
|
||||
|
25
device-app/resources/views/users/login.blade.php
Normal file
25
device-app/resources/views/users/login.blade.php
Normal file
@@ -0,0 +1,25 @@
|
||||
@extends('layout')
|
||||
|
||||
@section('content')
|
||||
<h1>Login Form</h1>
|
||||
<form method="POST" action="/users/authenticate">
|
||||
@csrf
|
||||
<label for="rz_username">RZ-Username:</label>
|
||||
<input type="text" id="rz_username" name="rz_username" value="{{ old('device_id') }}" required>
|
||||
@error('rz_username')
|
||||
<p>{{ $message }}</p>
|
||||
@enderror
|
||||
<br />
|
||||
<label for="hashed_password">Password:</label>
|
||||
<input type="password" id="hashed_password" name="password" required>
|
||||
@error('hashed_password')
|
||||
<p>{{ $message }}</p>
|
||||
@enderror
|
||||
<br />
|
||||
<input type="submit" value="Login">
|
||||
<div>
|
||||
<p>Don't have an account?</p>
|
||||
<a href="/register">Register</a>
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
43
device-app/resources/views/users/register.blade.php
Normal file
43
device-app/resources/views/users/register.blade.php
Normal file
@@ -0,0 +1,43 @@
|
||||
@extends('layout')
|
||||
|
||||
@section('content')
|
||||
<h1>Registration Form</h1>
|
||||
<form method="POST" action="/users">
|
||||
@csrf
|
||||
<label for="rz_username">RZ-Username:</label>
|
||||
<input type="text" id="rz_username" name="rz_username" value="{{old('device_id')}}" required>
|
||||
@error('rz_username')
|
||||
<p>{{$message}}</p>
|
||||
@enderror
|
||||
<br/>
|
||||
<label for="full_name">Full Name:</label>
|
||||
<input type="text" id="full_name" name="full_name" value="{{old('device_id')}}" required>
|
||||
@error('full_name')
|
||||
<p>{{$message}}</p>
|
||||
@enderror
|
||||
<br/>
|
||||
<label for="organisation_unit">Organisation Unit:</label>
|
||||
<input type="text" id="organisation_unit" name="organisation_unit" value="{{old('device_id')}}" required>
|
||||
@error('organisation_unit')
|
||||
<p>{{$message}}</p>
|
||||
@enderror
|
||||
<br/>
|
||||
<label for="password">Password:</label>
|
||||
<input type="password" id="password" name="password" required>
|
||||
@error('password')
|
||||
<p>{{$message}}</p>
|
||||
@enderror
|
||||
<br/>
|
||||
{{-- <label for="password_confirm">Confirm Password:</label>
|
||||
<input type="password" id="password_confirmation" name="password_confirm" required><
|
||||
@error('password_confirmation')
|
||||
<p>{{$message}}</p>
|
||||
@enderror
|
||||
<br/> --}}
|
||||
<input type="submit" value="Register">
|
||||
<div>
|
||||
<p>Already have an account?</p>
|
||||
<a href="/login">Login</a>
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
Reference in New Issue
Block a user