92 lines
3.9 KiB
PHP
92 lines
3.9 KiB
PHP
@extends('themes.base.layout')
|
|
@section('title', trans('admin.edit_user_title', ['name' => $user->name]))
|
|
|
|
@section('breadcrumb')
|
|
<div class="breadcrumb">
|
|
<div class="container">
|
|
<ol class="breadcrumb">
|
|
<li><a href="{{ route('home') }}">@lang('navigation.breadcrumb.home')</a></li>
|
|
<li><a href="{{ route('admin') }}">@lang('navigation.breadcrumb.admin')</a></li>
|
|
<li><a href="{{ route('user.index') }}">@lang('navigation.breadcrumb.users')</a></li>
|
|
<li class="active">@lang('navigation.breadcrumb.edit_user')</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|
|
@section('content')
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<h1>@yield('title')</h1>
|
|
<p>@lang('admin.edit_user_intro')</p>
|
|
<hr/>
|
|
|
|
@if (count($errors) > 0)
|
|
<div class="alert alert-danger">
|
|
<ul>
|
|
@foreach ($errors->all() as $form_error)
|
|
<li>{{ $form_error }}</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
@endif
|
|
|
|
{!! Form::model($user, ['route' => ['user.update', $user->id], 'method' => 'PUT']) !!}
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<div class="form-group">
|
|
{!! Form::label('name', trans('forms.name_label'), ['class' => 'control-label']) !!}
|
|
{!! Form::text('name', old('name'), ['class' => 'form-control']) !!}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
<div class="form-group">
|
|
{!! Form::label('email', trans('forms.email_label'), ['class' => 'control-label']) !!}
|
|
{!! Form::text('email', old('email'), ['class' => 'form-control']) !!}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<div class="form-group">
|
|
{!! Form::label('password', trans('forms.password_label'), ['class' => 'control-label']) !!}
|
|
{!! Form::password('password', ['class' => 'form-control']) !!}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
|
<div class="form-group">
|
|
{!! Form::label('password_confirmation', trans('forms.password_confirm_label'), ['class' => 'control-label']) !!}
|
|
{!! Form::password('password_confirmation', ['class' => 'form-control']) !!}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="checkbox">
|
|
<label>
|
|
<input type="checkbox" name="is_admin"@if ($user->is_admin) checked="checked"@endif>
|
|
<strong>@lang('forms.admin_user_label')</strong>
|
|
</label>
|
|
</div>
|
|
|
|
@if (!$user->is_activated)
|
|
<div class="checkbox">
|
|
<label>
|
|
<input type="checkbox" name="is_activated">
|
|
<strong>@lang('forms.activate_user_label')</strong>
|
|
</label>
|
|
</div>
|
|
@endif
|
|
|
|
<div class="form-actions">
|
|
<a href="{{ route('user.index') }}" class="btn btn-default">@lang('forms.cancel_action')</a>
|
|
{!! Form::submit(trans('forms.save_action'), ['class' => 'btn btn-success']) !!}
|
|
</div>
|
|
{!! Form::close() !!}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection |