@extends('admin.layouts.master') @section('title') @if(!$edit_mode) New role @else Edit role @endif @stop @section('content')
@if(!$edit_mode) New role @else Edit role @endif
{{ Form::open(array('url' => 'admin/settings/roles/save','class'=>'form-horizontal')) }} {{ Form::hidden('edit_mode', $edit_mode) }} @if($edit_mode) {{ Form::hidden('role_id', $role->id) }} @endif
@if($edit_mode) {{ Form::text('name', $edit_mode ? $role->name : Input::get('name'), array('class' => 'form-control', 'readonly' => 'readonly')) }} @else {{ Form::text('name', $edit_mode ? $role->name : Input::get('name'), array('class' => 'form-control')) }} @endif {{ Form::label('name') }}
{{ Form::text('display_name', $edit_mode ? $role->display_name : Input::get('display_name'), array('class' => 'form-control')) }} {{ Form::label('display_name') }}
{{ Form::textarea('description', $edit_mode ? $role->description : Input::get('description'), array('name'=>'description','id'=>'summernote_1','class' => 'form-control')) }} {{ Form::label('description') }}
{{ Form::label('permissions') }}
@foreach($permissions as $permission)
{{ Form::checkbox('permissions[]', $permission->id, $edit_mode ? $role->hasPermission($permission->name) : Input::get('permissions['.$permission->id.']'),array('class'=>'md-check','id'=>$permission->id)) }}
@endforeach
Cancel {{ Form::button(' Save', array('type' => 'submit', 'class' => 'btn btn-lg green')) }}
{{ Form::close() }}
@stop