mirror of
https://github.com/grocy/grocy.git
synced 2026-04-07 05:16:15 +02:00
Set location as freezer
This commit is contained in:
parent
93ed344f58
commit
dd6b062af4
|
|
@ -3368,6 +3368,9 @@
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"freezer": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
"row_created_timestamp": {
|
"row_created_timestamp": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "date-time"
|
"format": "date-time"
|
||||||
|
|
@ -3377,6 +3380,7 @@
|
||||||
"id": "2",
|
"id": "2",
|
||||||
"name": "0",
|
"name": "0",
|
||||||
"description": null,
|
"description": null,
|
||||||
|
"freezer": "0",
|
||||||
"row_created_timestamp": "2019-05-02 20:12:25"
|
"row_created_timestamp": "2019-05-02 20:12:25"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -3579,6 +3583,7 @@
|
||||||
"location": {
|
"location": {
|
||||||
"id": "4",
|
"id": "4",
|
||||||
"name": "Candy cupboard",
|
"name": "Candy cupboard",
|
||||||
|
"freezer": "0",
|
||||||
"description": null,
|
"description": null,
|
||||||
"row_created_timestamp": "2019-05-02 20:12:25"
|
"row_created_timestamp": "2019-05-02 20:12:25"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
var jsonData = $('#location-form').serializeJSON();
|
var jsonData = $('#location-form').serializeJSON();
|
||||||
Grocy.FrontendHelpers.BeginUiBusy("location-form");
|
Grocy.FrontendHelpers.BeginUiBusy("location-form");
|
||||||
|
jsonData.freezer = $('#freezer').is(':checked');
|
||||||
|
|
||||||
if (Grocy.EditMode === 'create')
|
if (Grocy.EditMode === 'create')
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<select class="form-control location-combobox" id="location_id" name="location_id" @if($isRequired) required @endif>
|
<select class="form-control location-combobox" id="location_id" name="location_id" @if($isRequired) required @endif>
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
@foreach($locations as $location)
|
@foreach($locations as $location)
|
||||||
<option value="{{ $location->id }}">{{ $location->name }}</option>
|
<option value="{{ $location->id }}" data-freezer="{{ $location->freezer }}">{{ $location->name }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
<div class="invalid-feedback">{{ $__t('You have to select a location') }}</div>
|
<div class="invalid-feedback">{{ $__t('You have to select a location') }}</div>
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,14 @@
|
||||||
<div class="invalid-feedback">{{ $__t('A name is required') }}</div>
|
<div class="invalid-feedback">{{ $__t('A name is required') }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="form-check">
|
||||||
|
<input type="hidden" name="freezer" value="0">
|
||||||
|
<input @if($mode == 'edit' && $location->freezer == 1) checked @endif class="form-check-input" type="checkbox" id="freezer" name="freezer" value="1">
|
||||||
|
<label class="form-check-label" for="freezer">{{ $__t('Freezer') }}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="description">{{ $__t('Description') }}</label>
|
<label for="description">{{ $__t('Description') }}</label>
|
||||||
<textarea class="form-control" rows="2" id="description" name="description">@if($mode == 'edit'){{ $location->description }}@endif</textarea>
|
<textarea class="form-control" rows="2" id="description" name="description">@if($mode == 'edit'){{ $location->description }}@endif</textarea>
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th class="border-right"></th>
|
<th class="border-right"></th>
|
||||||
<th>{{ $__t('Name') }}</th>
|
<th>{{ $__t('Name') }}</th>
|
||||||
|
<th>{{ $__t('Freezer') }}</th>
|
||||||
<th>{{ $__t('Description') }}</th>
|
<th>{{ $__t('Description') }}</th>
|
||||||
|
|
||||||
@include('components.userfields_thead', array(
|
@include('components.userfields_thead', array(
|
||||||
|
|
@ -55,6 +56,9 @@
|
||||||
<td>
|
<td>
|
||||||
{{ $location->name }}
|
{{ $location->name }}
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ $location->freezer }}
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{ $location->description }}
|
{{ $location->description }}
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user