v2 first commit
This commit is contained in:
30
resources/views/partials/form/alias_group.blade.php
Normal file
30
resources/views/partials/form/alias_group.blade.php
Normal file
@ -0,0 +1,30 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div
|
||||
class="form-group visible-field {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
||||
:class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get(' . $name . ')' }} }]">
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
||||
|
||||
<div class="input-group input-group-merge {{ $group_class }}">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-{{ $icon }}"></i>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<vue-suglify :slugify="form.{{ $original }}" :slug.sync="form.{{ $name }}" :disabled="true">
|
||||
{!! Form::text($name, $value, array_merge([
|
||||
'class' => 'form-control',
|
||||
"slot-scope" => "{inputBidding}",
|
||||
"v-bind" => "inputBidding"
|
||||
], $attributes)) !!}
|
||||
</vue-suglify>
|
||||
</div>
|
||||
|
||||
<div class="invalid-feedback d-block"
|
||||
v-if="{{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.has(' . $name . ')' }}"
|
||||
v-html="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get(' . $name . ')' }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stack($name . '_input_end')
|
@ -0,0 +1,10 @@
|
||||
@stack('bulk_action_all_input_start')
|
||||
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input class="custom-control-input" id="table-check-all" type="checkbox"
|
||||
v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : 'bulk_action.select_all' }}"
|
||||
@click="onSelectAll">
|
||||
<label class="custom-control-label" for="table-check-all"></label>
|
||||
</div>
|
||||
|
||||
@stack('bulk_action_all_input_end')
|
11
resources/views/partials/form/bulk_action_group.blade.php
Normal file
11
resources/views/partials/form/bulk_action_group.blade.php
Normal file
@ -0,0 +1,11 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="bulk-action-{{ $id }}" data-bulk-action="{{ $id }}"
|
||||
:value="{{ $id }}"
|
||||
v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : 'bulk_action.selected' }}"
|
||||
v-on:change="onSelect">
|
||||
<label class="custom-control-label" for="bulk-action-{{ $id }}"></label>
|
||||
</div>
|
||||
|
||||
@stack($name . '_input_end')
|
@ -0,0 +1,74 @@
|
||||
@stack('bulk_action_row_input_start')
|
||||
|
||||
<div class="align-items-center d-none" v-if="bulk_action.show" v-bind:class="[bulk_action.show ? 'show' : '']">
|
||||
<div class="mr-6">
|
||||
<span class="hidden-sm text-white">
|
||||
<b v-text="bulk_action.count"></b>
|
||||
<span v-if="bulk_action.count === 1">
|
||||
{{ strtolower(trans_choice($text, 1)) }}
|
||||
</span>
|
||||
<span v-else-if="bulk_action.count > 1">
|
||||
{{ strtolower(trans_choice($text, 2)) }}
|
||||
</span>
|
||||
{{ trans('bulk_actions.selected') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="w-25 mr-4" v-if="bulk_action.count">
|
||||
<div class="form-group mb-0">
|
||||
<select class="form-control form-control-sm" v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : 'bulk_action.value' }}" @change="onChange">
|
||||
<option value="*">{{ trans_choice('bulk_actions.bulk_actions',2) }}</option>
|
||||
@foreach($actions as $key => $action)
|
||||
<option
|
||||
value="{{ $key }}"
|
||||
@if(isset($action['multiple']) && $action['multiple'])
|
||||
v-if="bulk_action.count <= 1"
|
||||
@endif
|
||||
@if(!empty($action['message']))
|
||||
data-message="{{ trans_choice($action['message'], 2, ['type' => $text]) }}"
|
||||
@endif
|
||||
>{{ trans($action['name']) }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<input type="hidden" name="bulk_action_path" value="{{ $path }}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mr-4" v-if="bulk_action.count">
|
||||
<button type="button" class="btn btn-sm btn-outline-confirm" v-if="bulk_action.message.length" @click="bulk_action.modal=true">
|
||||
<span>{{ trans('general.confirm') }}</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-outline-confirm " v-if="!bulk_action.message.length" @click="onAction">
|
||||
<span>{{ trans('general.confirm') }}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="mr-4" v-if="bulk_action.count">
|
||||
<button type="button" class="btn btn-outline-clear btn-sm" @click="onClear">
|
||||
<span>{{ trans('general.clear') }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<akaunting-modal
|
||||
:show="bulk_action.modal"
|
||||
:title="'{{ trans_choice('general.items', 2) }}'"
|
||||
:message="bulk_action.message"
|
||||
@cancel="onCancel"
|
||||
v-if='bulk_action.message && bulk_action.modal'>
|
||||
<template #card-footer>
|
||||
<div class="float-right">
|
||||
<button type="button" class="btn btn-outline-secondary" @click="onCancel">
|
||||
<span>{{ trans('general.cancel') }}</span>
|
||||
</button>
|
||||
|
||||
<button :disabled="bulk_action.loading" type="button" class="btn btn-success button-submit" @click="onAction">
|
||||
<div class="aka-loader d-none"></div>
|
||||
<span>{{ trans('general.confirm') }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
</akaunting-modal>
|
||||
|
||||
@stack('bulk_action_row_input_end')
|
@ -1,14 +1,29 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}">
|
||||
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
|
||||
<div
|
||||
class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
||||
:class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get(' . $name . ')' }} }]">
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label']) !!}
|
||||
|
||||
<br/>
|
||||
@foreach($items as $item)
|
||||
<div class="col-md-3">
|
||||
{{ Form::checkbox($name . '[]', $item->$id) }} {{ $item->$value }}
|
||||
<div class="custom-control custom-checkbox">
|
||||
{{ Form::checkbox($name, $item->$id, null, [
|
||||
'id' => 'checkbox-' . $name . '-' . $item->$id,
|
||||
'class' => 'custom-control-input',
|
||||
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name
|
||||
]) }}
|
||||
|
||||
<label class="custom-control-label" for="checkbox-{{ $name . '-' . $item->$id}}">
|
||||
{{ $item->$value }}
|
||||
</label>
|
||||
</div>
|
||||
@endforeach
|
||||
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
|
||||
|
||||
<div class="invalid-feedback d-block"
|
||||
v-if="{{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.has(' . $name . ')' }}"
|
||||
v-html="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get(' . $name . ')' }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stack($name . '_input_end')
|
||||
|
25
resources/views/partials/form/date_group.blade.php
Normal file
25
resources/views/partials/form/date_group.blade.php
Normal file
@ -0,0 +1,25 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<akaunting-date
|
||||
class="{{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
||||
:form-classes="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get(' . $name . ')' }} }]"
|
||||
: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
|
||||
}"
|
||||
:icon="'fa fa-{{ $icon }}'"
|
||||
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : 'form.' . $name . ' = $event' }}"
|
||||
:form-error="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get(' . $name . ')' }}"
|
||||
></akaunting-date>
|
||||
|
||||
@stack($name . '_input_end')
|
@ -1,46 +1,44 @@
|
||||
<button type="button" class="btn btn-sm btn-default btn-filter date-range-btn">
|
||||
<span>
|
||||
<i class="fa fa-{{ $icon }}"></i> {{ $text }}
|
||||
</span>
|
||||
<button type="button" class="btn btn-sm btn-secondary btn-secondary date-range-btn card-buttons filter-button">
|
||||
<span><i class="fa fa-{{ $icon }}"></i> {{ $text }}</span>
|
||||
<i class="fa fa-caret-down"></i>
|
||||
{!! Form::hidden($name, null, []) !!}
|
||||
</button>
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('.date-range-btn').daterangepicker(
|
||||
{
|
||||
ranges : {
|
||||
'{{ trans("general.date_range.today") }}' : [moment(), moment()],
|
||||
'{{ trans("general.date_range.yesterday") }}' : [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
||||
'{{ trans("general.date_range.last_days", ["day" => "7"]) }}' : [moment().subtract(6, 'days'), moment()],
|
||||
'{{ trans("general.date_range.last_days", ["day" => "30"]) }}': [moment().subtract(29, 'days'), moment()],
|
||||
'{{ trans("general.date_range.this_month") }}' : [moment().startOf('month'), moment().endOf('month')],
|
||||
'{{ trans("general.date_range.last_month") }}' : [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('.date-range-btn').daterangepicker(
|
||||
{
|
||||
ranges : {
|
||||
'{{ trans("general.date_range.today") }}' : [moment(), moment()],
|
||||
'{{ trans("general.date_range.yesterday") }}' : [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
||||
'{{ trans("general.date_range.last_days", ["day" => "7"]) }}' : [moment().subtract(6, 'days'), moment()],
|
||||
'{{ trans("general.date_range.last_days", ["day" => "30"]) }}': [moment().subtract(29, 'days'), moment()],
|
||||
'{{ trans("general.date_range.this_month") }}' : [moment().startOf('month'), moment().endOf('month')],
|
||||
'{{ trans("general.date_range.last_month") }}' : [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
||||
},
|
||||
startDate: moment().subtract(29, 'days'),
|
||||
endDate : moment()
|
||||
},
|
||||
startDate: moment().subtract(29, 'days'),
|
||||
endDate : moment()
|
||||
},
|
||||
function (start, end) {
|
||||
$('input[name={{ $name }}]').val(start.format('YYYY-MM-DD') + '_' + end.format('YYYY-MM-DD'));
|
||||
function (start, end) {
|
||||
$('input[name={{ $name }}]').val(start.format('YYYY-MM-DD') + '_' + end.format('YYYY-MM-DD'));
|
||||
|
||||
date_format = convertDateFormat('{{ setting('general.date_format') }}', ' ');
|
||||
$('.date-range-btn span').html(start.format(date_format) + ' - ' + end.format(date_format));
|
||||
}
|
||||
);
|
||||
date_format = convertDateFormat('{{ setting('localisation.date_format') }}', ' ');
|
||||
$('.date-range-btn span').html(start.format(date_format) + ' - ' + end.format(date_format));
|
||||
}
|
||||
);
|
||||
|
||||
@if(request($name))
|
||||
var setDate = '{{ request($name) }}';
|
||||
var setDates = setDate.split('_');
|
||||
@if(request($name))
|
||||
var setDate = '{{ request($name) }}';
|
||||
var setDates = setDate.split('_');
|
||||
|
||||
date_format = convertDateFormat('{{ setting('general.date_format') }}', ' ');
|
||||
date_format = convertDateFormat('{{ setting('localisation.date_format') }}', ' ');
|
||||
|
||||
start_date = moment(setDates[0], 'YYYY-MM-DD'); //new Date(setDates[0]);
|
||||
finish_date = moment(setDates[1], 'YYYY-MM-DD'); //new Date(setDates[1]);
|
||||
start_date = moment(setDates[0], 'YYYY-MM-DD'); //new Date(setDates[0]);
|
||||
finish_date = moment(setDates[1], 'YYYY-MM-DD'); //new Date(setDates[1]);
|
||||
|
||||
$('.date-range-btn span').html(start_date.format(date_format) + ' - ' + finish_date.format(date_format));
|
||||
@endif
|
||||
});
|
||||
</script>
|
||||
$('.date-range-btn span').html(start_date.format(date_format) + ' - ' + finish_date.format(date_format));
|
||||
@endif
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
@ -1,18 +1,25 @@
|
||||
@php
|
||||
$page = explode('/', $url)[1];
|
||||
$text = $text ? $text : $page;
|
||||
$page = explode('/', $url)[1];
|
||||
$text = $text ? $text : $page;
|
||||
@endphp
|
||||
|
||||
{!! Form::open([
|
||||
'id' => str_singular($page) . '-' . $item->$id,
|
||||
'method' => 'DELETE',
|
||||
'url' => [$url, $item->$id],
|
||||
'style' => 'display:inline'
|
||||
]) !!}
|
||||
{!! Form::button('<i class="fa fa-trash-o" aria-hidden="true"></i> ' . trans('general.delete'), array(
|
||||
'type' => 'button',
|
||||
'class' => 'btn btn-danger btn-xs',
|
||||
'title' => trans('general.delete'),
|
||||
'onclick' => 'confirmDelete("' . '#' . str_singular($page) . '-' . $item->$id . '", "' . trans_choice('general.' . $text, 2) . '", "' . trans('general.delete_confirm', ['name' => '<strong>' . $item->$value . '</strong>', 'type' => mb_strtolower(trans_choice('general.' . $text, 1))]) . '", "' . trans('general.cancel') . '", "' . trans('general.delete') . '")'
|
||||
'@click' => 'confirmDelete("' . url($url, $item->$id) . '", "' . trans_choice('general.' . $text, 2) . '", "' . trans('general.delete_confirm', ['name' => '<strong>' . $item->$value . '</strong>', 'type' => mb_strtolower(trans_choice('general.' . $text, 1))]) . '", "' . trans('general.cancel') . '", "' . trans('general.delete') . '")'
|
||||
)) !!}
|
||||
{!! Form::close() !!}
|
||||
|
||||
@push('content_content_end')
|
||||
<akaunting-modal
|
||||
:show="confirm.show"
|
||||
:title="confirm.title"
|
||||
:message="confirm.message"
|
||||
:button_cancel="confirm.button_cancel"
|
||||
:button_delete="confirm.button_delete"
|
||||
v-if='confirm.show'
|
||||
@confirm='onDelete'
|
||||
@cancel="cancelDelete">
|
||||
</akaunting-modal>
|
||||
@endpush
|
||||
|
||||
|
@ -1,20 +1,26 @@
|
||||
@php
|
||||
$page = explode('/', $url)[1];
|
||||
$text = $text ? $text : $page;
|
||||
$page = explode('/', $url)[1];
|
||||
$text = $text ? $text : $page;
|
||||
|
||||
$name = addslashes($item->$value);
|
||||
$name = addslashes($item->$value);
|
||||
@endphp
|
||||
|
||||
{!! Form::open([
|
||||
'id' => str_singular($page) . '-' . $item->$id,
|
||||
'method' => 'DELETE',
|
||||
'url' => [$url, $item->$id],
|
||||
'style' => 'display:inline'
|
||||
]) !!}
|
||||
{!! Form::button(trans('general.delete'), array(
|
||||
'type' => 'button',
|
||||
'class' => 'delete-link',
|
||||
'class' => 'dropdown-item action-delete',
|
||||
'title' => trans('general.delete'),
|
||||
'onclick' => 'confirmDelete("' . '#' . str_singular($page) . '-' . $item->$id . '", "' . trans_choice('general.' . $text, 2) . '", "' . trans('general.delete_confirm', ['name' => '<strong>' . $name . '</strong>', 'type' => mb_strtolower(trans_choice('general.' . $text, 1))]) . '", "' . trans('general.cancel') . '", "' . trans('general.delete') . '")'
|
||||
'@click' => 'confirmDelete("' . url($url, $item->$id) . '", "' . trans_choice('general.' . $text, 2) . '", "' . trans('general.delete_confirm', ['name' => '<strong>' . $name . '</strong>', 'type' => mb_strtolower(trans_choice('general.' . $text, 1))]) . '", "' . trans('general.cancel') . '", "' . trans('general.delete') . '")'
|
||||
)) !!}
|
||||
{!! Form::close() !!}
|
||||
|
||||
@push('content_content_end')
|
||||
<akaunting-modal
|
||||
:show="confirm.show"
|
||||
:title="confirm.title"
|
||||
:message="confirm.message"
|
||||
:button_cancel="confirm.button_cancel"
|
||||
:button_delete="confirm.button_delete"
|
||||
v-if='confirm.show'
|
||||
@confirm='onDelete'
|
||||
@cancel="cancelDelete">
|
||||
</akaunting-modal>
|
||||
@endpush
|
||||
|
@ -1,12 +1,31 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}">
|
||||
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-{{ $icon }}"></i></div>
|
||||
{!! Form::email($name, $value, array_merge(['class' => 'form-control', 'placeholder' => trans('general.form.enter', ['field' => $text])], $attributes)) !!}
|
||||
<div
|
||||
class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
||||
:class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get(' . $name . ')' }} }]">
|
||||
@if ($text)
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
||||
@endif
|
||||
|
||||
<div class="input-group input-group-merge {{ $group_class }}">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-{{ $icon }}"></i>
|
||||
</span>
|
||||
</div>
|
||||
{!! Form::email($name, $value, array_merge([
|
||||
'class' => 'form-control',
|
||||
'data-name' => $name,
|
||||
'data-value' => $value,
|
||||
'placeholder' => trans('general.form.select.field', ['field' => $text]),
|
||||
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name
|
||||
], $attributes)) !!}
|
||||
</div>
|
||||
|
||||
<div class="invalid-feedback d-block"
|
||||
v-if="{{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.has(' . $name . ')' }}"
|
||||
v-html="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get(' . $name . ')' }}">
|
||||
</div>
|
||||
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
|
||||
@stack($name . '_input_end')
|
||||
|
15
resources/views/partials/form/enabled_group.blade.php
Normal file
15
resources/views/partials/form/enabled_group.blade.php
Normal file
@ -0,0 +1,15 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<label class="custom-toggle">
|
||||
<input type="checkbox"
|
||||
name="status[{{ $id }}]"
|
||||
v-on:input="onStatus({{ $id }}, $event)"
|
||||
{{ ($value) ? 'checked' :'' }}>
|
||||
|
||||
<span class="custom-toggle-slider rounded-circle status-green"
|
||||
data-label-off="{{ trans('general.no') }}"
|
||||
data-label-on="{{ trans('general.yes') }}">
|
||||
</span>
|
||||
</label>
|
||||
|
||||
@stack($name . '_input_end')
|
@ -1,9 +1,20 @@
|
||||
@stack($name . '_input_start')
|
||||
<div
|
||||
class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
||||
:class="[{'has-error': errors.{{ $name }}}]">
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label']) !!}
|
||||
|
||||
<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}" style="min-height: 59px">
|
||||
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
|
||||
{!! Form::file($name, array_merge(['class' => 'form-control'], $attributes)) !!}
|
||||
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
<div class="custom-file">
|
||||
{!! Form::file($name, array_merge([
|
||||
'class' => 'custom-file-input form-attachment cursor',
|
||||
'@input' => 'onHandleFileUpload("' . $name .'", $event)'
|
||||
], $attributes)) !!}
|
||||
{!! Form::label($name, $text, ['class' => 'custom-file-label']) !!}
|
||||
</div>
|
||||
|
||||
<div class="invalid-feedback d-block"
|
||||
v-if="{{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.has("' . $name . '")' }}"
|
||||
v-html="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get("' . $name . '")' }}">
|
||||
</div>
|
||||
</div>
|
||||
@stack($name . '_input_end')
|
||||
|
@ -1,19 +1,29 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div class="{{ $col }} input-group-invoice-text">
|
||||
<div class="form-group col-md-12 {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : ''}}">
|
||||
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-{{ $icon }}"></i></div>
|
||||
{!! Form::select($name, $values, $selected, array_merge(['class' => 'form-control', 'placeholder' => trans('general.form.select.field', ['field' => $text])], $attributes)) !!}
|
||||
<div
|
||||
class="form-group {{ $col }}{{ isset($attributes['required']) ? ' required' : '' }}"
|
||||
:class="[{'has-error': form.errors.get('{{ $name }}')}]">
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label']) !!}
|
||||
|
||||
<div class="input-group input-group-merge {{ $group_class }}">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-{{ $icon }}"></i>
|
||||
</span>
|
||||
</div>
|
||||
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
|
||||
|
||||
{!! Form::text($input_name, $input_value, [
|
||||
'class' => 'form-control',
|
||||
'data-name' => $input_name,
|
||||
'data-value' => $input_value,
|
||||
'placeholder' => trans('general.form.select.field', ['field' => $text]),
|
||||
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $input_name
|
||||
]) !!}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6 hidden {{ $errors->has('invoice_text_text') ? 'has-error' : '' }}">
|
||||
{!! Form::label($input_name, trans('settings.invoice.custom'), ['class' => 'control-label']) !!}
|
||||
{!! Form::text($input_name, $input_value, ['class' => 'form-control']) !!}
|
||||
{!! $errors->first($input_name, '<p class="help-block">:message</p>') !!}
|
||||
<div class="invalid-feedback d-block"
|
||||
v-if="form.errors.has('{{ $input_name }}')"
|
||||
v-html="form.errors.get('{{ $input_name }}')">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
36
resources/views/partials/form/money_group.blade.php
Normal file
36
resources/views/partials/form/money_group.blade.php
Normal file
@ -0,0 +1,36 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div
|
||||
class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
||||
:class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get(' . $name . ')' }} }]">
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
||||
|
||||
<div class="input-group input-group-merge {{ $group_class }}">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-{{ $icon }}"></i>
|
||||
</span>
|
||||
</div>
|
||||
@php
|
||||
if ($attributes['currency']) {
|
||||
$value = number_format($value, $attributes['currency']->precision, $attributes['currency']->decimal_mark, $attributes['currency']->thousands_separator);
|
||||
} else {
|
||||
$value = number_format($value, 2);
|
||||
}
|
||||
@endphp
|
||||
{!! Form::text($name, $value, array_merge([
|
||||
'class' => 'form-control',
|
||||
'data-name' => $name,
|
||||
'data-value' => $value,
|
||||
'v-model.lazy' => !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name,
|
||||
'v-money' => 'money'
|
||||
], $attributes)) !!}
|
||||
</div>
|
||||
|
||||
<div class="invalid-feedback d-block"
|
||||
v-if="{{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.has(' . $name . ')' }}"
|
||||
v-html="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get(' . $name . ')' }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stack($name . '_input_end')
|
@ -0,0 +1,29 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<akaunting-select
|
||||
class="{{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
||||
:form-classes="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]"
|
||||
:title="'{{ $text }}'"
|
||||
:placeholder="'{{ trans('general.form.select.field', ['field' => $text]) }}'"
|
||||
:name="'{{ $name }}'"
|
||||
:options="{{ json_encode($values) }}"
|
||||
:value="'{{ old($name, $selected) }}'"
|
||||
:icon="'{{ $icon }}'"
|
||||
:multiple="true"
|
||||
:add-new="true"
|
||||
:add-new-text="'{{ trans('general.form.add_new', ['field' => $text]) }}'"
|
||||
@if (!empty($attributes['path']))
|
||||
:add-new-path="'{{ $attributes['path'] }}'"
|
||||
@endif
|
||||
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : 'form.' . $name . ' = $event' }}"
|
||||
@if (!empty($attributes['change']))
|
||||
@change="{{ $attributes['change'] }}($event)"
|
||||
@endif
|
||||
@if(isset($attributes['v-error-message']))
|
||||
:form-error="{{ $attributes['v-error-message'] }}"
|
||||
@else
|
||||
:form-error="form.errors.get('{{ $name }}')"
|
||||
@endif
|
||||
></akaunting-select>
|
||||
|
||||
@stack($name . '_input_end')
|
24
resources/views/partials/form/multi_select_group.blade.php
Normal file
24
resources/views/partials/form/multi_select_group.blade.php
Normal file
@ -0,0 +1,24 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<akaunting-select
|
||||
class="{{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
||||
:form-classes="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]"
|
||||
:title="'{{ $text }}'"
|
||||
:placeholder="'{{ trans('general.form.select.field', ['field' => $text]) }}'"
|
||||
:name="'{{ $name }}'"
|
||||
:options="{{ json_encode($values) }}"
|
||||
:value="'{{ old($name, $selected) }}'"
|
||||
:icon="'{{ $icon }}'"
|
||||
:multiple="true"
|
||||
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : 'form.' . $name . ' = $event' }}"
|
||||
@if (!empty($attributes['change']))
|
||||
@change="{{ $attributes['change'] }}($event)"
|
||||
@endif
|
||||
@if(isset($attributes['v-error-message']))
|
||||
:form-error="{{ $attributes['v-error-message'] }}"
|
||||
@else
|
||||
:form-error="form.errors.get('{{ $name }}')"
|
||||
@endif
|
||||
></akaunting-select>
|
||||
|
||||
@stack($name . '_input_end')
|
@ -1,12 +1,29 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}">
|
||||
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-{{ $icon }}"></i></div>
|
||||
{!! Form::number($name, $value, array_merge(['class' => 'form-control', 'placeholder' => trans('general.form.enter', ['field' => $text])], $attributes)) !!}
|
||||
<div
|
||||
class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
||||
:class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get(' . $name . ')' }} }]">
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
||||
|
||||
<div class="input-group input-group-merge {{ $group_class }}">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-{{ $icon }}"></i>
|
||||
</span>
|
||||
</div>
|
||||
{!! Form::number($name, $value, array_merge([
|
||||
'class' => 'form-control',
|
||||
'data-name' => $name,
|
||||
'data-value' => $value,
|
||||
'placeholder' => trans('general.form.select.field', ['field' => $text]),
|
||||
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name
|
||||
], $attributes)) !!}
|
||||
</div>
|
||||
|
||||
<div class="invalid-feedback d-block"
|
||||
v-if="{{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.has(' . $name . ')' }}"
|
||||
v-html="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get(' . $name . ')' }}">
|
||||
</div>
|
||||
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
|
||||
@stack($name . '_input_end')
|
||||
|
@ -1,12 +1,30 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}">
|
||||
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-{{ $icon }}"></i></div>
|
||||
{!! Form::password($name, array_merge(['class' => 'form-control', 'placeholder' => trans('general.form.enter', ['field' => $text])], $attributes)) !!}
|
||||
<div
|
||||
class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
||||
:class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get(' . $name . ')' }} }]">
|
||||
@if ($text)
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
||||
@endif
|
||||
|
||||
<div class="input-group input-group-merge {{ $group_class }}">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-{{ $icon }}"></i>
|
||||
</span>
|
||||
</div>
|
||||
{!! Form::password($name, array_merge([
|
||||
'class' => 'form-control',
|
||||
'data-name' => $name,
|
||||
'placeholder' => trans('general.form.select.field', ['field' => $text]),
|
||||
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name
|
||||
], $attributes)) !!}
|
||||
</div>
|
||||
|
||||
<div class="invalid-feedback d-block"
|
||||
v-if="{{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.has(' . $name . ')' }}"
|
||||
v-html="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get(' . $name . ')' }}">
|
||||
</div>
|
||||
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
|
||||
@stack($name . '_input_end')
|
||||
|
@ -1,20 +1,27 @@
|
||||
@stack($name . '_input_start')
|
||||
<div
|
||||
class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
||||
:class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get(' . $name . ')' }} }]">
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label']) !!}
|
||||
|
||||
<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}">
|
||||
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
|
||||
<div class="input-group">
|
||||
<div class="btn-group radio-inline" data-toggle="buttons">
|
||||
<label id="{{ $name }}_1" class="btn btn-default">
|
||||
{!! Form::radio($name, '1') !!}
|
||||
<span class="radiotext">{{ trans('general.yes') }}</span>
|
||||
<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">
|
||||
{{ trans('general.yes') }}
|
||||
<input type="radio" name="{{ $name }}" id="{{ $name }}-1" value="1" v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name }}">
|
||||
</label>
|
||||
<label id="{{ $name }}_0" class="btn btn-default">
|
||||
{!! Form::radio($name, '0', true) !!}
|
||||
<span class="radiotext">{{ trans('general.no') }}</span>
|
||||
|
||||
<label class="btn btn-danger" @click="form.{{ $name }}=0">
|
||||
{{ trans('general.no') }}
|
||||
<input type="radio" name="{{ $name }}" id="{{ $name }}-0" value="0" v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name }}">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
|
||||
|
||||
<div class="invalid-feedback d-block"
|
||||
v-if="{{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.has(' . $name . ')' }}"
|
||||
v-html="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get(' . $name . ')' }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stack($name . '_input_end')
|
||||
|
@ -1,43 +1,41 @@
|
||||
@php
|
||||
if (($page == 'create') || !$model->recurring()->count()) {
|
||||
$frequency = 'no';
|
||||
$interval = 1;
|
||||
$custom_frequency = 'monthly';
|
||||
$count = 0;
|
||||
$frequency = old('recurring_frequency', 'no');
|
||||
$interval = old('recurring_interval', 1);
|
||||
$custom_frequency = old('recurring_custom_frequency', 'monthly');
|
||||
$count = old('recurring_count', 0);
|
||||
} else {
|
||||
$r = $model->recurring;
|
||||
$frequency = ($r->interval != 1) ? 'custom' : $r->frequency;
|
||||
$interval = $r->interval;
|
||||
$custom_frequency = $r->frequency;
|
||||
$count = $r->count;
|
||||
|
||||
$frequency = old('recurring_frequency', ($r->interval != 1) ? 'custom' : $r->frequency);
|
||||
$interval = old('recurring_interval', $r->interval);
|
||||
$custom_frequency = old('recurring_custom_frequency', $r->frequency);
|
||||
$count = old('recurring_count', $r->count);
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div class="col-md-6 input-group-recurring">
|
||||
<div class="form-group col-md-12 {{ $errors->has('recurring_frequency') ? 'has-error' : ''}}">
|
||||
{!! Form::label('recurring_frequency', trans('recurring.recurring'), ['class' => 'control-label']) !!}
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-refresh"></i></div>
|
||||
{!! Form::select('recurring_frequency', $recurring_frequencies, $frequency, ['class' => 'form-control']) !!}
|
||||
</div>
|
||||
{!! $errors->first('recurring_frequency', '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
<akaunting-recurring
|
||||
:form-classes="[{'has-error': form.errors.get('recurring_frequency')}]"
|
||||
:title="'{{ trans('recurring.recurring') }}'"
|
||||
:placeholder="'{{ trans('general.form.select.field', ['field' => trans('recurring.recurring')]) }}'"
|
||||
|
||||
<div class="form-group col-md-2 hidden {{ $errors->has('recurring_interval') ? 'has-error' : '' }}">
|
||||
{!! Form::label('recurring_interval', trans('recurring.every'), ['class' => 'control-label']) !!}
|
||||
{!! Form::number('recurring_interval', $interval, ['class' => 'form-control']) !!}
|
||||
{!! $errors->first('recurring_interval', '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
:frequency-options="{{ json_encode($recurring_frequencies) }}"
|
||||
:frequency-value="'{{ $frequency }}'"
|
||||
:frequency-error="form.errors.get('recurring_frequency')"
|
||||
|
||||
<div class="form-group col-md-4 hidden {{ $errors->has('recurring_custom_frequency') ? 'has-error' : ''}}">
|
||||
{!! Form::label('recurring_custom_frequency', trans('recurring.period'), ['class' => 'control-label']) !!}
|
||||
{!! Form::select('recurring_custom_frequency', $recurring_custom_frequencies, $custom_frequency, ['class' => 'form-control']) !!}
|
||||
{!! $errors->first('recurring_custom_frequency', '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
:interval-value="'{{ $interval }}'"
|
||||
:interval-error="form.errors.get('recurring_interval')"
|
||||
|
||||
<div class="form-group col-md-2 hidden {{ $errors->has('recurring_count') ? 'has-error' : '' }}">
|
||||
{!! Form::label('recurring_count', trans('recurring.times'), ['class' => 'control-label']) !!}
|
||||
{!! Form::number('recurring_count', $count, ['class' => 'form-control']) !!}
|
||||
{!! $errors->first('recurring_count', '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
</div>
|
||||
:custom-frequency-options="{{ json_encode($recurring_custom_frequencies) }}"
|
||||
:custom-frequency-value="'{{ $custom_frequency }}'"
|
||||
:custom-frequency-error="form.errors.get('custom_frequency')"
|
||||
|
||||
:count-value="'{{ $count }}'"
|
||||
:count-error="form.errors.get('recurring_count')"
|
||||
|
||||
@recurring_frequency="form.recurring_frequency = $event"
|
||||
@recurring_interval="form.recurring_interval = $event"
|
||||
@recurring_custom_frequency="form.recurring_custom_frequency = $event"
|
||||
@recurring_count="form.recurring_count = $event"
|
||||
>
|
||||
</akaunting-recurring>
|
||||
|
@ -1,10 +1,14 @@
|
||||
@stack('save_buttons_start')
|
||||
|
||||
<div class="{{ $col }}">
|
||||
<div class="form-group no-margin">
|
||||
{!! Form::button('<span class="fa fa-save"></span> ' . trans('general.save'), ['type' => 'submit', 'class' => 'btn btn-success button-submit', 'data-loading-text' => trans('general.loading')]) !!}
|
||||
<a href="{{ url($cancel) }}" class="btn btn-default"><span class="fa fa-times-circle"></span> {{ trans('general.cancel') }}</a>
|
||||
<div class="{{ $col }}">
|
||||
<a href="{{ url($cancel) }}" class="btn btn-icon btn-outline-secondary">
|
||||
<span class="btn-inner--icon"><i class="fas fa-times"></i></span>
|
||||
<span class="btn-inner--text">{{ trans('general.cancel') }}</span>
|
||||
</a>
|
||||
|
||||
{!! Form::button(
|
||||
'<div v-if="form.loading" :class="(form.loading) ? \'show \' : \'\'" class="aka-loader-frame d-none"><div class="aka-loader"></div></div> <span v-if="!form.loading" class="btn-inner--icon"><i class="fas fa-save"></i></span>' . '<span v-if="!form.loading" class="btn-inner--text"> ' . trans('general.save') . '</span>',
|
||||
[':disabled' => 'form.loading', 'type' => 'submit', 'class' => 'btn btn-icon btn-success button-submit', 'data-loading-text' => trans('general.loading')]) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stack('save_buttons_end')
|
||||
|
23
resources/views/partials/form/select_add_new_group.blade.php
Normal file
23
resources/views/partials/form/select_add_new_group.blade.php
Normal file
@ -0,0 +1,23 @@
|
||||
@stack($name . '_input_start')
|
||||
<akaunting-select
|
||||
class="{{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
||||
:form-classes="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get(' . $name . ')' }} }]"
|
||||
:title="'{{ $text }}'"
|
||||
:placeholder="'{{ trans('general.form.select.field', ['field' => $text]) }}'"
|
||||
:name="'{{ $name }}'"
|
||||
:options="{{ json_encode($values) }}"
|
||||
:value="'{{ old($name, $selected) }}'"
|
||||
:icon="'{{ $icon }}'"
|
||||
:add-new="true"
|
||||
:add-new-text="'{{ trans('general.form.add_new', ['field' => $text]) }}'"
|
||||
@if (!empty($attributes['path']))
|
||||
:add-new-path="'{{ $attributes['path'] }}'"
|
||||
@endif
|
||||
@new_item="onNewItem($event)"
|
||||
@interface="form.{{ $name }} = $event"
|
||||
@if (!empty($attributes['change']))
|
||||
@change="{{ $attributes['change'] }}($event)"
|
||||
@endif
|
||||
:form-error="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get(' . $name . ')' }}"
|
||||
></akaunting-select>
|
||||
@stack($name . '_input_end')
|
@ -1,12 +1,21 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : ''}}">
|
||||
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-{{ $icon }}"></i></div>
|
||||
{!! Form::select($name, $values, $selected, array_merge(['class' => 'form-control', 'placeholder' => trans('general.form.select.field', ['field' => $text])], $attributes)) !!}
|
||||
</div>
|
||||
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
|
||||
<akaunting-select
|
||||
class="{{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
||||
:form-classes="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]"
|
||||
:title="'{{ $text }}'"
|
||||
:placeholder="'{{ trans('general.form.select.field', ['field' => $text]) }}'"
|
||||
:name="'{{ $name }}'"
|
||||
:options="{{ json_encode($values) }}"
|
||||
:value="'{{ old($name, $selected) }}'"
|
||||
:icon="'{{ $icon }}'"
|
||||
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : 'form.' . $name . ' = $event' }}"
|
||||
@if (!empty($attributes['change']))
|
||||
@change="{{ $attributes['change'] }}($event)"
|
||||
@endif
|
||||
@if(isset($attributes['v-error-message']))
|
||||
:form-error="{{ $attributes['v-error-message'] }}"
|
||||
@else
|
||||
:form-error="form.errors.get('{{ $name }}')"
|
||||
@endif
|
||||
></akaunting-select>
|
||||
@stack($name . '_input_end')
|
||||
|
@ -0,0 +1,20 @@
|
||||
@stack($name . '_input_start')
|
||||
<akaunting-select
|
||||
class="{{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
||||
:form-classes="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get(' . $name . ')' }} }]"
|
||||
:title="'{{ $text }}'"
|
||||
:placeholder="'{{ trans('general.form.select.field', ['field' => $text]) }}'"
|
||||
:name="'{{ $name }}'"
|
||||
:options="{{ json_encode($values) }}"
|
||||
:value="'{{ old($name, $selected) }}'"
|
||||
:icon="'{{ $icon }}'"
|
||||
:add-new="true"
|
||||
:add-new-text="'{{ trans('general.form.add_new', ['field' => $text]) }}'"
|
||||
:group="true"
|
||||
@interface="form.{{ $name }} = $event"
|
||||
@if (!empty($attributes['change']))
|
||||
@change="{{ $attributes['change'] }}($event)"
|
||||
@endif
|
||||
:form-error="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get(' . $name . ')' }}"
|
||||
></akaunting-select>
|
||||
@stack($name . '_input_end')
|
18
resources/views/partials/form/select_group_group.blade.php
Normal file
18
resources/views/partials/form/select_group_group.blade.php
Normal file
@ -0,0 +1,18 @@
|
||||
@stack($name . '_input_start')
|
||||
<akaunting-select
|
||||
class="{{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
||||
:form-classes="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get(' . $name . ')' }} }]"
|
||||
:title="'{{ $text }}'"
|
||||
:placeholder="'{{ trans('general.form.select.field', ['field' => $text]) }}'"
|
||||
:name="'{{ $name }}'"
|
||||
:options="{{ json_encode($values) }}"
|
||||
:value="'{{ old($name, $selected) }}'"
|
||||
:icon="'{{ $icon }}'"
|
||||
:group="true"
|
||||
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model']. ' = $event' : 'form.' . $name . ' = $event' }}"
|
||||
@if (!empty($attributes['change']))
|
||||
@change="{{ $attributes['change'] }}($event)"
|
||||
@endif
|
||||
:form-error="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get(' . $name . ')' }}"
|
||||
></akaunting-select>
|
||||
@stack($name . '_input_end')
|
@ -1,12 +1,29 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}">
|
||||
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-{{ $icon }}"></i></div>
|
||||
{!! Form::text($name, $value, array_merge(['class' => 'form-control', 'placeholder' => trans('general.form.enter', ['field' => $text])], $attributes)) !!}
|
||||
<div
|
||||
class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
||||
:class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]">
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label'])!!}
|
||||
|
||||
<div class="input-group input-group-merge {{ $group_class }}">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-{{ $icon }}"></i>
|
||||
</span>
|
||||
</div>
|
||||
{!! Form::text($name, $value, array_merge([
|
||||
'class' => 'form-control',
|
||||
'data-name' => $name,
|
||||
'data-value' => $value,
|
||||
'placeholder' => trans('general.form.enter', ['field' => $text]),
|
||||
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name
|
||||
], $attributes)) !!}
|
||||
</div>
|
||||
|
||||
<div class="invalid-feedback d-block"
|
||||
v-if="{{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.has("' . $name . '")' }}"
|
||||
v-html="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get("' . $name . '")' }}">
|
||||
</div>
|
||||
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
|
||||
@stack($name . '_input_end')
|
||||
|
@ -1,9 +1,21 @@
|
||||
@stack($name . '_input_start')
|
||||
|
||||
<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}">
|
||||
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
|
||||
{!! Form::textarea($name, $value, array_merge(['class' => 'form-control', 'placeholder' => trans('general.form.enter', ['field' => $text])], $attributes)) !!}
|
||||
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
|
||||
<div
|
||||
class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
||||
:class="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get(' . $name . ')' }} }]">
|
||||
{!! Form::label($name, $text, ['class' => 'form-control-label']) !!}
|
||||
|
||||
{!! Form::textarea($name, $value, array_merge([
|
||||
'class' => 'form-control',
|
||||
'data-name' => $name,
|
||||
'data-value' => $value,
|
||||
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name
|
||||
], $attributes)) !!}
|
||||
|
||||
<div class="invalid-feedback d-block"
|
||||
v-if="{{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.has(' . $name . ')' }}"
|
||||
v-html="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get(' . $name . ')' }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stack($name . '_input_end')
|
||||
|
Reference in New Issue
Block a user