close #2005 Fixed: Default currency fields should be disabled for default currency
This commit is contained in:
parent
8fa5d994e9
commit
c5387f0eb0
10
public/css/akaunting-color.css
vendored
10
public/css/akaunting-color.css
vendored
@ -930,6 +930,11 @@ button.bg-yellow:focus
|
|||||||
{
|
{
|
||||||
box-shadow: none, 0 0 0 0 rgba(109, 162, 82, .5);
|
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--*/
|
/*--Success Color Finish--*/
|
||||||
|
|
||||||
/*--Danger Color--*/
|
/*--Danger Color--*/
|
||||||
@ -972,6 +977,11 @@ button.bg-yellow:focus
|
|||||||
{
|
{
|
||||||
box-shadow: none, 0 0 0 0 rgba(239, 50, 50, .5);
|
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--*/
|
/*--Danger Color Finish--*/
|
||||||
|
|
||||||
/*--Warning Color--*/
|
/*--Warning Color--*/
|
||||||
|
@ -13,15 +13,29 @@
|
|||||||
|
|
||||||
<div class="tab-pane tab-example-result fade show active" role="tabpanel" aria-labelledby="-component-tab">
|
<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">
|
<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 }">
|
<label class="btn btn-success" @click="form.{{ $name }}=1" v-bind:class="{ active: form.{{ $name }} == 1 }">
|
||||||
{{ trans('general.yes') }}
|
{{ 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) }}">
|
<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>
|
</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 }">
|
<label class="btn btn-danger" @click="form.{{ $name }}=0" v-bind:class="{ active: form.{{ $name }} == 0 }">
|
||||||
{{ trans('general.no') }}
|
{{ 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) }}">
|
<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>
|
</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>
|
</div>
|
||||||
|
|
||||||
<input type="hidden" name="{{ $name }}" value="{{ ($value) ? 1 : 0 }}" />
|
<input type="hidden" name="{{ $name }}" value="{{ ($value) ? 1 : 0 }}" />
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
{{ Form::radioGroup('enabled', trans('general.enabled'), $currency->enabled) }}
|
{{ 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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user