154 lines
7.0 KiB
PHP
154 lines
7.0 KiB
PHP
@extends('layouts.legacy')
|
|
|
|
@section('content')
|
|
<div class="container-fluid legacy-page">
|
|
<div class="effect2 page-header-wrap">
|
|
<header class="page-heading">
|
|
<h1 class="page-header">Edit profile</h1>
|
|
<p>update your user account</p>
|
|
</header>
|
|
</div>
|
|
|
|
@if(session('status'))
|
|
<div class="alert alert-success">{{ session('status') }}</div>
|
|
@endif
|
|
@if(session('error'))
|
|
<div class="alert alert-danger">{{ session('error') }}</div>
|
|
@endif
|
|
|
|
<form enctype="multipart/form-data" method="post" action="{{ route('legacy.user') }}" id="editUserProfileForm" role="form">
|
|
@csrf
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="form-group">
|
|
<label><i class="fa fa-envelope"></i> Email:</label>
|
|
<input type="text" name="email" class="form-control" readonly value="{{ $user->email }}" />
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label><i class="fa fa-user"></i> Username:</label>
|
|
<input type="text" name="uname" class="form-control" readonly value="{{ $user->uname ?? $user->name }}" />
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>Real name:</label>
|
|
<input type="text" name="real_name" class="form-control" value="{{ $user->real_name ?? '' }}" />
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label><i class="fa fa-link"></i> Home page:</label>
|
|
<input type="text" name="web" class="form-control" value="{{ $user->web ?? '' }}" />
|
|
</div>
|
|
|
|
<div class="form-inline">
|
|
<label><i class="fa fa-birthday-cake"></i> Birthday</label><br>
|
|
<input maxlength="2" name="date1" class="form-control" size="2" placeholder="Day" value="{{ $birthDay ?? '' }}"> :
|
|
<select name="date2" class="form-control">
|
|
@for($i=1;$i<=12;$i++)
|
|
@php $mVal = str_pad($i, 2, '0', STR_PAD_LEFT); @endphp
|
|
<option value="{{ $mVal }}" {{ (isset($birthMonth) && $birthMonth == $mVal) ? 'selected' : '' }}>{{ DateTime::createFromFormat('!m',$i)->format('F') }}</option>
|
|
@endfor
|
|
</select> :
|
|
<input maxlength="4" class="form-control" name="date3" size="4" placeholder="year" value="{{ $birthYear ?? '' }}">
|
|
</div>
|
|
|
|
<br>
|
|
<div class="form-group well">
|
|
<label>Gender:</label><br>
|
|
<input name="gender" type="radio" value="M" {{ ($user->gender ?? '') == 'M' ? 'checked' : '' }}> Male<br>
|
|
<input name="gender" type="radio" value="F" {{ ($user->gender ?? '') == 'F' ? 'checked' : '' }}> Female<br>
|
|
<input name="gender" type="radio" value="X" {{ ($user->gender ?? '') == 'X' ? 'checked' : '' }}> N/A
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>Country:</label>
|
|
@if(isset($countries) && $countries->count())
|
|
<select name="country_code" class="form-control">
|
|
@foreach($countries as $c)
|
|
@php
|
|
$code = $c->country_code ?? ($c->code ?? null);
|
|
$label = $c->country_name ?? ($c->name ?? $code);
|
|
@endphp
|
|
<option value="{{ $code }}" {{ ($user->country_code ?? '') == $code ? 'selected' : '' }}>{{ $label }}</option>
|
|
@endforeach
|
|
</select>
|
|
@else
|
|
<input type="text" name="country_code" class="form-control" value="{{ $user->country_code ?? '' }}">
|
|
@endif
|
|
</div>
|
|
|
|
<div class="form-group well">
|
|
<input name="newsletter" type="checkbox" value="1" {{ ($user->mlist ?? 0) ? 'checked' : '' }}> Mailing list<br>
|
|
<input name="friend_upload_notice" type="checkbox" value="1" {{ ($user->friend_upload_notice ?? 0) ? 'checked' : '' }}> Friends upload notice
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>Signature</label>
|
|
<textarea name="signature" class="form-control" style="width:100%; height:100px;">{{ $user->signature ?? '' }}</textarea>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>Description</label>
|
|
<textarea name="description" class="form-control" style="width:100%; height:100px;">{{ $user->description ?? '' }}</textarea>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
<div class="form-group well">
|
|
<label>Avatar:</label><br>
|
|
<input type="file" name="avatar" class="form-control">
|
|
@if(!empty($user->icon))
|
|
<div style="margin-top:10px"><img src="/avatar/{{ $user->id }}/{{ $user->icon }}" width="50"></div>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="form-group well">
|
|
<label>Emotion Icon:</label><br>
|
|
<input type="file" name="emotion_icon" class="form-control">
|
|
</div>
|
|
|
|
<div class="form-group well">
|
|
<label>Personal picture:</label><br>
|
|
<input type="file" name="personal_picture" class="form-control">
|
|
@if(!empty($user->picture))
|
|
<div style="margin-top:10px"><img src="/user-picture/{{ $user->picture }}" style="max-width:300px"></div>
|
|
@endif
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>About Me</label>
|
|
<textarea name="about_me" class="summernote form-control" style="width:100%; height:100px;">{{ $user->about_me ?? '' }}</textarea>
|
|
</div>
|
|
|
|
<input type="hidden" name="confirm" value="true">
|
|
<input type="submit" class="btn btn-success" value="Update my profile">
|
|
</form>
|
|
|
|
<hr>
|
|
|
|
<h3>Change password</h3>
|
|
<form action="{{ route('legacy.user') }}" method="post">
|
|
@csrf
|
|
<div class="form-group">
|
|
<label>Current password</label>
|
|
<input type="password" name="oldpass" class="form-control">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>New password</label>
|
|
<input type="password" name="newpass" class="form-control">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Retype new password</label>
|
|
<input type="password" name="newpass2" class="form-control">
|
|
</div>
|
|
<input type="hidden" name="confirm" value="true_password">
|
|
<input type="submit" class="btn btn-success" value="Change Password">
|
|
</form>
|
|
|
|
</div>
|
|
@endsection
|