Make Userfields reorderable (closes #1134)

This commit is contained in:
Bernd Bestel
2020-11-17 20:12:45 +01:00
parent 887526c727
commit 6270f39688
6 changed files with 44 additions and 3 deletions

View File

@@ -49,7 +49,12 @@
</div>
<div class="form-group">
<label for="name">{{ $__t('Name') }}</label>
<label for="name">
{{ $__t('Name') }}
<i class="fas fa-question-circle text-muted"
data-toggle="tooltip"
title="{{ $__t('This is the internal field name, e. g. for the API') }}"></i>
</label>
<input type="text"
class="form-control"
required
@@ -61,7 +66,12 @@
</div>
<div class="form-group">
<label for="name">{{ $__t('Caption') }}</label>
<label for="name">
{{ $__t('Caption') }}
<i class="fas fa-question-circle text-muted"
data-toggle="tooltip"
title="{{ $__t('This is used to display the field on the frontend') }}"></i>
</label>
<input type="text"
class="form-control"
required
@@ -71,6 +81,15 @@
<div class="invalid-feedback">{{ $__t('A caption is required') }}</div>
</div>
@include('components.numberpicker', array(
'id' => 'sort_number',
'label' => 'Sort number',
'min' => 0,
'value' => $userfield->sort_number,
'isRequired' => false,
'hint' => $__t('Multiple Userfields will be ordered by that number on the input form')
))
<div class="form-group">
<label for="type">{{ $__t('Type') }}</label>
<select required

View File

@@ -92,6 +92,7 @@
<th>{{ $__t('Name') }}</th>
<th>{{ $__t('Caption') }}</th>
<th>{{ $__t('Type') }}</th>
<th>{{ $__t('Sort number') }}</th>
</tr>
</thead>
<tbody class="d-none">
@@ -125,6 +126,9 @@
<td>
{{ $__t($userfield->type) }}
</td>
<td>
{{ $userfield->sort_number }}
</td>
</tr>
@endforeach
</tbody>