Merge pull request #998 from SevanNerse/master
Radio group partial is fixed.
This commit is contained in:
commit
fd43750e9e
2
resources/assets/js/plugins/form.js
vendored
2
resources/assets/js/plugins/form.js
vendored
@ -44,7 +44,7 @@ export default class Form {
|
||||
|
||||
if (type == 'radio') {
|
||||
if (!this[name]) {
|
||||
this[name] = form_element.getAttribute('value') || '';
|
||||
this[name] = (form_element.getAttribute('value') ? 1 : 0) || 0;
|
||||
}
|
||||
} else if (type == 'checkbox') {
|
||||
if (this[name]) {
|
||||
|
@ -49,7 +49,7 @@
|
||||
{{ Form::checkboxGroup('roles', trans_choice('general.roles', 2), $roles, 'display_name') }}
|
||||
@endpermission
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), true) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
||||
{{ Form::checkboxGroup('roles', trans_choice('general.roles', 2), $roles, 'display_name') }}
|
||||
@endpermission
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), $user->enabled) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -31,9 +31,9 @@
|
||||
|
||||
{{ Form::textareaGroup('bank_address', trans('accounts.bank_address')) }}
|
||||
|
||||
{{ Form::radioGroup('default_account', trans('accounts.default_account')) }}
|
||||
{{ Form::radioGroup('default_account', trans('accounts.default_account'), false) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), true) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -32,9 +32,9 @@
|
||||
|
||||
{{ Form::textareaGroup('bank_address', trans('accounts.bank_address')) }}
|
||||
|
||||
{{ Form::radioGroup('default_account', trans('accounts.default_account')) }}
|
||||
{{ Form::radioGroup('default_account', trans('accounts.default_account'), $account->default_account) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), $account->enabled) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
{{ Form::fileGroup('logo', trans('companies.logo')) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), true) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
{{ Form::fileGroup('logo', trans('companies.logo')) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), $company->enabled) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1), 'plus') }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), true) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), $item->enabled) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file', []) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), true) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file', []) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), $vendor->enabled) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file', []) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), true) }}
|
||||
|
||||
@stack('create_user_input_start')
|
||||
<div id="customer-create-user" class="form-group col-md-12 margin-top">
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file', []) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), $customer->enabled) }}
|
||||
|
||||
@stack('create_user_input_start')
|
||||
<div id="customer-create-user" class="form-group col-md-12 margin-top">
|
||||
|
@ -6,15 +6,17 @@
|
||||
|
||||
<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">
|
||||
<label class="btn btn-success" @click="form.{{ $name }}=1">
|
||||
<label class="btn btn-success" @click="form.{{ $name }}=1" v-bind:class="{ active: form.{{ $name }} }" >
|
||||
{{ trans('general.yes') }}
|
||||
<input type="radio" name="{{ $name }}" id="{{ $name }}-1" value="1" v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name }}">
|
||||
<input type="radio" name="{{ $name }}-1" id="{{ $name }}-1" v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name }}">
|
||||
</label>
|
||||
|
||||
<label class="btn btn-danger" @click="form.{{ $name }}=0">
|
||||
<label class="btn btn-danger" @click="form.{{ $name }}=0" v-bind:class="{ active: !form.{{ $name }} }" >
|
||||
{{ trans('general.no') }}
|
||||
<input type="radio" name="{{ $name }}" id="{{ $name }}-0" value="0" v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name }}">
|
||||
<input type="radio" name="{{ $name }}-0" id="{{ $name }}-0" v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name }}">
|
||||
</label>
|
||||
|
||||
<input type="radio" value="{{ $value ? true : false }}" name="{{ $name }}" class="d-none">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
</div>
|
||||
@stack('color_input_end')
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), true) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
</div>
|
||||
@stack('color_input_end')
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), $category->enabled) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -33,9 +33,9 @@
|
||||
|
||||
{{ Form::textGroup('thousands_separator', trans('currencies.thousands_separator'), 'slash', []) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), true) }}
|
||||
|
||||
{{ Form::radioGroup('default_currency', trans('currencies.default')) }}
|
||||
{{ Form::radioGroup('default_currency', trans('currencies.default'), false) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -34,9 +34,9 @@
|
||||
|
||||
{{ Form::textGroup('thousands_separator', trans('currencies.thousands_separator'), 'slash', []) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), $currency->enabled) }}
|
||||
|
||||
{{ Form::radioGroup('default_currency', trans('currencies.default')) }}
|
||||
{{ Form::radioGroup('default_currency', trans('currencies.default'), $currency->default_currency) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
{{ Form::selectGroup('list_limit', trans('settings.default.list_limit'), 'columns', ['10' => '10', '25' => '25', '50' => '50', '100' => '100'], !empty($setting['list_limit']) ? $setting['list_limit'] : null, []) }}
|
||||
|
||||
{{ Form::radioGroup('use_gravatar', trans('settings.default.use_gravatar')) }}
|
||||
{{ Form::radioGroup('use_gravatar', trans('settings.default.use_gravatar'), $setting->get('use_gravatar')) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -18,11 +18,11 @@
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::radioGroup('send_invoice_reminder', trans('settings.scheduling.send_invoice')) }}
|
||||
{{ Form::radioGroup('send_invoice_reminder', trans('settings.scheduling.send_invoice'), $setting->get('send_invoice_reminder')) }}
|
||||
|
||||
{{ Form::textGroup('invoice_days', trans('settings.scheduling.invoice_days'), 'calendar', []) }}
|
||||
|
||||
{{ Form::radioGroup('send_bill_reminder', trans('settings.scheduling.send_bill')) }}
|
||||
{{ Form::radioGroup('send_bill_reminder', trans('settings.scheduling.send_bill'), $setting->get('send_bill_reminder')) }}
|
||||
|
||||
{{ Form::textGroup('bill_days', trans('settings.scheduling.bill_days'), 'calendar', []) }}
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
{{ Form::selectGroup('type', trans_choice('general.types', 1), 'bars', $types, 'normal') }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), true) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
{{ Form::selectGroup('type', trans_choice('general.types', 1), 'bars', $types, $tax->type) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), $tax->enabled) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user