close #2005 Fixed: Default currency fields should be disabled for default currency

This commit is contained in:
Cüneyt Şentürk 2021-04-26 18:37:14 +03:00
parent 8fa5d994e9
commit c5387f0eb0
3 changed files with 25 additions and 1 deletions

View File

@ -930,6 +930,11 @@ button.bg-yellow:focus
{
box-shadow: none, 0 0 0 0 rgba(109, 162, 82, .5);
}
.form-group.disabled .btn-group.btn-group-toggle.radio-yes-no .btn-success.active-disabled {
color: #ffffff !important;
border-color: #6da252 !important;
background-color: #6da252 !important;
}
/*--Success Color Finish--*/
/*--Danger Color--*/
@ -972,6 +977,11 @@ button.bg-yellow:focus
{
box-shadow: none, 0 0 0 0 rgba(239, 50, 50, .5);
}
.form-group.disabled .btn-group.btn-group-toggle.radio-yes-no .btn-danger.active-disabled {
color: #ffffff !important;
border-color: #ef3232 !important;
background-color: #ef3232 !important;
}
/*--Danger Color Finish--*/
/*--Warning Color--*/

View File

@ -13,15 +13,29 @@
<div class="tab-pane tab-example-result fade show active" role="tabpanel" aria-labelledby="-component-tab">
<div class="btn-group btn-group-toggle radio-yes-no" data-toggle="buttons">
@if (empty($attributes['disabled']))
<label class="btn btn-success" @click="form.{{ $name }}=1" v-bind:class="{ active: form.{{ $name }} == 1 }">
{{ trans('general.yes') }}
<input type="radio" name="{{ $name }}" id="{{ $name }}-1" v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : (!empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name : 'form.' . $name) }}">
</label>
@else
<label class="btn btn-success{{ ($value) ? ' active-disabled disabled' : ' disabled' }}">
{{ trans('general.yes') }}
<input type="radio" name="{{ $name }}" id="{{ $name }}-1" disabled>
</label>
@endif
@if (empty($attributes['disabled']))
<label class="btn btn-danger" @click="form.{{ $name }}=0" v-bind:class="{ active: form.{{ $name }} == 0 }">
{{ trans('general.no') }}
<input type="radio" name="{{ $name }}" id="{{ $name }}-0" v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : (!empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name : 'form.' . $name) }}">
</label>
@else
<label class="btn btn-danger{{ ($value) ? ' disabled' : ' active-disabled disabled' }}">
{{ trans('general.no') }}
<input type="radio" name="{{ $name }}" id="{{ $name }}-0" disabled>
</label>
@endif
</div>
<input type="hidden" name="{{ $name }}" value="{{ ($value) ? 1 : 0 }}" />

View File

@ -36,7 +36,7 @@
{{ Form::radioGroup('enabled', trans('general.enabled'), $currency->enabled) }}
{{ Form::radioGroup('default_currency', trans('currencies.default'), $currency->default_currency) }}
{{ Form::radioGroup('default_currency', trans('currencies.default'), $currency->default_currency, '', '', ['disabled' => (setting('default.currency') == $currency->code) ? 'disabled': false]) }}
</div>
</div>