63 lines
2.4 KiB
PHP
63 lines
2.4 KiB
PHP
|
@extends('layout.master')
|
||
|
|
||
|
@section('title')
|
||
|
Settings -
|
||
|
@endsection
|
||
|
|
||
|
@section('content')
|
||
|
<img src="https://www.gravatar.com/avatar/{{ md5(strtolower(trim($_SESSION['email']))) }}?s=100&d=mm&r=pg" class="avatar">
|
||
|
<form method="POST" action="">
|
||
|
<input type="hidden" name="_token" value="{{ $_SESSION['_token'] }}">
|
||
|
<input type="hidden" name="id" value="{{ $_SESSION['id'] }}">
|
||
|
<table class="table">
|
||
|
<tbody>
|
||
|
<tr>
|
||
|
<th scope="row">Name:</th>
|
||
|
<td><input type="text" name="username" value="{{ $_SESSION['username'] }}" class="form-control"></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<th scope="row">E-mail:</th>
|
||
|
<td><input type="email" name="email" value="{{ $_SESSION['email'] }}" class="form-control"></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<th scope="row">Password:</th>
|
||
|
<td><input type="password" name="password" placeholder="Leave blank for no change" class="form-control"></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<th scope="row">Confirmation:</th>
|
||
|
<td><input type="password" name="confirm-password" placeholder="Leave blank for no change" class="form-control"></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td><button type="submit" class="btn btn-primary float-right">Save</button></td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</form>
|
||
|
|
||
|
<a href="#" class="text-muted text-danger" data-toggle="modal" data-target="#account-delete-modal">Delete account</a>
|
||
|
|
||
|
<div class="modal fade" id="account-delete-modal" tabindex="-1" role="dialog" aria-labelledby="confirm-label" aria-hidden="true">
|
||
|
<div class="modal-dialog" role="document">
|
||
|
<div class="modal-content">
|
||
|
<div class="modal-header">
|
||
|
<h5 class="modal-title" id="account-delete-label">Confirmation</h5>
|
||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||
|
<span aria-hidden="true">×</span>
|
||
|
</button>
|
||
|
</div>
|
||
|
<div class="modal-body">
|
||
|
Are you sure you want to delete your account?
|
||
|
</div>
|
||
|
<div class="modal-footer">
|
||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">No</button>
|
||
|
<form method="POST" action="/user/delete">
|
||
|
<input type="hidden" name="_token" value="{{ $_SESSION['_token'] }}">
|
||
|
<button type="submit" class="btn btn-danger">Yes</button>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
@endsection
|