3
0
Fork 0
This repository has been archived on 2024-11-14. You can view files and clone it, but cannot push or open issues or pull requests.
ThemeParkPlus-Panel/resources/views/panel/ums/edit.blade.php

134 lines
6.9 KiB
PHP
Raw Normal View History

2020-02-26 13:59:58 +00:00
@extends('layouts.admin')
@section('css')
<link href="{{ asset('assets/css/bootstrap-multiselect.css') }}" rel="stylesheet">
@endsection
@section('page', 'User Manager')
@section('navigation')
<li class="treeview">
<a>
<i class="fas fa-user"></i> <span>Account</span>
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
</a>
<ul class="treeview-menu">
<li><a href="{{ route('panel.profile') }}"><i class="fas fa-id-badge"></i> Profile</a></li>
<li><a href="{{ route('panel.change') }}"><i class="fas fa-clipboard"></i> Change</a></li>
<li class="hidden-xs"><a href="{{ route('panel.security') }}"><i class="fas fa-lock"></i> Security</a></li>
</ul>
</li>
<li class="header">NAVIGATION</li>
<li>
<a href="{{ route('panel.home') }}"><i class="fas fa-tachometer-alt"></i> <span>Dashboard</span></a>
</li>
@canany(['project_see', 'status_see'])
<li class="treeview">
<a>
<i class="fas fa-list"></i> <span>Projects</span>
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
</a>
<ul class="treeview-menu">
@can('project_see')<li><a href="{{ route('panel.project') }}"><i class="fas fa-clipboard"></i> Project</a></li>@endcan
@can('order_see')<li><a href="{{ route('panel.order') }}"><i class="fas fa-file-invoice"></i> Order</a></li>@endcan
@can('status_see')<li><a href="{{ route('panel.status') }}"><i class="fas fa-clipboard"></i> Status</a></li>@endcan
</ul>
</li>
@endcanany
<li class="active treeview menu-open">
<a>
<i class="fas fa-user"></i> <span>Management</span>
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
</a>
<ul class="treeview-menu">
<li class="active"><a><i class="fas fa-id-badge"></i> Users</a></li>
@can('roles_see')<li><a href="{{ route('panel.role') }}"><i class="fas fa-lock"></i> Roles</a></li>@endcan
</ul>
</li>
@endsection
@section('content')
<div class="col-xs-12 col-lg-6 col-lg-offset-3 col-md-8 col-md-offset-2">
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title" style="margin-top: 8px"><strong>#{{ $user->id }}: </strong>{{ $user->fullname() }}</h3>
<small style="float: right"><a class="btn btn-primary" href="{{ route('panel.ums') }}">Back</a></small>
</div>
<div class="box-body">
@if(session('error'))
<div class="alert alert-success" role="alert">
{{ session('error') }}
<a class="close" data-dismiss="alert" aria-label="close">&times;</a>
</div>
@endif
<form method="POST" action="{{ route('panel.ums.update') }}" class="col-xs-10 col-xs-offset-1">
@csrf
<input type="number" name="id" value="{{ $user->id }}" style="display: none">
<div class="form-group @error('email') has-error @enderror">
<label for="email" class="text-md-right">{{ __('Email:') }}</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span>
<input id="email" type="email" class="form-control" placeholder="Email Address" name="email" value="{{ $user->email }}" required autocomplete="off" autofocus>
</div>
@error('email')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<div class="form-group @error('roles') has-error @enderror">
<label for="roles" class="text-md-right">{{ __('Roles:') }}</label>
<select class="form-control" id="roles" name="roles[]" multiple>
@if(!empty($roles))
@foreach($roles as $role)
<option value="{{ $role->name }}" @if($user->hasRole($role->name)) selected @endif >{{ $role->readable_name }}</option>
@endforeach
@endif
</select>
@error('roles')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<div class="form-group @error('permissions') has-error @enderror">
<label for="permissions" class="text-md-right">{{ __('Permissions:') }}</label>
<select class="form-control" id="permissions" name="permissions[]" multiple>
@if(!empty($permissions))
@foreach($permissions as $permission)
<option value="{{ $permission->name }}" @if($user->hasDirectPermission($permission->name)) selected @endif >{{ $permission->name }}</option>
@endforeach
@endif
</select>
@error('permissions')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<button type="submit" class="btn btn-block btn-primary">{{ __('Edit User') }}</button>
</form>
</div>
</div>
</div>
@endsection
@section('javascript')
<script src="{{ asset('assets/js/bootstrap-multiselect.js') }}"></script>
<script>
$(function () {
$('#roles').multiselect({
includeSelectAllOption: true,
enableFiltering: true
});
$('#permissions').multiselect({
includeSelectAllOption: true,
enableFiltering: true
});
});
</script>
@endsection