Optimized datetime Userfields handling (fixes #2108)

This commit is contained in:
Bernd Bestel 2023-02-06 20:36:26 +01:00
parent b18bd2ff87
commit c9c0baefeb
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
3 changed files with 5 additions and 4 deletions

View File

@ -73,6 +73,7 @@
### Userfields
- Product group Userfields are now also rendered on the shopping list
- Fixed that when having e.g. a Userfield for the `stock` entity and using the "Never overdue" shortcut checkbox for the due date on purchase, this Userfield would also be set to the corresponding "never overdue date"
### General

View File

@ -76,7 +76,7 @@ $(document).on('click', '.userfield-delete-button', function(e)
});
});
if (GetUriParam("entity")
if (GetUriParam("entity"))
{
$("#entity-filter").val(GetUriParam("entity"));
$("#entity-filter").trigger("change");

View File

@ -56,7 +56,7 @@
'value' => ''
))
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_DATE)
@include('components.datetimepicker', array(
@include('components.datetimepicker2', array(
'id' => $userfield->name,
'label' => $userfield->caption,
'noNameAttribute' => true,
@ -64,13 +64,13 @@
'initWithNow' => false,
'limitEndToNow' => false,
'limitStartToNow' => false,
'additionalGroupCssClasses' => 'date-only-datetimepicker',
'additionalGroupCssClasses' => 'date-only-datetimepicker2',
'isRequired' => $userfield->input_required == 1,
'additionalCssClasses' => 'userfield-input',
'additionalAttributes' => 'data-userfield-name="' . $userfield->name . '"'
))
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_DATETIME)
@include('components.datetimepicker', array(
@include('components.datetimepicker2', array(
'id' => $userfield->name,
'label' => $userfield->caption,
'noNameAttribute' => true,