@extends ('backend.layouts.app') @section ('title', trans('labels.backend.access.roles.management') . ' | ' . trans('labels.backend.access.roles.edit')) @section('page-header')

{{ trans('labels.backend.access.roles.management') }} {{ trans('labels.backend.access.roles.edit') }}

@endsection @section('content') {{ Form::model($role, ['route' => ['admin.access.role.update', $role], 'class' => 'form-horizontal', 'role' => 'form', 'method' => 'PATCH', 'id' => 'edit-role']) }}

{{ trans('labels.backend.access.roles.edit') }}

@include('backend.access.includes.partials.role-header-buttons')
{{ Form::label('name', trans('validation.attributes.backend.access.roles.name'), ['class' => 'col-lg-2 control-label']) }}
{{ Form::text('name', null, ['class' => 'form-control', 'placeholder' => trans('validation.attributes.backend.access.roles.name')]) }}
{{ Form::label('associated-permissions', trans('validation.attributes.backend.access.roles.associated_permissions'), ['class' => 'col-lg-2 control-label']) }}
@if ($role->id != 1) {{-- Administrator has to be set to all --}} {{ Form::select('associated-permissions', ['all' => 'All', 'custom' => 'Custom'], $role->all ? 'all' : 'custom', ['class' => 'form-control']) }} @else {{ trans('labels.general.all') }} @endif
{{ Form::label('sort', trans('validation.attributes.backend.access.roles.sort'), ['class' => 'col-lg-2 control-label']) }}
{{ Form::text('sort', null, ['class' => 'form-control', 'placeholder' => trans('validation.attributes.backend.access.roles.sort')]) }}
{{ link_to_route('admin.access.role.index', trans('buttons.general.cancel'), [], ['class' => 'btn btn-danger btn-xs']) }}
{{ Form::submit(trans('buttons.general.crud.update'), ['class' => 'btn btn-success btn-xs']) }}
{{ Form::close() }} @endsection @section('after-scripts') {{ Html::script('js/backend/access/roles/script.js') }} @endsection