Files
core/resources/views/admin/userManagement/new.blade.php
T
Michal Kváček bb0083cdda REFACTORING: split UserManagement controller into more classes
One class for user management would be really messy. This commit splits it into more classes.
2016-01-24 17:30:02 +01:00

75 lines
2.0 KiB
PHP

@extends('admin.layout')
@section('pageName', @trans('admin/userManagement.addNewUser'))
@section('content')
<h1>@lang('admin/userManagement.addNewUser')</h1>
@if (session('success'))
<div class="callout success">
{{ session('success') }}
</div>
@endif
@if (session('error'))
<div class="callout alert">
{{ session('error') }}
</div>
@endif
<form method="POST" action="{{route('users.newPost')}}">
{!! csrf_field() !!}
<label>
@lang('admin/userManagement.name')
<input type="text" placeholder="@lang('admin/userManagement.name')" name="name">
</label>
<label>
@lang('admin/userManagement.email')
<input type="text" name="email" placeholder="somebody@example.com">
@if (isset($errors) && $errors->has('email'))
<div class="callout alert">
{{ $errors->first('email') }}
</div>
@endif
</label>
<label>
@lang('admin/userManagement.password')
<input type="text" name="password">
@if (isset($errors) && $errors->has('password'))
<div class="callout alert">
{{ $errors->first('password') }}
</div>
@endif
</label>
<label>
@lang('admin/userManagement.roles')
<select name="role">
@foreach($roles as $role => $translation)
<option value="{{$role}}">@lang($translation)</option>
@endforeach
</select>
</label>
@if (isset($errors) && $errors->has('role'))
<div class="callout alert">
{{ $errors->first('role') }}
</div>
@endif
<label>
<button type="submit" class="button success">@lang('admin/userManagement.register')</button>
</label>
</form>
@stop