snipe-it/resources/views/groups/edit.blade.php
Andrea Bergamasco e7f7d739ed Bugfixes based on functional tests (#3338)
* Toggles the disabled state of auto_increment_prefix

To insert a prefix you had to toggle the checkbox, save the settings and reload. With this script it is immediate. Fixes #1390

* Delete asset image: made checkbox more visible

Related to #3153

* Added personal-access-token component

* Created basic API testing configuration

* First version of /components endpoind cest

* On-the-fly bearer token generation

* Completed testing of PATCH and PUT methods

* Added /components/{id}/assets route with tests

* Updated route and dataTable in view

* Completed test assertion

* Added links to assets in ComponentsAssets view

* Linked Company in AssetView page

* Bugfixes based on functional tests

* Removed unused function

* Marked tests as incomplete

* Added check for  existence in groups/edit.blade.php
2017-02-22 22:49:19 -08:00

62 lines
2.4 KiB
PHP
Executable file

@extends('layouts/edit-form', [
'createText' => trans('admin/groups/titles.create') ,
'updateText' => trans('admin/groups/titles.update'),
'helpTitle' => trans('admin/groups/general.about_groups_title'),
'helpText' => trans('admin/groups/general.about_groups_text'),
'item' => $group,
'formAction' => ($group !== null && $group->id !== null) ? route('groups.update', ['accessory' => $group->id]) : route('groups.store'),
])
@section('content')
<style>
label.radio-padding {
margin-right: 25px;
}
</style>
@parent
@stop
@section('inputFields')
<!-- 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>
<div class="col-md-6 required">
<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>
<div class="col-md-8 col-md-offset-3">
@foreach ($permissions as $area => $permission)
@for ($i = 0; $i < count($permission); $i++)
<?php
$permission_name = $permission[$i]['permission'];
?>
@if ($permission[$i]['display'])
<h3>{{ $area }}: {{ $permission[$i]['label'] }}</h3>
<p>{{ $permission[$i]['note'] }}</p>
<!-- radio -->
<div class="form-group" style="padding-left: 15px;">
<label class="radio-padding">
{{ Form::radio('permission['.$permission_name.']', 1,
(is_array($groupPermissions))
&& (array_key_exists($permission_name, $groupPermissions)
&& $groupPermissions[$permission_name]), ['class' => 'minimal']) }}
Grant
</label>
<label class="radio-padding">
{{ Form::radio('permission['.$permission_name.']', 0, ((is_array($groupPermissions) && !array_key_exists($permission_name, $groupPermissions)) || !$groupPermissions[$permission_name]), ['class' => 'minimal']) }}
Deny
</label>
</div>
<hr>
@endif
@endfor
@endforeach
</div>
@stop