Add help text icon

This commit is contained in:
Zack Arnett 2020-04-20 18:01:41 -04:00
parent 4dd1200beb
commit 7b1bba0f16
6 changed files with 28 additions and 11 deletions

View File

@ -1789,3 +1789,9 @@ msgstr ""
msgid "Show an icon if the product is already on the shopping list" msgid "Show an icon if the product is already on the shopping list"
msgstr "" msgstr ""
msgid "Calories"
msgstr ""
msgid "By default the amount to be added to the shopping list is `needed amount - stock amount - shopping list amount` - when this is enabled, it is only checked against the stock amount, not against what is already on the shopping list"
msgstr ""

View File

@ -488,11 +488,16 @@ canvas.drawingBuffer {
flex-wrap: wrap; flex-wrap: wrap;
} }
.custom-control-label { .form-control-lg .custom-control-label {
padding-top: 7px; padding-top: 7px;
padding-left: 10px; padding-left: 10px;
} }
.custom-control-label {
padding-top: 13px;
padding-left: 10px;
}
.custom-control-label::before, .custom-control-label::before,
.custom-control-label::after { .custom-control-label::after {
top: 0.8rem; top: 0.8rem;

View File

@ -17,7 +17,9 @@
@php if(!isset($noNameAttribute)) { $noNameAttribute = false; } @endphp @php if(!isset($noNameAttribute)) { $noNameAttribute = false; } @endphp
<div class="form-group {{ $additionalGroupCssClasses }}"> <div class="form-group {{ $additionalGroupCssClasses }}">
<label for="{{ $id }}">{{ $__t($label) }}&nbsp;&nbsp;<span id="{{ $hintId }}" class="small text-muted">{{ $hint }}</span>{!! $additionalHtmlContextHelp !!}</label> <label for="{{ $id }}">
{{ $__t($label) }}&nbsp;
<i class="fas fa-question-circle" id="{{ $hintId }}" data-toggle="tooltip" title="{{ $hint }}"></i>{!! $additionalHtmlContextHelp !!}</label>
<div class="input-group"> <div class="input-group">
<input {!! $additionalAttributes !!} type="number" class="form-control numberpicker {{ $additionalCssClasses }}" id="{{ $id }}" @if(!$noNameAttribute) name="{{ $id }}" @endif value="{{ $value }}" min="{{ $min }}" max="{{ $max }}" step="{{ $step }}" @if($isRequired) required @endif> <input {!! $additionalAttributes !!} type="number" class="form-control numberpicker {{ $additionalCssClasses }}" id="{{ $id }}" @if(!$noNameAttribute) name="{{ $id }}" @endif value="{{ $value }}" min="{{ $min }}" max="{{ $max }}" step="{{ $step }}" @if($isRequired) required @endif>
<div class="input-group-append"> <div class="input-group-append">

View File

@ -13,7 +13,11 @@
@php if(empty($nextInputSelector)) { $nextInputSelector = ''; } @endphp @php if(empty($nextInputSelector)) { $nextInputSelector = ''; } @endphp
<div class="form-group" data-next-input-selector="{{ $nextInputSelector }}" data-disallow-add-product-workflows="{{ BoolToString($disallowAddProductWorkflows) }}" data-disallow-all-product-workflows="{{ BoolToString($disallowAllProductWorkflows) }}" data-prefill-by-name="{{ $prefillByName }}" data-prefill-by-id="{{ $prefillById }}"> <div class="form-group" data-next-input-selector="{{ $nextInputSelector }}" data-disallow-add-product-workflows="{{ BoolToString($disallowAddProductWorkflows) }}" data-disallow-all-product-workflows="{{ BoolToString($disallowAllProductWorkflows) }}" data-prefill-by-name="{{ $prefillByName }}" data-prefill-by-id="{{ $prefillById }}">
<label for="product_id">{{ $__t($label) }} <i class="fas fa-barcode"></i><span id="barcode-lookup-disabled-hint" class="small text-muted d-none"> {{ $__t('Barcode lookup is disabled') }}</span>&nbsp;&nbsp;<span class="small text-muted">{{ $hint }}</span></label> <label for="product_id">
{{ $__t($label) }}&nbsp;<i class="fas fa-barcode"></i>&nbsp;
<span id="barcode-lookup-disabled-hint" class="small text-muted d-none"> {{ $__t('Barcode lookup is disabled') }}</span>&nbsp;
<i class="fas fa-question-circle" data-toggle="tooltip" title="{{ $hint }}"></i>
</label>
<select class="form-control product-combobox barcodescanner-input" id="product_id" name="product_id" @if($isRequired) required @endif @if($disabled) disabled @endif data-target="@productpicker"> <select class="form-control product-combobox barcodescanner-input" id="product_id" name="product_id" @if($isRequired) required @endif @if($disabled) disabled @endif data-target="@productpicker">
<option value=""></option> <option value=""></option>
@foreach($products as $product) @foreach($products as $product)

View File

@ -79,14 +79,15 @@
)) ))
<div class="form-group"> <div class="form-group">
<div class="form-check custom-control custom-checkbox pt-0"> <div class="custom-control custom-checkbox">
<input type="hidden" name="not_check_shoppinglist" value="0"> <input type="hidden" name="not_check_shoppinglist" value="0">
<input @if($mode == 'edit' && $recipe->not_check_shoppinglist == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="not_check_shoppinglist" name="not_check_shoppinglist" value="1"> <input @if($mode == 'edit' && $recipe->not_check_shoppinglist == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="not_check_shoppinglist" name="not_check_shoppinglist" value="1">
<label class="form-check-label custom-control-label" for="not_check_shoppinglist"> <label class="form-check-label custom-control-label" for="not_check_shoppinglist">
{{ $__t('Do not check against the shopping list when adding missing items to it') }}&nbsp;&nbsp; {{ $__t('Do not check against the shopping list when adding missing items to it') }}&nbsp;
<span class="small text-muted"> <i class="fas fa-question-circle"
{{ $__t('By default the amount to be added to the shopping list is "needed amount - stock amount - shopping list amount" - when this is enabled, it is only checked against the stock amount, not against what is already on the shopping list') }} data-toggle="tooltip"
</span> title="{{ $__t('By default the amount to be added to the shopping list is `needed amount - stock amount - shopping list amount` - when this is enabled, it is only checked against the stock amount, not against what is already on the shopping list') }}"
></i>
</label> </label>
</div> </div>
</div> </div>

View File

@ -179,9 +179,8 @@
@endif @endif
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) @if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
<div class="col-6"> <div class="col-6">
<label>{{ $__t('Costs') }}&nbsp;&nbsp; <label>{{ $__t('Costs') }}&nbsp;</label>
<span class="small text-muted">{{ $__t('Based on the prices of the last purchase per product') }}</span> <i class="fas fa-question-circle" data-toggle="tooltip" title="{{ $__t('Based on the prices of the last purchase per product') }}"></i>
</label>
<p class="mb-0"> <p class="mb-0">
<h3 class="locale-number locale-number-currency pt-0">{{ $selectedRecipeTotalCosts }}</h3> <h3 class="locale-number locale-number-currency pt-0">{{ $selectedRecipeTotalCosts }}</h3>
</p> </p>