Newlines in possible values in custom fields are now replaced by pipe (|). This commit also fixes typo caused by copy-paste (resource was sent as type).
125 lines
4.4 KiB
PHP
125 lines
4.4 KiB
PHP
<form method="POST" action="{{route('customfields.newPost')}}">
|
|
{!! csrf_field() !!}
|
|
|
|
<div class="row">
|
|
<div class="large-6 columns">
|
|
<label>
|
|
@lang('admin/customFields.name')
|
|
<input type="text" placeholder="@lang('admin/customFields.name')" value="{{old('name')}}" name="name">
|
|
|
|
@if (isset($errors) && $errors->has('name'))
|
|
<div class="callout alert">
|
|
{{ $errors->first('name') }}
|
|
</div>
|
|
@endif
|
|
</label>
|
|
</div>
|
|
<div class="large-6 columns">
|
|
<label>
|
|
@lang('admin/customFields.type')
|
|
|
|
<select name="type">
|
|
@foreach($types as $type => $translation)
|
|
<option value="{{$type}}"@if(old('type') == $type) selected @endif>@lang($translation)</option>
|
|
@endforeach
|
|
</select>
|
|
|
|
@if (isset($errors) && $errors->has('type'))
|
|
<div class="callout alert">
|
|
{{ $errors->first('type') }}
|
|
</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')">{{old('description')}}</textarea>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="large-6 columns">
|
|
|
|
<label>
|
|
@lang('admin/customFields.resource')
|
|
|
|
<select name="resource">
|
|
@foreach($resources as $resource => $translation)
|
|
<option value="{{$resource}}"@if(old('resource') == $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 (old('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">{{old('possibleValues')}}</textarea>
|
|
</label>
|
|
</div>
|
|
<div class="columns large-6">
|
|
<label>
|
|
@lang('admin/customFields.defaultValue')
|
|
|
|
<input type="text" placeholder="@lang('admin/customFields.defaultValue')" value="{{old('defaultValue')}}" name="defaultValue">
|
|
</label>
|
|
|
|
<label>
|
|
@lang('admin/customFields.regExp')
|
|
|
|
<input type="text" placeholder="@lang('admin/customFields.regExp')" value="{{old('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="{{old('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="{{old('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> |