137 lines
4.7 KiB
PHP
137 lines
4.7 KiB
PHP
@if (session('success'))
|
|
<div data-alert class="callout success">
|
|
<strong>{{ session('success') }}</strong>
|
|
</div>
|
|
@endif
|
|
|
|
@if (session('error'))
|
|
<div data-alert class="callout alert">
|
|
<strong>{{ session('error') }}</strong>
|
|
</div>
|
|
@endif
|
|
|
|
<form method="POST" action="{{route('customfields.editPost', ['id' => $field->id])}}">
|
|
{!! csrf_field() !!}
|
|
|
|
<div class="row">
|
|
<div class="large-12 columns">
|
|
<label>
|
|
@lang('admin/customFields.name')
|
|
<input type="text" placeholder="@lang('admin/customFields.name')" value="{{$field->name}}" name="name">
|
|
|
|
@if (isset($errors) && $errors->has('name'))
|
|
<div class="callout alert">
|
|
{{ $errors->first('name') }}
|
|
</div>
|
|
@endif
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="large-6 columns">
|
|
<label>
|
|
@lang('admin/customFields.description')
|
|
|
|
<textarea rows="5" name="description" placeholder="@lang('admin/customFields.description')">{{$field->description}}</textarea>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="large-6 columns">
|
|
|
|
<label>
|
|
@lang('admin/customFields.type')
|
|
|
|
<select name="type" disabled>
|
|
@foreach($types as $type => $translation)
|
|
<option value="{{$type}}"@if($field->type_id == $type) selected @endif>@lang($translation)</option>
|
|
@endforeach
|
|
</select>
|
|
|
|
@if (isset($errors) && $errors->has('type'))
|
|
<div class="callout alert">
|
|
{{ $errors->first('type') }}
|
|
</div>
|
|
@endif
|
|
</label>
|
|
|
|
<label>
|
|
@lang('admin/customFields.resource')
|
|
|
|
<select name="resource" disabled>
|
|
@foreach($resources as $resource => $translation)
|
|
<option value="{{$resource}}"@if($field->resource_id == $resource) selected @endif>@lang($translation)</option>
|
|
@endforeach
|
|
</select>
|
|
|
|
@if (isset($errors) && $errors->has('resource'))
|
|
<div class="callout alert">
|
|
{{ $errors->first('resource') }}
|
|
</div>
|
|
@endif
|
|
</label>
|
|
|
|
<label>
|
|
@lang('admin/customFields.required')
|
|
|
|
<input type="checkbox" placeholder="@lang('admin/customFields.required')" @if ($field->required) checked="checked" @endif name="required">
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="columns large-6">
|
|
<label>
|
|
@lang('admin/customFields.possibleValues')
|
|
|
|
<textarea placeholder="@lang('admin/customFields.possibleValues')" name="possibleValues" rows="4">{{$field->possibleValues}}</textarea>
|
|
</label>
|
|
</div>
|
|
<div class="columns large-6">
|
|
<label>
|
|
@lang('admin/customFields.defaultValue')
|
|
|
|
<input type="text" placeholder="@lang('admin/customFields.defaultValue')" value="{{$field->defaultValue}}" name="defaultValue">
|
|
</label>
|
|
|
|
<label>
|
|
@lang('admin/customFields.regExp')
|
|
|
|
<input type="text" placeholder="@lang('admin/customFields.regExp')" value="{{$field->regExp}}" name="regExp">
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="large-6 columns">
|
|
<label>
|
|
@lang('admin/customFields.minLength')
|
|
|
|
<input type="text" placeholder="@lang('admin/customFields.minLength')" value="{{$field->minLength}}" name="minLength">
|
|
|
|
@if (isset($errors) && $errors->has('minLength'))
|
|
<div class="callout alert">
|
|
{{ $errors->first('minLength') }}
|
|
</div>
|
|
@endif
|
|
</label>
|
|
</div>
|
|
<div class="large-6 columns">
|
|
<label>
|
|
@lang('admin/customFields.maxLength')
|
|
|
|
<input type="text" placeholder="@lang('admin/customFields.maxLength')" value="{{$field->macLength}}" name="maxLength">
|
|
|
|
@if (isset($errors) && $errors->has('maxLength'))
|
|
<div class="callout alert">
|
|
{{ $errors->first('maxLength') }}
|
|
</div>
|
|
@endif
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<label>
|
|
<button type="submit" class="button success">@lang('admin/customFields.createNew')</button>
|
|
</label>
|
|
</form>
|