Don't show and use scan mode in embedded mode (dialogs)

This commit is contained in:
Bernd Bestel 2020-02-02 13:13:18 +01:00
parent 890663bf63
commit 3ca6982c39
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 12 additions and 0 deletions

View File

@ -18,7 +18,13 @@
<div class="col-xs-12 col-md-6 col-xl-4 pb-3">
<h1>
@yield('title')
@if(!$embedded)
<input @if(boolval($userSettings['scan_mode_consume_enabled'])) checked @endif id="scan-mode" type="checkbox" data-setting-key="scan_mode_consume_enabled" data-toggle="switchbutton" data-onlabel="{{ $__t('Scan mode') }} {{ $__t('on') }}" data-offlabel="{{ $__t('Scan mode') }} {{ $__t('off') }}" data-onstyle="success" data-offstyle="primary" data-style="ml-2" data-width="180">
@else
<script>
Grocy.UserSettings.scan_mode_consume_enabled = false;
</script>
@endif
</h1>
<form id="consume-form" novalidate>

View File

@ -18,7 +18,13 @@
<div class="col-xs-12 col-md-6 col-xl-4 pb-3">
<h1>
@yield('title')
@if(!$embedded)
<input @if(boolval($userSettings['scan_mode_purchase_enabled'])) checked @endif id="scan-mode" type="checkbox" data-setting-key="scan_mode_purchase_enabled" data-toggle="switchbutton" data-onlabel="{{ $__t('Scan mode') }} {{ $__t('on') }}" data-offlabel="{{ $__t('Scan mode') }} {{ $__t('off') }}" data-onstyle="success" data-offstyle="primary" data-style="ml-2" data-width="180">
@else
<script>
Grocy.UserSettings.scan_mode_purchase_enabled = false;
</script>
@endif
</h1>
<form id="purchase-form" novalidate>