Form group readonly and disabled feature added
This commit is contained in:
parent
9cb174f68c
commit
37e10eae8f
@ -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
|
||||
]);
|
||||
|
2
public/css/custom.css
vendored
2
public/css/custom.css
vendored
@ -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--------*/
|
||||
|
@ -1,18 +1,25 @@
|
||||
<template>
|
||||
<base-input :label="title"
|
||||
:name="name"
|
||||
:class="formClasses"
|
||||
:error="formError"
|
||||
:prependIcon="icon"
|
||||
>
|
||||
:name="name"
|
||||
:class="[
|
||||
{'readonly': readonly},
|
||||
{'disabled': disabled},
|
||||
formClasses
|
||||
]"
|
||||
:error="formError"
|
||||
:prependIcon="icon"
|
||||
:readonly="readonly"
|
||||
:disabled="disabled"
|
||||
>
|
||||
<flat-picker slot-scope="{focus, blur}"
|
||||
@on-open="focus"
|
||||
@on-close="blur"
|
||||
:config="config"
|
||||
class="form-control datepicker"
|
||||
v-model="real_model"
|
||||
@input="change"
|
||||
:disabled="disabled">
|
||||
@on-open="focus"
|
||||
@on-close="blur"
|
||||
:config="config"
|
||||
class="form-control datepicker"
|
||||
v-model="real_model"
|
||||
@input="change"
|
||||
:readonly="readonly"
|
||||
:disabled="disabled">
|
||||
</flat-picker>
|
||||
</base-input>
|
||||
</template>
|
||||
@ -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,
|
||||
|
@ -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: {
|
||||
|
@ -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',
|
||||
|
@ -1,10 +1,17 @@
|
||||
<template>
|
||||
<base-input :label="title"
|
||||
:name="name"
|
||||
:class="formClasses"
|
||||
:error="formError">
|
||||
<base-input
|
||||
:label="title"
|
||||
:name="name"
|
||||
:readonly="readonly"
|
||||
:disabled="disabled"
|
||||
:class="[
|
||||
{'readonly': readonly},
|
||||
{'disabled': disabled},
|
||||
formClasses
|
||||
]"
|
||||
:error="formError">
|
||||
|
||||
<el-select v-model="real_model" @input="change" disabled filterable v-if="disabled && !multiple && !collapse"
|
||||
<el-select v-model="real_model" @input="change" :disabled="disabled" filterable v-if="(disabled) && !multiple && !collapse"
|
||||
:placeholder="placeholder">
|
||||
<div v-if="addNew.status && options.length != 0" class="el-select-dropdown__wrap" slot="empty">
|
||||
<p class="el-select-dropdown__empty">
|
||||
@ -351,7 +358,7 @@
|
||||
|
||||
<component v-bind:is="add_new_html" @submit="onSubmit"></component>
|
||||
|
||||
<select :name="name" class="d-none" v-model="real_model">
|
||||
<select :name="name" v-model="real_model" class="d-none">
|
||||
<option v-for="(label, value) in selectOptions" :value="value">{{ label }}</option>
|
||||
</select>
|
||||
</base-input>
|
||||
@ -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;
|
||||
}
|
||||
},
|
||||
}
|
||||
|
@ -1,9 +1,11 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['readonly']) ? ' readonly' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
:class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]">
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label']) !!}
|
||||
@if (!empty($text))
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
||||
@endif
|
||||
|
||||
<div class="row">
|
||||
@foreach($items as $item)
|
||||
|
@ -1,7 +1,7 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<akaunting-date
|
||||
class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}"
|
||||
|
||||
@if (!empty($attributes['v-error']))
|
||||
:form-classes="[{'has-error': {{ $attributes['v-error'] }} }]"
|
||||
@ -33,6 +33,14 @@
|
||||
@interface="form.{{ $name }} = $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
|
||||
|
56
resources/views/partials/form/date_time_group.blade.php
Normal file
56
resources/views/partials/form/date_time_group.blade.php
Normal file
@ -0,0 +1,56 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<akaunting-date
|
||||
class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}"
|
||||
|
||||
@if (!empty($attributes['v-error']))
|
||||
:form-classes="[{'has-error': {{ $attributes['v-error'] }} }]"
|
||||
@else
|
||||
:form-classes="[{'has-error': form.errors.get('{{ $name }}') }]"
|
||||
@endif
|
||||
|
||||
:icon="'fa fa-{{ $icon }}'"
|
||||
:title="'{{ $text }}'"
|
||||
:placeholder="'{{ trans('general.form.select.field', ['field' => $text]) }}'"
|
||||
:name="'{{ $name }}'"
|
||||
:value="'{{ old($name, $value) }}'"
|
||||
:config="{
|
||||
allowInput: true,
|
||||
@if (!empty($attributes['show-date-format']))
|
||||
altInput: true,
|
||||
altFormat: '{{ $attributes['show-date-format'] }}',
|
||||
@endif
|
||||
@if (!empty($attributes['date-format']))
|
||||
dateFormat: '{{ $attributes['date-format'] }}',
|
||||
@endif
|
||||
wrap: true,
|
||||
enableTime: true,
|
||||
@if (!empty($attributes['seconds']))
|
||||
enableSeconds: true
|
||||
@endif
|
||||
}"
|
||||
|
||||
@if (!empty($attributes['v-model']))
|
||||
@interface="{{ $attributes['v-model'] . ' = $event' }}"
|
||||
@elseif (!empty($attributes['data-field']))
|
||||
@interface="{{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
|
||||
@else
|
||||
@interface="form.{{ $name }} = $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
|
||||
:form-error="form.errors.get('{{ $name }}')"
|
||||
@endif
|
||||
></akaunting-date>
|
||||
|
||||
@stack($name . '_input_end')
|
@ -1,10 +1,10 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['readonly']) ? ' readonly' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
:class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]">
|
||||
@if ($text)
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
||||
@if (!empty($text))
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
||||
@endif
|
||||
|
||||
<div class="input-group input-group-merge {{ $group_class }}">
|
||||
|
@ -1,9 +1,11 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['readonly']) ? ' readonly' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
:class="[{'has-error': errors.{{ $name }}}]">
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label']) !!}
|
||||
@if (!empty($text))
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
||||
@endif
|
||||
|
||||
<div class="custom-file">
|
||||
{!! Form::file($name, array_merge([
|
||||
|
@ -1,9 +1,11 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['readonly']) ? ' readonly' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
:class="[{'has-error': form.errors.get('{{ $name }}')}]">
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label']) !!}
|
||||
@if (!empty($text))
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
||||
@endif
|
||||
|
||||
<div class="input-group input-group-merge {{ $group_class }}">
|
||||
<div class="input-group-prepend">
|
||||
|
@ -1,9 +1,11 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['readonly']) ? ' readonly' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
:class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]">
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
||||
@if (!empty($text))
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
||||
@endif
|
||||
|
||||
<div class="input-group input-group-merge {{ $group_class }}">
|
||||
<div class="input-group-prepend">
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -1,9 +1,11 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['readonly']) ? ' readonly' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
:class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]">
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
||||
@if (!empty($text))
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
||||
@endif
|
||||
|
||||
<div class="input-group input-group-merge {{ $group_class }}">
|
||||
<div class="input-group-prepend">
|
||||
|
@ -1,10 +1,10 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['readonly']) ? ' readonly' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
:class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]">
|
||||
@if ($text)
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
||||
@if (!empty($text))
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
||||
@endif
|
||||
|
||||
<div class="input-group input-group-merge {{ $group_class }}">
|
||||
|
@ -1,15 +1,17 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['readonly']) ? ' readonly' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
:class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]">
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label']) !!}
|
||||
@if (!empty($text))
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
||||
@endif
|
||||
|
||||
<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" 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) }}">
|
||||
<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 class="btn btn-danger" @click="form.{{ $name }}=0" v-bind:class="{ active: form.{{ $name }} == 0 }">
|
||||
@ -17,6 +19,7 @@
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="{{ $name }}" value="{{ ($value) ? true : false }}" />
|
||||
</div>
|
||||
|
||||
|
@ -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
|
||||
|
@ -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']))
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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']))
|
||||
|
@ -1,9 +1,11 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['readonly']) ? ' readonly' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
:class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]">
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label']) !!}
|
||||
@if (!empty($text))
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
||||
@endif
|
||||
|
||||
<html-editor
|
||||
:name="'{{ $name }}'"
|
||||
@ -23,7 +25,11 @@
|
||||
@else
|
||||
@input="form.{{ $name }} = $event"
|
||||
@endif
|
||||
></html-editor>
|
||||
|
||||
@if (isset($attributes['disabled']))
|
||||
:disabled="'{{ $attributes['disabled'] }}'"
|
||||
@endif
|
||||
></html-editor>
|
||||
|
||||
<div class="invalid-feedback d-block"
|
||||
v-if="{{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.has("' . $name . '")' }}"
|
||||
|
@ -1,9 +1,11 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['readonly']) ? ' readonly' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
:class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]">
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label']) !!}
|
||||
@if (!empty($text))
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
||||
@endif
|
||||
|
||||
<div class="input-group input-group-merge {{ $group_class }}">
|
||||
<div class="input-group-prepend">
|
||||
|
@ -1,9 +1,11 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}{{ isset($attributes['readonly']) ? ' readonly' : '' }}{{ isset($attributes['disabled']) ? ' disabled' : '' }}"
|
||||
:class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]">
|
||||
{!! 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',
|
||||
|
50
resources/views/partials/form/time_group.blade.php
Normal file
50
resources/views/partials/form/time_group.blade.php
Normal file
@ -0,0 +1,50 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<akaunting-date
|
||||
class="{{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}"
|
||||
|
||||
@if (!empty($attributes['v-error']))
|
||||
:form-classes="[{'has-error': {{ $attributes['v-error'] }} }]"
|
||||
@else
|
||||
:form-classes="[{'has-error': form.errors.get('{{ $name }}') }]"
|
||||
@endif
|
||||
|
||||
:icon="'fa fa-{{ $icon }}'"
|
||||
:title="'{{ $text }}'"
|
||||
:placeholder="'{{ trans('general.form.select.field', ['field' => $text]) }}'"
|
||||
:name="'{{ $name }}'"
|
||||
:value="'{{ old($name, $value) }}'"
|
||||
:config="{
|
||||
allowInput: true,
|
||||
wrap: true,
|
||||
enableTime: true,
|
||||
@if (!empty($attributes['seconds']))
|
||||
enableSeconds: true,
|
||||
@endif
|
||||
noCalendar: true
|
||||
}"
|
||||
|
||||
@if (!empty($attributes['v-model']))
|
||||
@interface="{{ $attributes['v-model'] . ' = $event' }}"
|
||||
@elseif (!empty($attributes['data-field']))
|
||||
@interface="{{ 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' }}"
|
||||
@else
|
||||
@interface="form.{{ $name }} = $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
|
||||
:form-error="form.errors.get('{{ $name }}')"
|
||||
@endif
|
||||
></akaunting-date>
|
||||
|
||||
@stack($name . '_input_end')
|
@ -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
|
||||
</div>
|
||||
</div>
|
||||
|
@ -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
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user