diff --git a/app/Providers/Form.php b/app/Providers/Form.php index 75dd3b827..635582cbb 100644 --- a/app/Providers/Form.php +++ b/app/Providers/Form.php @@ -19,10 +19,18 @@ class Form extends Provider 'name', 'text', 'icon', 'attributes' => ['required' => 'required'], 'value' => null, 'col' => 'col-md-6', 'group_class' => null ]); + Facade::component('dateTimeGroup', 'partials.form.date_time_group', [ + 'name', 'text', 'icon', 'attributes' => ['required' => 'required'], 'value' => null, 'col' => 'col-md-6', 'group_class' => null + ]); + Facade::component('dateGroup', 'partials.form.date_group', [ 'name', 'text', 'icon', 'attributes' => ['required' => 'required'], 'value' => null, 'col' => 'col-md-6', 'group_class' => null ]); + Facade::component('timeGroup', 'partials.form.time_group', [ + 'name', 'text', 'icon', 'attributes' => ['required' => 'required'], 'value' => null, 'col' => 'col-md-6', 'group_class' => null + ]); + Facade::component('textGroup', 'partials.form.text_group', [ 'name', 'text', 'icon', 'attributes' => ['required' => 'required'], 'value' => null, 'col' => 'col-md-6', 'group_class' => null ]); diff --git a/public/css/custom.css b/public/css/custom.css index 2940b0d6a..782df8eb2 100644 --- a/public/css/custom.css +++ b/public/css/custom.css @@ -850,7 +850,7 @@ table .align-items-center td span.badge { /*----------------RESPONSIVE END LINE----------------*/ /*--------From Group Disabled--------*/ -.form-group.disabled .input-group-text { +.form-group.disabled .input-group-text, .form-group.readonly .input-group-text { background-color: #e9ecef; } /*--------From Group Disabled Finish--------*/ diff --git a/resources/assets/js/components/AkauntingDate.vue b/resources/assets/js/components/AkauntingDate.vue index 2b7ee1087..d10dc7aff 100644 --- a/resources/assets/js/components/AkauntingDate.vue +++ b/resources/assets/js/components/AkauntingDate.vue @@ -1,18 +1,25 @@ + :name="name" + :class="[ + {'readonly': readonly}, + {'disabled': disabled}, + formClasses + ]" + :error="formError" + :prependIcon="icon" + :readonly="readonly" + :disabled="disabled" + > + @on-open="focus" + @on-close="blur" + :config="config" + class="form-control datepicker" + v-model="real_model" + @input="change" + :readonly="readonly" + :disabled="disabled"> @@ -39,6 +46,11 @@ export default { default: '', description: "Modal header title" }, + readonly: { + type: Boolean, + default: false, + description: "Input readonly status" + }, disabled: { type: Boolean, default: false, diff --git a/resources/assets/js/components/AkauntingModal.vue b/resources/assets/js/components/AkauntingModal.vue index a1255f400..36898fd71 100644 --- a/resources/assets/js/components/AkauntingModal.vue +++ b/resources/assets/js/components/AkauntingModal.vue @@ -49,6 +49,8 @@ import AkauntingRadioGroup from './forms/AkauntingRadioGroup'; import AkauntingSelect from './AkauntingSelect'; import AkauntingDate from './AkauntingDate'; import AkauntingRecurring from './AkauntingRecurring'; +import {VMoney} from 'v-money'; + export default { name: 'akaunting-modal', @@ -63,6 +65,10 @@ export default { AkauntingRecurring }, + directives: { + money: VMoney + }, + props: { show: Boolean, title: { diff --git a/resources/assets/js/components/AkauntingModalAddNew.vue b/resources/assets/js/components/AkauntingModalAddNew.vue index fbf988081..159e58306 100644 --- a/resources/assets/js/components/AkauntingModalAddNew.vue +++ b/resources/assets/js/components/AkauntingModalAddNew.vue @@ -57,6 +57,7 @@ import AkauntingRecurring from './AkauntingRecurring'; import Form from './../plugins/form'; import { Alert, ColorPicker } from 'element-ui'; +import {VMoney} from 'v-money'; export default { name: 'akaunting-modal-add-new', @@ -71,6 +72,10 @@ export default { [ColorPicker.name]: ColorPicker, }, + directives: { + money: VMoney + }, + props: { show: Boolean, modalDialogClass: '', @@ -120,6 +125,14 @@ export default { display: this.show, component:'', + money: { + decimal: '.', + thousands: ',', + prefix: '$ ', + suffix: '', + precision: 2, + masked: false /* doesn't work with directive */ + }, }; }, @@ -138,6 +151,10 @@ export default { [ColorPicker.name]: ColorPicker, }, + directives: { + money: VMoney + }, + created: function() { this.form = new Form('form-create'); }, @@ -151,6 +168,14 @@ export default { data: function () { return { form: {}, + money: { + decimal: '.', + thousands: ',', + prefix: '$ ', + suffix: '', + precision: 2, + masked: false /* doesn't work with directive */ + }, color: '#55588b', predefineColors: [ '#3c3f72', diff --git a/resources/assets/js/components/AkauntingSelect.vue b/resources/assets/js/components/AkauntingSelect.vue index 887a89ee6..d3ae98aea 100644 --- a/resources/assets/js/components/AkauntingSelect.vue +++ b/resources/assets/js/components/AkauntingSelect.vue @@ -1,10 +1,17 @@ - + - @@ -351,7 +358,7 @@ - + {{ label }} @@ -450,6 +457,11 @@ export default { default: false, description: "Multible feature status" }, + readonly: { + type: Boolean, + default: false, + description: "Selectbox disabled status" + }, disabled: { type: Boolean, default: false, @@ -590,7 +602,7 @@ export default { watch: { options: function (options) { // update options - //this.selectOptions = options; + this.selectOptions = options; } }, } diff --git a/resources/views/partials/form/checkbox_group.blade.php b/resources/views/partials/form/checkbox_group.blade.php index e05cdff1a..028ee1e39 100644 --- a/resources/views/partials/form/checkbox_group.blade.php +++ b/resources/views/partials/form/checkbox_group.blade.php @@ -1,9 +1,11 @@ @stack($name . '_input_start') - {!! Form::label($name, $text, ['class' => 'form-control-label']) !!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @endif @foreach($items as $item) diff --git a/resources/views/partials/form/date_group.blade.php b/resources/views/partials/form/date_group.blade.php index 38feba545..a6293fcaf 100644 --- a/resources/views/partials/form/date_group.blade.php +++ b/resources/views/partials/form/date_group.blade.php @@ -1,7 +1,7 @@ @stack($name . '_input_start') + +@stack($name . '_input_end') diff --git a/resources/views/partials/form/email_group.blade.php b/resources/views/partials/form/email_group.blade.php index 254c1d259..6dafea227 100644 --- a/resources/views/partials/form/email_group.blade.php +++ b/resources/views/partials/form/email_group.blade.php @@ -1,10 +1,10 @@ @stack($name . '_input_start') - @if ($text) - {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} @endif diff --git a/resources/views/partials/form/file_group.blade.php b/resources/views/partials/form/file_group.blade.php index c3193423a..d37c6464b 100644 --- a/resources/views/partials/form/file_group.blade.php +++ b/resources/views/partials/form/file_group.blade.php @@ -1,9 +1,11 @@ @stack($name . '_input_start') - {!! Form::label($name, $text, ['class' => 'form-control-label']) !!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @endif {!! Form::file($name, array_merge([ diff --git a/resources/views/partials/form/invoice_text.blade.php b/resources/views/partials/form/invoice_text.blade.php index ae7e6689c..bf86226aa 100644 --- a/resources/views/partials/form/invoice_text.blade.php +++ b/resources/views/partials/form/invoice_text.blade.php @@ -1,9 +1,11 @@ @stack($name . '_input_start') - {!! Form::label($name, $text, ['class' => 'form-control-label']) !!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @endif diff --git a/resources/views/partials/form/money_group.blade.php b/resources/views/partials/form/money_group.blade.php index 8b1abbe4a..b4fe0a2a2 100644 --- a/resources/views/partials/form/money_group.blade.php +++ b/resources/views/partials/form/money_group.blade.php @@ -1,9 +1,11 @@ @stack($name . '_input_start') - {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @endif diff --git a/resources/views/partials/form/multi_select_add_new_group.blade.php b/resources/views/partials/form/multi_select_add_new_group.blade.php index ca0a0c1a7..12b9d22a2 100644 --- a/resources/views/partials/form/multi_select_add_new_group.blade.php +++ b/resources/views/partials/form/multi_select_add_new_group.blade.php @@ -15,6 +15,7 @@ :name="'{{ $name }}'" :options="{{ json_encode($values) }}" :value="{{ json_encode(old($name, $selected)) }}" + :multiple="true" :add-new="{{ json_encode([ 'status' => true, @@ -52,6 +53,14 @@ @change="{{ $attributes['change'] }}($event)" @endif + @if (isset($attributes['readonly'])) + :readonly="'{{ $attributes['readonly'] }}'" + @endif + + @if (isset($attributes['disabled'])) + :disabled="'{{ $attributes['disabled'] }}'" + @endif + @if(isset($attributes['v-error-message'])) :form-error="{{ $attributes['v-error-message'] }}" @else diff --git a/resources/views/partials/form/multi_select_group.blade.php b/resources/views/partials/form/multi_select_group.blade.php index 7685ef07f..7ddfaed81 100644 --- a/resources/views/partials/form/multi_select_group.blade.php +++ b/resources/views/partials/form/multi_select_group.blade.php @@ -15,6 +15,7 @@ :name="'{{ $name }}'" :options="{{ json_encode($values) }}" :value="{{ json_encode(old($name, $selected)) }}" + :multiple="true" @if (!empty($attributes['collapse'])) @@ -33,6 +34,14 @@ @change="{{ $attributes['change'] }}($event)" @endif + @if (isset($attributes['readonly'])) + :readonly="'{{ $attributes['readonly'] }}'" + @endif + + @if (isset($attributes['disabled'])) + :disabled="'{{ $attributes['disabled'] }}'" + @endif + @if(isset($attributes['v-error-message'])) :form-error="{{ $attributes['v-error-message'] }}" @else diff --git a/resources/views/partials/form/number_group.blade.php b/resources/views/partials/form/number_group.blade.php index 51bf8d1e2..3d9a0bd22 100644 --- a/resources/views/partials/form/number_group.blade.php +++ b/resources/views/partials/form/number_group.blade.php @@ -1,9 +1,11 @@ @stack($name . '_input_start') - {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @endif diff --git a/resources/views/partials/form/password_group.blade.php b/resources/views/partials/form/password_group.blade.php index 022bde222..eefbe1469 100644 --- a/resources/views/partials/form/password_group.blade.php +++ b/resources/views/partials/form/password_group.blade.php @@ -1,10 +1,10 @@ @stack($name . '_input_start') - @if ($text) - {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} @endif diff --git a/resources/views/partials/form/radio_group.blade.php b/resources/views/partials/form/radio_group.blade.php index e24c3a323..ec62d9015 100644 --- a/resources/views/partials/form/radio_group.blade.php +++ b/resources/views/partials/form/radio_group.blade.php @@ -1,15 +1,17 @@ @stack($name . '_input_start') - {!! Form::label($name, $text, ['class' => 'form-control-label']) !!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @endif {{ trans('general.yes') }} - + @@ -17,6 +19,7 @@ + diff --git a/resources/views/partials/form/select_add_new_group.blade.php b/resources/views/partials/form/select_add_new_group.blade.php index 10ac30f57..6223f3f4e 100644 --- a/resources/views/partials/form/select_add_new_group.blade.php +++ b/resources/views/partials/form/select_add_new_group.blade.php @@ -15,6 +15,7 @@ :name="'{{ $name }}'" :options="{{ json_encode($values) }}" :value="'{{ old($name, $selected) }}'" + :add-new="{{ json_encode([ 'status' => true, 'text' => trans('general.add_new'), @@ -47,6 +48,14 @@ @change="{{ $attributes['change'] }}($event)" @endif + @if (isset($attributes['readonly'])) + :readonly="'{{ $attributes['readonly'] }}'" + @endif + + @if (isset($attributes['disabled'])) + :disabled="'{{ $attributes['disabled'] }}'" + @endif + @if(isset($attributes['v-error-message'])) :form-error="{{ $attributes['v-error-message'] }}" @else diff --git a/resources/views/partials/form/select_group.blade.php b/resources/views/partials/form/select_group.blade.php index 11d309504..31cecb206 100644 --- a/resources/views/partials/form/select_group.blade.php +++ b/resources/views/partials/form/select_group.blade.php @@ -28,8 +28,12 @@ @change="{{ $attributes['change'] }}($event)" @endif + @if (isset($attributes['readonly'])) + :readonly="'{{ $attributes['readonly'] }}'" + @endif + @if (isset($attributes['disabled'])) - :disabled="{{ $attributes['disabled'] }}" + :disabled="'{{ $attributes['disabled'] }}'" @endif @if(isset($attributes['v-error-message'])) diff --git a/resources/views/partials/form/select_group_add_new_group.blade.php b/resources/views/partials/form/select_group_add_new_group.blade.php index eca20fee1..78c217477 100644 --- a/resources/views/partials/form/select_group_add_new_group.blade.php +++ b/resources/views/partials/form/select_group_add_new_group.blade.php @@ -15,6 +15,7 @@ :name="'{{ $name }}'" :options="{{ json_encode($values) }}" :value="'{{ old($name, $selected) }}'" + :add-new="{{ json_encode([ 'status' => true, 'text' => trans('general.add_new'), @@ -48,6 +49,14 @@ @change="{{ $attributes['change'] }}($event)" @endif + @if (isset($attributes['readonly'])) + :readonly="'{{ $attributes['readonly'] }}'" + @endif + + @if (isset($attributes['disabled'])) + :disabled="'{{ $attributes['disabled'] }}'" + @endif + @if(isset($attributes['v-error-message'])) :form-error="{{ $attributes['v-error-message'] }}" @else diff --git a/resources/views/partials/form/select_group_group.blade.php b/resources/views/partials/form/select_group_group.blade.php index 1861c2ac4..07e29788a 100644 --- a/resources/views/partials/form/select_group_group.blade.php +++ b/resources/views/partials/form/select_group_group.blade.php @@ -15,6 +15,7 @@ :name="'{{ $name }}'" :options="{{ json_encode($values) }}" :value="'{{ old($name, $selected) }}'" + :group="true" @if (!empty($attributes['v-model'])) @@ -29,6 +30,14 @@ @change="{{ $attributes['change'] }}($event)" @endif + @if (isset($attributes['readonly'])) + :readonly="'{{ $attributes['readonly'] }}'" + @endif + + @if (isset($attributes['disabled'])) + :disabled="'{{ $attributes['disabled'] }}'" + @endif + @if(isset($attributes['v-error-message'])) :form-error="{{ $attributes['v-error-message'] }}" @else diff --git a/resources/views/partials/form/select_remote_group.blade.php b/resources/views/partials/form/select_remote_group.blade.php index d184d0673..2b4e5b4cc 100644 --- a/resources/views/partials/form/select_remote_group.blade.php +++ b/resources/views/partials/form/select_remote_group.blade.php @@ -28,8 +28,12 @@ @change="{{ $attributes['change'] }}($event)" @endif + @if (isset($attributes['readonly'])) + :readonly="'{{ $attributes['readonly'] }}'" + @endif + @if (isset($attributes['disabled'])) - :disabled="{{ $attributes['disabled'] }}" + :disabled="'{{ $attributes['disabled'] }}'" @endif @if(isset($attributes['v-error-message'])) diff --git a/resources/views/partials/form/text_editor_group.blade.php b/resources/views/partials/form/text_editor_group.blade.php index 32d1238a7..a14d66113 100644 --- a/resources/views/partials/form/text_editor_group.blade.php +++ b/resources/views/partials/form/text_editor_group.blade.php @@ -1,9 +1,11 @@ @stack($name . '_input_start') - {!! Form::label($name, $text, ['class' => 'form-control-label']) !!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @endif + + @if (isset($attributes['disabled'])) + :disabled="'{{ $attributes['disabled'] }}'" + @endif + > - {!! Form::label($name, $text, ['class' => 'form-control-label']) !!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @endif diff --git a/resources/views/partials/form/textarea_group.blade.php b/resources/views/partials/form/textarea_group.blade.php index 86970d57a..8082b0dc6 100644 --- a/resources/views/partials/form/textarea_group.blade.php +++ b/resources/views/partials/form/textarea_group.blade.php @@ -1,9 +1,11 @@ @stack($name . '_input_start') - {!! Form::label($name, $text, ['class' => 'form-control-label']) !!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @endif {!! Form::textarea($name, $value, array_merge([ 'class' => 'form-control', diff --git a/resources/views/partials/form/time_group.blade.php b/resources/views/partials/form/time_group.blade.php new file mode 100644 index 000000000..8c2dfd7bb --- /dev/null +++ b/resources/views/partials/form/time_group.blade.php @@ -0,0 +1,50 @@ +@stack($name . '_input_start') + + + +@stack($name . '_input_end') diff --git a/resources/views/purchases/payments/edit.blade.php b/resources/views/purchases/payments/edit.blade.php index 31dc616f9..b0a9652e3 100644 --- a/resources/views/purchases/payments/edit.blade.php +++ b/resources/views/purchases/payments/edit.blade.php @@ -60,7 +60,8 @@ {{ Form::fileGroup('attachment', trans('general.attachment')) }} @if ($payment->bill) - {{ Form::textGroup('document_id', trans_choice('general.bills', 1), 'file-invoice', ['disabled' => 'disabled'], $payment->bill->bill_number) }} + {{ Form::textGroup('document', trans_choice('general.bills', 1), 'file-invoice', ['disabled' => 'disabled'], $payment->bill->bill_number) }} + {{ Form::hidden('document_id', $payment->bill->id) }} @endif diff --git a/resources/views/sales/revenues/edit.blade.php b/resources/views/sales/revenues/edit.blade.php index e712e5f7c..b8c92f2b3 100644 --- a/resources/views/sales/revenues/edit.blade.php +++ b/resources/views/sales/revenues/edit.blade.php @@ -60,7 +60,8 @@ {{ Form::fileGroup('attachment', trans('general.attachment')) }} @if ($revenue->invoice) - {{ Form::textGroup('document_id', trans_choice('general.invoices', 1), 'file-invoice', ['disabled' => 'disabled'], $revenue->invoice->invoice_number) }} + {{ Form::textGroup('document', trans_choice('general.invoices', 1), 'file-invoice', ['disabled' => 'disabled'], $revenue->invoice->invoice_number) }} + {{ Form::hidden('document_id', $revenue->invoice->id) }} @endif
@@ -351,7 +358,7 @@ - + {{ label }} @@ -450,6 +457,11 @@ export default { default: false, description: "Multible feature status" }, + readonly: { + type: Boolean, + default: false, + description: "Selectbox disabled status" + }, disabled: { type: Boolean, default: false, @@ -590,7 +602,7 @@ export default { watch: { options: function (options) { // update options - //this.selectOptions = options; + this.selectOptions = options; } }, } diff --git a/resources/views/partials/form/checkbox_group.blade.php b/resources/views/partials/form/checkbox_group.blade.php index e05cdff1a..028ee1e39 100644 --- a/resources/views/partials/form/checkbox_group.blade.php +++ b/resources/views/partials/form/checkbox_group.blade.php @@ -1,9 +1,11 @@ @stack($name . '_input_start') - {!! Form::label($name, $text, ['class' => 'form-control-label']) !!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @endif @foreach($items as $item) diff --git a/resources/views/partials/form/date_group.blade.php b/resources/views/partials/form/date_group.blade.php index 38feba545..a6293fcaf 100644 --- a/resources/views/partials/form/date_group.blade.php +++ b/resources/views/partials/form/date_group.blade.php @@ -1,7 +1,7 @@ @stack($name . '_input_start') + +@stack($name . '_input_end') diff --git a/resources/views/partials/form/email_group.blade.php b/resources/views/partials/form/email_group.blade.php index 254c1d259..6dafea227 100644 --- a/resources/views/partials/form/email_group.blade.php +++ b/resources/views/partials/form/email_group.blade.php @@ -1,10 +1,10 @@ @stack($name . '_input_start') - @if ($text) - {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} @endif diff --git a/resources/views/partials/form/file_group.blade.php b/resources/views/partials/form/file_group.blade.php index c3193423a..d37c6464b 100644 --- a/resources/views/partials/form/file_group.blade.php +++ b/resources/views/partials/form/file_group.blade.php @@ -1,9 +1,11 @@ @stack($name . '_input_start') - {!! Form::label($name, $text, ['class' => 'form-control-label']) !!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @endif {!! Form::file($name, array_merge([ diff --git a/resources/views/partials/form/invoice_text.blade.php b/resources/views/partials/form/invoice_text.blade.php index ae7e6689c..bf86226aa 100644 --- a/resources/views/partials/form/invoice_text.blade.php +++ b/resources/views/partials/form/invoice_text.blade.php @@ -1,9 +1,11 @@ @stack($name . '_input_start') - {!! Form::label($name, $text, ['class' => 'form-control-label']) !!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @endif diff --git a/resources/views/partials/form/money_group.blade.php b/resources/views/partials/form/money_group.blade.php index 8b1abbe4a..b4fe0a2a2 100644 --- a/resources/views/partials/form/money_group.blade.php +++ b/resources/views/partials/form/money_group.blade.php @@ -1,9 +1,11 @@ @stack($name . '_input_start') - {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @endif diff --git a/resources/views/partials/form/multi_select_add_new_group.blade.php b/resources/views/partials/form/multi_select_add_new_group.blade.php index ca0a0c1a7..12b9d22a2 100644 --- a/resources/views/partials/form/multi_select_add_new_group.blade.php +++ b/resources/views/partials/form/multi_select_add_new_group.blade.php @@ -15,6 +15,7 @@ :name="'{{ $name }}'" :options="{{ json_encode($values) }}" :value="{{ json_encode(old($name, $selected)) }}" + :multiple="true" :add-new="{{ json_encode([ 'status' => true, @@ -52,6 +53,14 @@ @change="{{ $attributes['change'] }}($event)" @endif + @if (isset($attributes['readonly'])) + :readonly="'{{ $attributes['readonly'] }}'" + @endif + + @if (isset($attributes['disabled'])) + :disabled="'{{ $attributes['disabled'] }}'" + @endif + @if(isset($attributes['v-error-message'])) :form-error="{{ $attributes['v-error-message'] }}" @else diff --git a/resources/views/partials/form/multi_select_group.blade.php b/resources/views/partials/form/multi_select_group.blade.php index 7685ef07f..7ddfaed81 100644 --- a/resources/views/partials/form/multi_select_group.blade.php +++ b/resources/views/partials/form/multi_select_group.blade.php @@ -15,6 +15,7 @@ :name="'{{ $name }}'" :options="{{ json_encode($values) }}" :value="{{ json_encode(old($name, $selected)) }}" + :multiple="true" @if (!empty($attributes['collapse'])) @@ -33,6 +34,14 @@ @change="{{ $attributes['change'] }}($event)" @endif + @if (isset($attributes['readonly'])) + :readonly="'{{ $attributes['readonly'] }}'" + @endif + + @if (isset($attributes['disabled'])) + :disabled="'{{ $attributes['disabled'] }}'" + @endif + @if(isset($attributes['v-error-message'])) :form-error="{{ $attributes['v-error-message'] }}" @else diff --git a/resources/views/partials/form/number_group.blade.php b/resources/views/partials/form/number_group.blade.php index 51bf8d1e2..3d9a0bd22 100644 --- a/resources/views/partials/form/number_group.blade.php +++ b/resources/views/partials/form/number_group.blade.php @@ -1,9 +1,11 @@ @stack($name . '_input_start') - {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @endif diff --git a/resources/views/partials/form/password_group.blade.php b/resources/views/partials/form/password_group.blade.php index 022bde222..eefbe1469 100644 --- a/resources/views/partials/form/password_group.blade.php +++ b/resources/views/partials/form/password_group.blade.php @@ -1,10 +1,10 @@ @stack($name . '_input_start') - @if ($text) - {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} @endif diff --git a/resources/views/partials/form/radio_group.blade.php b/resources/views/partials/form/radio_group.blade.php index e24c3a323..ec62d9015 100644 --- a/resources/views/partials/form/radio_group.blade.php +++ b/resources/views/partials/form/radio_group.blade.php @@ -1,15 +1,17 @@ @stack($name . '_input_start') - {!! Form::label($name, $text, ['class' => 'form-control-label']) !!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @endif {{ trans('general.yes') }} - + @@ -17,6 +19,7 @@ + diff --git a/resources/views/partials/form/select_add_new_group.blade.php b/resources/views/partials/form/select_add_new_group.blade.php index 10ac30f57..6223f3f4e 100644 --- a/resources/views/partials/form/select_add_new_group.blade.php +++ b/resources/views/partials/form/select_add_new_group.blade.php @@ -15,6 +15,7 @@ :name="'{{ $name }}'" :options="{{ json_encode($values) }}" :value="'{{ old($name, $selected) }}'" + :add-new="{{ json_encode([ 'status' => true, 'text' => trans('general.add_new'), @@ -47,6 +48,14 @@ @change="{{ $attributes['change'] }}($event)" @endif + @if (isset($attributes['readonly'])) + :readonly="'{{ $attributes['readonly'] }}'" + @endif + + @if (isset($attributes['disabled'])) + :disabled="'{{ $attributes['disabled'] }}'" + @endif + @if(isset($attributes['v-error-message'])) :form-error="{{ $attributes['v-error-message'] }}" @else diff --git a/resources/views/partials/form/select_group.blade.php b/resources/views/partials/form/select_group.blade.php index 11d309504..31cecb206 100644 --- a/resources/views/partials/form/select_group.blade.php +++ b/resources/views/partials/form/select_group.blade.php @@ -28,8 +28,12 @@ @change="{{ $attributes['change'] }}($event)" @endif + @if (isset($attributes['readonly'])) + :readonly="'{{ $attributes['readonly'] }}'" + @endif + @if (isset($attributes['disabled'])) - :disabled="{{ $attributes['disabled'] }}" + :disabled="'{{ $attributes['disabled'] }}'" @endif @if(isset($attributes['v-error-message'])) diff --git a/resources/views/partials/form/select_group_add_new_group.blade.php b/resources/views/partials/form/select_group_add_new_group.blade.php index eca20fee1..78c217477 100644 --- a/resources/views/partials/form/select_group_add_new_group.blade.php +++ b/resources/views/partials/form/select_group_add_new_group.blade.php @@ -15,6 +15,7 @@ :name="'{{ $name }}'" :options="{{ json_encode($values) }}" :value="'{{ old($name, $selected) }}'" + :add-new="{{ json_encode([ 'status' => true, 'text' => trans('general.add_new'), @@ -48,6 +49,14 @@ @change="{{ $attributes['change'] }}($event)" @endif + @if (isset($attributes['readonly'])) + :readonly="'{{ $attributes['readonly'] }}'" + @endif + + @if (isset($attributes['disabled'])) + :disabled="'{{ $attributes['disabled'] }}'" + @endif + @if(isset($attributes['v-error-message'])) :form-error="{{ $attributes['v-error-message'] }}" @else diff --git a/resources/views/partials/form/select_group_group.blade.php b/resources/views/partials/form/select_group_group.blade.php index 1861c2ac4..07e29788a 100644 --- a/resources/views/partials/form/select_group_group.blade.php +++ b/resources/views/partials/form/select_group_group.blade.php @@ -15,6 +15,7 @@ :name="'{{ $name }}'" :options="{{ json_encode($values) }}" :value="'{{ old($name, $selected) }}'" + :group="true" @if (!empty($attributes['v-model'])) @@ -29,6 +30,14 @@ @change="{{ $attributes['change'] }}($event)" @endif + @if (isset($attributes['readonly'])) + :readonly="'{{ $attributes['readonly'] }}'" + @endif + + @if (isset($attributes['disabled'])) + :disabled="'{{ $attributes['disabled'] }}'" + @endif + @if(isset($attributes['v-error-message'])) :form-error="{{ $attributes['v-error-message'] }}" @else diff --git a/resources/views/partials/form/select_remote_group.blade.php b/resources/views/partials/form/select_remote_group.blade.php index d184d0673..2b4e5b4cc 100644 --- a/resources/views/partials/form/select_remote_group.blade.php +++ b/resources/views/partials/form/select_remote_group.blade.php @@ -28,8 +28,12 @@ @change="{{ $attributes['change'] }}($event)" @endif + @if (isset($attributes['readonly'])) + :readonly="'{{ $attributes['readonly'] }}'" + @endif + @if (isset($attributes['disabled'])) - :disabled="{{ $attributes['disabled'] }}" + :disabled="'{{ $attributes['disabled'] }}'" @endif @if(isset($attributes['v-error-message'])) diff --git a/resources/views/partials/form/text_editor_group.blade.php b/resources/views/partials/form/text_editor_group.blade.php index 32d1238a7..a14d66113 100644 --- a/resources/views/partials/form/text_editor_group.blade.php +++ b/resources/views/partials/form/text_editor_group.blade.php @@ -1,9 +1,11 @@ @stack($name . '_input_start') - {!! Form::label($name, $text, ['class' => 'form-control-label']) !!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @endif + + @if (isset($attributes['disabled'])) + :disabled="'{{ $attributes['disabled'] }}'" + @endif + > - {!! Form::label($name, $text, ['class' => 'form-control-label']) !!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @endif diff --git a/resources/views/partials/form/textarea_group.blade.php b/resources/views/partials/form/textarea_group.blade.php index 86970d57a..8082b0dc6 100644 --- a/resources/views/partials/form/textarea_group.blade.php +++ b/resources/views/partials/form/textarea_group.blade.php @@ -1,9 +1,11 @@ @stack($name . '_input_start') - {!! Form::label($name, $text, ['class' => 'form-control-label']) !!} + @if (!empty($text)) + {!! Form::label($name, $text, ['class' => 'form-control-label'])!!} + @endif {!! Form::textarea($name, $value, array_merge([ 'class' => 'form-control', diff --git a/resources/views/partials/form/time_group.blade.php b/resources/views/partials/form/time_group.blade.php new file mode 100644 index 000000000..8c2dfd7bb --- /dev/null +++ b/resources/views/partials/form/time_group.blade.php @@ -0,0 +1,50 @@ +@stack($name . '_input_start') + + + +@stack($name . '_input_end') diff --git a/resources/views/purchases/payments/edit.blade.php b/resources/views/purchases/payments/edit.blade.php index 31dc616f9..b0a9652e3 100644 --- a/resources/views/purchases/payments/edit.blade.php +++ b/resources/views/purchases/payments/edit.blade.php @@ -60,7 +60,8 @@ {{ Form::fileGroup('attachment', trans('general.attachment')) }} @if ($payment->bill) - {{ Form::textGroup('document_id', trans_choice('general.bills', 1), 'file-invoice', ['disabled' => 'disabled'], $payment->bill->bill_number) }} + {{ Form::textGroup('document', trans_choice('general.bills', 1), 'file-invoice', ['disabled' => 'disabled'], $payment->bill->bill_number) }} + {{ Form::hidden('document_id', $payment->bill->id) }} @endif diff --git a/resources/views/sales/revenues/edit.blade.php b/resources/views/sales/revenues/edit.blade.php index e712e5f7c..b8c92f2b3 100644 --- a/resources/views/sales/revenues/edit.blade.php +++ b/resources/views/sales/revenues/edit.blade.php @@ -60,7 +60,8 @@ {{ Form::fileGroup('attachment', trans('general.attachment')) }} @if ($revenue->invoice) - {{ Form::textGroup('document_id', trans_choice('general.invoices', 1), 'file-invoice', ['disabled' => 'disabled'], $revenue->invoice->invoice_number) }} + {{ Form::textGroup('document', trans_choice('general.invoices', 1), 'file-invoice', ['disabled' => 'disabled'], $revenue->invoice->invoice_number) }} + {{ Form::hidden('document_id', $revenue->invoice->id) }} @endif