2016-03-25 01:18:05 -07:00
|
|
|
@extends('layouts/default')
|
|
|
|
|
|
|
|
{{-- Web site Title --}}
|
|
|
|
@section('title')
|
|
|
|
{{ trans('admin/groups/titles.edit_group') }}
|
|
|
|
@parent
|
|
|
|
@stop
|
|
|
|
|
|
|
|
@section('header_right')
|
|
|
|
<a href="{{ route('groups') }}" class="btn btn-primary pull-right">
|
|
|
|
{{ trans('general.back') }}</a>
|
|
|
|
@stop
|
|
|
|
|
|
|
|
{{-- Content --}}
|
|
|
|
@section('content')
|
|
|
|
|
|
|
|
<style>
|
|
|
|
label.radio-padding {
|
|
|
|
margin-right: 25px;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
2016-04-28 14:03:54 -07:00
|
|
|
|
2016-03-25 01:18:05 -07:00
|
|
|
<div class="row">
|
2016-07-22 02:11:57 -07:00
|
|
|
<div class="col-md-8 col-md-offset-2">
|
2016-03-25 01:18:05 -07:00
|
|
|
<div class="box box-default">
|
|
|
|
|
|
|
|
@if ($group->id)
|
|
|
|
<div class="box-header with-border">
|
|
|
|
<div class="box-heading">
|
|
|
|
<h3 class="box-title"> {{ $group->name }}</h3>
|
|
|
|
</div>
|
|
|
|
</div><!-- /.box-header -->
|
|
|
|
@endif
|
|
|
|
|
|
|
|
<div class="box-body">
|
|
|
|
|
|
|
|
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
|
|
|
<!-- CSRF Token -->
|
|
|
|
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
|
|
|
|
|
|
|
<!-- Name -->
|
|
|
|
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
|
|
|
|
<label for="name" class="col-md-3 control-label">{{ trans('admin/groups/titles.group_name') }}
|
|
|
|
<i class='fa fa-asterisk'></i></label>
|
|
|
|
</label>
|
2016-07-22 02:11:57 -07:00
|
|
|
<div class="col-md-6 required">
|
2016-03-25 01:18:05 -07:00
|
|
|
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $group->name) }}" />
|
|
|
|
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-04-28 14:03:54 -07:00
|
|
|
|
2016-07-22 02:11:57 -07:00
|
|
|
<div class="col-md-8 col-md-offset-3">
|
2016-03-25 01:18:05 -07:00
|
|
|
|
|
|
|
@foreach ($permissions as $area => $permission)
|
|
|
|
|
2016-04-28 14:03:54 -07:00
|
|
|
@for ($i = 0; $i < count($permission); $i++)
|
|
|
|
<?php
|
|
|
|
$permission_name = $permission[$i]['permission'];
|
|
|
|
?>
|
2016-03-25 01:18:05 -07:00
|
|
|
|
2016-04-28 14:03:54 -07:00
|
|
|
@if ($permission[$i]['display'])
|
|
|
|
<h3>{{ $area }}: {{ $permission[$i]['label'] }}</h3>
|
|
|
|
<p>{{ $permission[$i]['note'] }}</p>
|
2016-03-25 01:18:05 -07:00
|
|
|
|
2016-04-28 14:03:54 -07:00
|
|
|
<!-- radio -->
|
|
|
|
<div class="form-group" style="padding-left: 15px;">
|
2016-03-25 01:18:05 -07:00
|
|
|
|
2016-04-28 14:03:54 -07:00
|
|
|
<label class="radio-padding">
|
2016-05-20 12:23:31 -07:00
|
|
|
{{ Form::radio('permission['.$permission_name.']', 1,
|
|
|
|
(array_key_exists($permission_name, $groupPermissions) && $groupPermissions[$permission_name]), ['class' => 'minimal']) }}
|
2016-04-28 14:03:54 -07:00
|
|
|
Grant</label>
|
|
|
|
|
|
|
|
<label class="radio-padding">
|
2016-05-20 12:23:31 -07:00
|
|
|
{{ Form::radio('permission['.$permission_name.']', 0, (!array_key_exists($permission_name, $groupPermissions) || !$groupPermissions[$permission_name]), ['class' => 'minimal']) }}
|
2016-04-28 14:03:54 -07:00
|
|
|
Deny</label>
|
|
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
@endif
|
|
|
|
@endfor
|
2016-03-25 01:18:05 -07:00
|
|
|
@endforeach
|
|
|
|
|
2016-04-28 14:03:54 -07:00
|
|
|
</div>
|
2016-03-25 01:18:05 -07:00
|
|
|
|
2016-04-28 14:03:54 -07:00
|
|
|
<hr>
|
2016-03-25 01:18:05 -07:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="box-footer text-right">
|
|
|
|
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@stop
|