journal-intime/resources/views/user/index.blade.php

106 lines
6.6 KiB
PHP
Raw Permalink Normal View History

@extends('layouts.connected')
@section('content')
<div class="container">
<div class="page-header">
<div class="row align-items-center">
<div class="col-auto">
<h1 class="page-title">
{{ __('My profile') }}
</h1>
@if (session('status'))
<div class="alert alert-success" role="alert">
{{ session('status') }}
</div>
@endif
@if (session('success'))
<div class="alert alert-success" role="alert">
{{ session('success') }}
</div>
@endif
@if (session('errors'))
<div class="alert alert-danger" role="alert">
{{ session('errors') }}
</div>
@endif
</div>
</div>
</div>
<div class="row flex-fill">
<div class="col-12">
<form action="{{ route('user.update') }}" method="post" class="card" enctype="multipart/form-data">
@csrf
<div class="card-body">
<div class="row">
<div class="col-md-6 col-lg-4">
<div class="form-group">
<label class="form-label">{{ __('Name') }}</label>
<input type="text" class="form-control" name="name" value="{{ $user->name }}">
</div>
<div class="form-group">
<label class="form-label">{{ __('Email') }}</label>
<input type="email" class="form-control" name="email" value="{{ $user->email }}">
</div>
<div class="form-group">
<label class="form-label">{{ __('Password') }}</label>
<div class="form-control-plaintext">*********</div>
</div>
<div class="form-group">
<label class="form-label">
<input type="checkbox" name="encrypt_messages" value="1" class="custom-switch-input" @if($user->encrypt_messages) checked @endif>
<span class="custom-switch-indicator"></span>
<span class="custom-switch-description">{{ __('Encrypt my posts') }}</span>
</label>
</div>
<div class="form-group">
<label class="form-label">{{ __('Notification hour') }}</label>
<div class="selectgroup selectgroup-pills">
<label class="selectgroup-item">
<input type="radio" name="notification_hour" value="0" class="selectgroup-input" @if($user->notification_hour === null) checked @endif>
<span class="selectgroup-button selectgroup-button-icon"><i class="fe fe-slash"></i></span>
</label>
<label class="selectgroup-item">
<input type="radio" name="notification_hour" value="1" class="selectgroup-input"@if($user->notification_hour === '1') checked @endif>
<span class="selectgroup-button selectgroup-button-icon"><i class="fe fe-moon"></i></span>
</label>
<label class="selectgroup-item">
<input type="radio" name="notification_hour" value="2" class="selectgroup-input"@if($user->notification_hour === '2') checked @endif>
<span class="selectgroup-button selectgroup-button-icon"><i class="fe fe-sunrise"></i></span>
</label>
<label class="selectgroup-item">
<input type="radio" name="notification_hour" value="3" class="selectgroup-input"@if($user->notification_hour === '3') checked @endif>
<span class="selectgroup-button selectgroup-button-icon"><i class="fe fe-sun"></i></span>
</label>
<label class="selectgroup-item">
<input type="radio" name="notification_hour" value="4" class="selectgroup-input"@if($user->notification_hour === '4') checked @endif>
<span class="selectgroup-button selectgroup-button-icon"><i class="fe fe-sunset"></i></span>
</label>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4">
<div class="form-group">
<div class="form-label">{{ __('Avatar') }}</div>
@if(Auth::user()->hasMedia('avatars'))
<img src="{{ route('display_avatar', ['alias' => 'thumb'])}}">
@endif
<div class="custom-file">
<input type="file" class="custom-file-input" name="avatar">
<label class="custom-file-label">{{ __('Choose your avatar') }}</label>
</div>
</div>
</div>
</div>
</div>
<div class="card-footer text-right">
<div class="d-flex">
<a href="{{ route('dashboard') }}" class="btn btn-link">{{ __('Cancel') }}</a>
<button type="submit" class="btn btn-primary ml-auto">{{ __('Save') }}</button>
</div>
</div>
</form>
</div>
</div>
</div>
@endsection