mirror of
https://github.com/grocy/grocy.git
synced 2025-10-12 16:44:55 +00:00
Implemented new Userfield type "Select list" (closes #325)
This commit is contained in:
@@ -7,9 +7,11 @@
|
||||
<td>
|
||||
@if($userfieldObject !== null)
|
||||
@if($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_CHECKBOX)
|
||||
@if($userfieldObject->value == 1)<i class="fas fa-check"></i>@endif
|
||||
@if($userfieldObject->value == 1)<i class="fas fa-check"></i>@endif
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_PRESET_CHECKLIST)
|
||||
{!! str_replace(',', '<br>', $userfieldObject->value) !!}
|
||||
@else
|
||||
{{ $userfieldObject->value }}
|
||||
{{ $userfieldObject->value }}
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
|
@@ -84,6 +84,15 @@
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_PRESET_CHECKLIST)
|
||||
<div class="form-group">
|
||||
<label for="{{ $userfield->name }}">{{ $userfield->caption }}</label>
|
||||
<select multiple class="form-control userfield-input selectpicker" data-userfield-name="{{ $userfield->name }}" data-actions-Box="true" data-live-search="true">
|
||||
@foreach(preg_split('/\r\n|\r|\n/', $userfield->config) as $option)
|
||||
<option value="{{ $option }}">{{ $option }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@endforeach
|
||||
|
Reference in New Issue
Block a user