v2 first commit
This commit is contained in:
@ -3,62 +3,52 @@
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.categories', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'settings/categories', 'role' => 'form', 'class' => 'form-loading-button']) !!}
|
||||
<div class="card">
|
||||
{!! Form::open([
|
||||
'route' => 'categories.store',
|
||||
'id' => 'category',
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'font') }}
|
||||
|
||||
{{ Form::selectGroup('type', trans_choice('general.types', 1), 'bars', $types, config('general.types')) }}
|
||||
{{ Form::selectGroup('type', trans_choice('general.types', 1), 'bars', $types, config('general.types')) }}
|
||||
|
||||
@stack('color_input_start')
|
||||
<div class="form-group col-md-6 required {{ $errors->has('color') ? 'has-error' : ''}}">
|
||||
{!! Form::label('color', trans('general.color'), ['class' => 'control-label']) !!}
|
||||
<div id="category-color-picker" class="input-group colorpicker-component">
|
||||
<div class="input-group-addon"><i></i></div>
|
||||
{!! Form::text('color', '#00a65a', ['id' => 'color', 'class' => 'form-control', 'required' => 'required']) !!}
|
||||
@stack('color_input_start')
|
||||
<div class="form-group col-md-6 required {{ $errors->has('color') ? 'has-error' : ''}}">
|
||||
{!! Form::label('color', trans('general.color'), ['class' => 'form-control-label']) !!}
|
||||
<div class="input-group input-group-merge" id="category-color-picker">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<el-color-picker v-model="color" size="mini" :predefine="predefineColors" @change="onChangeColor"></el-color-picker>
|
||||
</span>
|
||||
</div>
|
||||
{!! Form::text('color', '#6DA252', ['v-model' => 'form.color', '@input' => 'onChangeColorInput', 'id' => 'color', 'class' => 'form-control color-hex', 'required' => 'required']) !!}
|
||||
</div>
|
||||
{!! $errors->first('color', '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
@stack('color_input_end')
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
{!! $errors->first('color', '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
@stack('color_input_end')
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('settings/categories') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
<div class="card-footer">
|
||||
<div class="row float-right">
|
||||
{{ Form::saveButtons('settings/categories') }}
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/colorpicker/bootstrap-colorpicker.js') }}"></script>
|
||||
@endpush
|
||||
|
||||
@push('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/colorpicker/bootstrap-colorpicker.css') }}">
|
||||
@endpush
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#enabled_1').trigger('click');
|
||||
|
||||
$('#name').focus();
|
||||
|
||||
$("#type").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.types', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#category-color-picker').colorpicker();
|
||||
});
|
||||
</script>
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/settings/categories.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
|
@ -3,70 +3,60 @@
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.categories', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="card">
|
||||
{!! Form::model($category, [
|
||||
'id' => 'category',
|
||||
'method' => 'PATCH',
|
||||
'url' => ['settings/categories', $category->id],
|
||||
'route' => ['categories.update', $category->id],
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button'
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'font') }}
|
||||
|
||||
@if ($type_disabled)
|
||||
{{ Form::selectGroup('type', trans_choice('general.types', 1), 'bars', $types, null, ['required' => 'required', 'disabled' => 'disabled']) }}
|
||||
<input type="hidden" name="type" value="{{ $category->type }}" />
|
||||
@else
|
||||
{{ Form::selectGroup('type', trans_choice('general.types', 1), 'bars', $types) }}
|
||||
@endif
|
||||
@if ($type_disabled)
|
||||
{{ Form::selectGroup('type', trans_choice('general.types', 1), 'bars', $types, $category->type, ['required' => 'required', 'disabled' => 'disabled']) }}
|
||||
<input type="hidden" name="type" value="{{ $category->type }}" />
|
||||
@else
|
||||
{{ Form::selectGroup('type', trans_choice('general.types', 1), 'bars', $types, $category->type) }}
|
||||
@endif
|
||||
|
||||
@stack('color_input_start')
|
||||
<div class="form-group col-md-6 required {{ $errors->has('color') ? 'has-error' : ''}}">
|
||||
{!! Form::label('color', trans('general.color'), ['class' => 'control-label']) !!}
|
||||
<div id="category-color-picker" class="input-group colorpicker-component">
|
||||
<div class="input-group-addon"><i></i></div>
|
||||
{!! Form::text('color', null, ['id' => 'color', 'class' => 'form-control', 'required' => 'required']) !!}
|
||||
@stack('color_input_start')
|
||||
<div class="form-group col-md-6 required {{ $errors->has('color') ? 'has-error' : ''}}">
|
||||
{!! Form::label('color', trans('general.color'), ['class' => 'form-control-label']) !!}
|
||||
<div class="input-group input-group-merge" id="category-color-picker">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<el-color-picker v-model="color" size="small" :predefine="predefineColors" @change="onChangeColor"></el-color-picker>
|
||||
</span>
|
||||
</div>
|
||||
{!! Form::text('color', $category->color, ['@input' => 'onChangeColorInput', 'id' => 'color', 'class' => 'form-control color-hex', 'required' => 'required']) !!}
|
||||
</div>
|
||||
{!! $errors->first('color', '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
@stack('color_input_end')
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
{!! $errors->first('color', '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
@stack('color_input_end')
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-settings-categories')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('settings/categories') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
|
||||
@permission('update-settings-categories')
|
||||
<div class="card-footer">
|
||||
<div class="row float-right">
|
||||
{{ Form::saveButtons('settings/categories') }}
|
||||
</div>
|
||||
</div>
|
||||
@endpermission
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/colorpicker/bootstrap-colorpicker.js') }}"></script>
|
||||
@endpush
|
||||
|
||||
@push('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/colorpicker/bootstrap-colorpicker.css') }}">
|
||||
@endpush
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#type").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.types', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#category-color-picker').colorpicker();
|
||||
});
|
||||
</script>
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/settings/categories.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
|
@ -3,108 +3,92 @@
|
||||
@section('title', trans_choice('general.categories', 2))
|
||||
|
||||
@permission('create-settings-categories')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('settings/categories/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@section('new_button')
|
||||
<span><a href="{{ route('categories.create') }}" class="btn btn-success btn-sm btn-alone"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
{!! Form::open(['url' => 'settings/categories', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div id="items" class="pull-left box-filter">
|
||||
<span class="title-filter hidden-xs">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::select('types[]', $types, request('types'), ['id' => 'filter-types', 'class' => 'form-control input-filter input-lg', 'multiple' => 'multiple']) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter hidden-xs">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="card">
|
||||
<div class="card-header border-bottom-0" v-bind:class="[bulk_action.show ? 'bg-gradient-primary' : '']">
|
||||
{!! Form::open([
|
||||
'url' => 'settings/categories',
|
||||
'role' => 'form',
|
||||
'method' => 'GET',
|
||||
'class' => 'mb-0'
|
||||
]) !!}
|
||||
<div class="row" v-if="!bulk_action.show">
|
||||
<div class="col-12">
|
||||
<span class="table-text hidden-lg">{{ trans('general.search') }}:</span>
|
||||
<akaunting-search></akaunting-search>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-striped table-hover" id="tbl-categories">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-5">@sortablelink('name', trans('general.name'))</th>
|
||||
<th class="col-md-3">@sortablelink('type', trans_choice('general.types', 1))</th>
|
||||
<th class="col-md-2 hidden-xs">{{ trans('general.color') }}</th>
|
||||
<th class="col-md-1 hidden-xs">@sortablelink('enabled', trans_choice('general.statuses', 1))</th>
|
||||
<th class="col-md-1 text-center">{{ trans('general.actions') }}</th>
|
||||
{{ Form::bulkActionRowGroup('general.categories', $bulk_actions, 'settings/categories') }}
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-flush table-hover">
|
||||
<thead class="thead-light">
|
||||
<tr class="row table-head-line">
|
||||
<th class="col-sm-2 col-md-2 col-lg-1 hidden-sm">{{ Form::bulkActionAllGroup() }}</th>
|
||||
<th class="col-xs-4 col-sm-3 col-md-2 col-lg-4">@sortablelink('name', trans('general.name'), ['filter' => 'active, visible'], ['class' => 'col-aka', 'rel' => 'nofollow'])</th>
|
||||
<th class="col-sm-2 col-md-2 col-lg-2 hidden-sm">@sortablelink('type', trans_choice('general.types', 1))</th>
|
||||
<th class="col-md-2 col-lg-2 hidden-md">{{ trans('general.color') }}</th>
|
||||
<th class="col-xs-4 col-sm-3 col-md-2 col-lg-2">@sortablelink('enabled', trans('general.enabled'))</th>
|
||||
<th class="col-xs-4 col-sm-2 col-md-2 col-lg-1 text-center">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($categories as $item)
|
||||
<tr>
|
||||
<td>
|
||||
@if (($item->type == 'income') && $auth_user->can('read-reports-income-summary'))
|
||||
<a href="{{ url('reports/income-summary?categories[]=' . $item->id) }}">{{ $item->name }}</a>
|
||||
@elseif (($item->type == 'expense') && $auth_user->can('read-reports-expense-summary'))
|
||||
<a href="{{ url('reports/expense-summary?categories[]=' . $item->id) }}">{{ $item->name }}</a>
|
||||
@elseif (($item->type == 'item') && $auth_user->can('read-common-items'))
|
||||
<a href="{{ url('common/items?categories[]=' . $item->id) }}">{{ $item->name }}</a>
|
||||
@else
|
||||
<a href="{{ url('settings/categories/' . $item->id . '/edit') }}">{{ $item->name }}</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $types[$item->type] }}</td>
|
||||
<td class="hidden-xs"><i class="fa fa-2x fa-circle" style="color:{{ $item->color }};"></i></td>
|
||||
<td class="hidden-xs">
|
||||
@if ($item->enabled)
|
||||
<span class="label label-success">{{ trans('general.enabled') }}</span>
|
||||
@else
|
||||
<span class="label label-danger">{{ trans('general.disabled') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" data-toggle-position="left" aria-expanded="false">
|
||||
<i class="fa fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="{{ url('settings/categories/' . $item->id . '/edit') }}">{{ trans('general.edit') }}</a></li>
|
||||
@foreach($categories as $item)
|
||||
<tr class="row align-items-center border-top-1">
|
||||
<td class="col-sm-2 col-md-2 col-lg-1 hidden-sm">{{ Form::bulkActionGroup($item->id, $item->name) }}</td>
|
||||
<td class="col-xs-4 col-sm-3 col-md-2 col-lg-4"><a class="col-aka text-success " href="{{ route('categories.edit', $item->id) }}">{{ $item->name }}</a></td>
|
||||
<td class="col-sm-2 col-md-2 col-lg-2 hidden-sm">{{ $types[$item->type] }}</td>
|
||||
<td class="col-md-2 col-lg-2 hidden-md"><i class="fa fa-2x fa-circle" style="color:{{ $item->color }};"></i></td>
|
||||
<td class="col-xs-4 col-sm-3 col-md-2 col-lg-2">
|
||||
@if (user()->can('update-settings-categories'))
|
||||
{{ Form::enabledGroup($item->id, $item->name, $item->enabled) }}
|
||||
@else
|
||||
@if ($item->enabled)
|
||||
<li><a href="{{ route('categories.disable', $item->id) }}">{{ trans('general.disable') }}</a></li>
|
||||
<badge rounded type="success">{{ trans('general.enabled') }}</badge>
|
||||
@else
|
||||
<li><a href="{{ route('categories.enable', $item->id) }}">{{ trans('general.enable') }}</a></li>
|
||||
<badge rounded type="danger">{{ trans('general.disabled') }}</badge>
|
||||
@endif
|
||||
@if ($item->id != $transfer_id)
|
||||
@permission('delete-settings-categories')
|
||||
<li class="divider"></li>
|
||||
<li>{!! Form::deleteLink($item, 'settings/categories') !!}</li>
|
||||
@endpermission
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</td>
|
||||
<td class="col-xs-4 col-sm-2 col-md-2 col-lg-1 text-center">
|
||||
<div class="dropdown">
|
||||
<a class="btn btn-neutral btn-sm text-light items-align-center py-2" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-ellipsis-h text-muted"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
|
||||
<a class="dropdown-item" href="{{ route('categories.edit', $item->id) }}">{{ trans('general.edit') }}</a>
|
||||
@if ($item->id != $transfer_id)
|
||||
@permission('delete-settings-categories')
|
||||
<div class="dropdown-divider"></div>
|
||||
{!! Form::deleteLink($item, 'settings/categories') !!}
|
||||
@endpermission
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $categories, 'type' => 'categories'])
|
||||
<div class="card-footer table-action">
|
||||
<div class="row">
|
||||
@include('partials.admin.pagination', ['items' => $categories, 'type' => 'categories'])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#filter-types").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.types', 1)]) }}"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/settings/categories.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
|
51
resources/views/settings/company/edit.blade.php
Normal file
51
resources/views/settings/company/edit.blade.php
Normal file
@ -0,0 +1,51 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.companies', 1))
|
||||
|
||||
@section('content')
|
||||
{!! Form::model($setting, [
|
||||
'id' => 'setting',
|
||||
'method' => 'PATCH',
|
||||
'route' => 'settings.update',
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true
|
||||
]) !!}
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('name', trans('settings.company.name'), 'building') }}
|
||||
|
||||
{{ Form::textGroup('email', trans('settings.company.email'), 'envelope') }}
|
||||
|
||||
{{ Form::textGroup('tax_number', trans('general.tax_number'), 'percent', []) }}
|
||||
|
||||
{{ Form::textGroup('phone', trans('settings.company.phone'), 'phone', []) }}
|
||||
|
||||
{{ Form::textareaGroup('address', trans('settings.company.address')) }}
|
||||
|
||||
{{ Form::fileGroup('logo', trans('settings.company.logo')) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@permission('update-settings-settings')
|
||||
<div class="card-footer">
|
||||
<div class="float-right">
|
||||
{{ Form::saveButtons('settings/settings') }}
|
||||
</div>
|
||||
</div>
|
||||
@endpermission
|
||||
</div>
|
||||
|
||||
{!! Form::hidden('_prefix', 'company') !!}
|
||||
|
||||
{!! Form::close() !!}
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/settings/settings.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
@ -3,75 +3,51 @@
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.currencies', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'settings/currencies', 'role' => 'form', 'class' => 'form-loading-button']) !!}
|
||||
<div class="card">
|
||||
{!! Form::open([
|
||||
'route' => 'currencies.store',
|
||||
'id' => 'currency',
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'chart-bar') }}
|
||||
|
||||
{{ Form::selectGroup('code', trans('currencies.code'), 'code', $codes) }}
|
||||
{{ Form::selectGroup('code', trans('currencies.code'), 'code', $codes, null, ['required' => 'required', 'change' => 'onCodeAccount']) }}
|
||||
|
||||
{{ Form::textGroup('rate', trans('currencies.rate'), 'money') }}
|
||||
{{ Form::textGroup('rate', trans('currencies.rate'), 'sliders-h', ['@input' => 'RateReplace']) }}
|
||||
|
||||
{{ Form::numberGroup('precision', trans('currencies.precision'), 'bullseye') }}
|
||||
{{ Form::numberGroup('precision', trans('currencies.precision'), 'dot-circle') }}
|
||||
|
||||
{{ Form::textGroup('symbol', trans('currencies.symbol.symbol'), 'font') }}
|
||||
{{ Form::textGroup('symbol', trans('currencies.symbol.symbol'), 'font') }}
|
||||
|
||||
{{ Form::selectGroup('symbol_first', trans('currencies.symbol.position'), 'text-width', ['1' => trans('currencies.symbol.before'), '0' => trans('currencies.symbol.after')]) }}
|
||||
{{ Form::selectGroup('symbol_first', trans('currencies.symbol.position'), 'text-width', ['1' => trans('currencies.symbol.before'), '0' => trans('currencies.symbol.after')]) }}
|
||||
|
||||
{{ Form::textGroup('decimal_mark', trans('currencies.decimal_mark'), 'columns') }}
|
||||
{{ Form::textGroup('decimal_mark', trans('currencies.decimal_mark'), 'sign') }}
|
||||
|
||||
{{ Form::textGroup('thousands_separator', trans('currencies.thousands_separator'), 'columns', []) }}
|
||||
{{ Form::textGroup('thousands_separator', trans('currencies.thousands_separator'), 'slash', []) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
|
||||
{{ Form::radioGroup('default_currency', trans('currencies.default')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
{{ Form::radioGroup('default_currency', trans('currencies.default')) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('settings/currencies') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
<div class="card-footer">
|
||||
<div class="row float-right">
|
||||
{{ Form::saveButtons('settings/currencies') }}
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#enabled_1').trigger('click');
|
||||
|
||||
$('#name').focus();
|
||||
|
||||
$("#code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('currencies.code')]) }}"
|
||||
});
|
||||
|
||||
$('#code').change(function() {
|
||||
$.ajax({
|
||||
url: '{{ url("settings/currencies/config") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'code=' + $(this).val(),
|
||||
success: function(data) {
|
||||
$('#rate').val(data.rate);
|
||||
$('#precision').val(data.precision);
|
||||
$('#symbol').val(data.symbol);
|
||||
$('#symbol_first').val(data.symbol_first);
|
||||
$('#decimal_mark').val(data.decimal_mark);
|
||||
$('#thousands_separator').val(data.thousands_separator);
|
||||
|
||||
// This event Select2 Stylesheet
|
||||
$('#symbol_first').trigger('change');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/settings/currencies.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
|
@ -3,77 +3,55 @@
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.currencies', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="card">
|
||||
{!! Form::model($currency, [
|
||||
'id' => 'currency',
|
||||
'method' => 'PATCH',
|
||||
'url' => ['settings/currencies', $currency->id],
|
||||
'route' => ['currencies.update', $currency->id],
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button'
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'chart-bar') }}
|
||||
|
||||
{{ Form::selectGroup('code', trans('currencies.code'), 'code', $codes) }}
|
||||
{{ Form::selectGroup('code', trans('currencies.code'), 'code', $codes, $currency->code, ['required' => 'required', 'change' => 'onCodeAccount']) }}
|
||||
|
||||
{{ Form::textGroup('rate', trans('currencies.rate'), 'money') }}
|
||||
{{ Form::textGroup('rate', trans('currencies.rate'), 'sliders-h', ['@input' => 'RateReplace']) }}
|
||||
|
||||
{{ Form::numberGroup('precision', trans('currencies.precision'), 'bullseye') }}
|
||||
{{ Form::numberGroup('precision', trans('currencies.precision'), 'dot-circle') }}
|
||||
|
||||
{{ Form::textGroup('symbol', trans('currencies.symbol.symbol'), 'font') }}
|
||||
{{ Form::textGroup('symbol', trans('currencies.symbol.symbol'), 'font') }}
|
||||
|
||||
{{ Form::selectGroup('symbol_first', trans('currencies.symbol.position'), 'text-width', ['1' => trans('currencies.symbol.before'), '0' => trans('currencies.symbol.after')]) }}
|
||||
{{ Form::selectGroup('symbol_first', trans('currencies.symbol.position'), 'text-width', ['1' => trans('currencies.symbol.before'), '0' => trans('currencies.symbol.after')], $currency->symbol_first) }}
|
||||
|
||||
{{ Form::textGroup('decimal_mark', trans('currencies.decimal_mark'), 'columns') }}
|
||||
{{ Form::textGroup('decimal_mark', trans('currencies.decimal_mark'), 'sign') }}
|
||||
|
||||
{{ Form::textGroup('thousands_separator', trans('currencies.thousands_separator'), 'columns', []) }}
|
||||
{{ Form::textGroup('thousands_separator', trans('currencies.thousands_separator'), 'slash', []) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
|
||||
{{ Form::radioGroup('default_currency', trans('currencies.default')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
{{ Form::radioGroup('default_currency', trans('currencies.default')) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@permission('update-settings-currencies')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('settings/currencies') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
@permission('update-settings-currencies')
|
||||
<div class="card-footer">
|
||||
<div class="row float-right">
|
||||
{{ Form::saveButtons('settings/currencies') }}
|
||||
</div>
|
||||
</div>
|
||||
@endpermission
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('currencies.code')]) }}"
|
||||
});
|
||||
|
||||
$('#code').change(function() {
|
||||
$.ajax({
|
||||
url: '{{ url("settings/currencies/config") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'code=' + $(this).val(),
|
||||
success: function(data) {
|
||||
$('#precision').val(data.precision);
|
||||
$('#symbol').val(data.symbol);
|
||||
$('#symbol_first').val(data.symbol_first);
|
||||
$('#decimal_mark').val(data.decimal_mark);
|
||||
$('#thousands_separator').val(data.thousands_separator);
|
||||
|
||||
// This event Select2 Stylesheet
|
||||
$('#symbol_first').trigger('change');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/settings/currencies.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
|
@ -3,83 +3,90 @@
|
||||
@section('title', trans_choice('general.currencies', 2))
|
||||
|
||||
@permission('create-settings-currencies')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('settings/currencies/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@section('new_button')
|
||||
<span><a href="{{ route('currencies.create') }}" class="btn btn-success btn-sm header-button-top"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
{!! Form::open(['url' => 'settings/currencies', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter hidden-xs">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
<div class="card">
|
||||
<div class="card-header border-bottom-0" v-bind:class="[bulk_action.show ? 'bg-gradient-primary' : '']">
|
||||
{!! Form::open([
|
||||
'url' => 'settings/currencies',
|
||||
'role' => 'form',
|
||||
'method' => 'GET',
|
||||
'class' => 'mb-0'
|
||||
]) !!}
|
||||
<div class="row" v-if="!bulk_action.show">
|
||||
<div class="col-12 card-header-search">
|
||||
<span class="table-text hidden-lg">{{ trans('general.search') }}:</span>
|
||||
<akaunting-search></akaunting-search>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::bulkActionRowGroup('general.currencies', $bulk_actions, 'settings/currencies') }}
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter hidden-xs">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-striped table-hover" id="tbl-currencies">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-5">@sortablelink('name', trans('general.name'))</th>
|
||||
<th class="col-md-3 hidden-xs">@sortablelink('code', trans('currencies.code'))</th>
|
||||
<th class="col-md-2">@sortablelink('rate', trans('currencies.rate'))</th>
|
||||
<th class="col-md-1 hidden-xs">@sortablelink('enabled', trans_choice('general.statuses', 1))</th>
|
||||
<th class="col-md-1 text-center">{{ trans('general.actions') }}</th>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-flush table-hover">
|
||||
<thead class="thead-light">
|
||||
<tr class="row table-head-line">
|
||||
<th class="col-sm-2 col-md-2 col-lg-1 hidden-sm">{{ Form::bulkActionAllGroup() }}</th>
|
||||
<th class="col-xs-4 col-sm-3 col-md-2 col-lg-4">@sortablelink('name', trans('general.name'), ['filter' => 'active, visible'], ['class' => 'col-aka', 'rel' => 'nofollow'])</th>
|
||||
<th class="col-md-2 col-lg-2 hidden-md">@sortablelink('code', trans('currencies.code'))</th>
|
||||
<th class="col-sm-2 col-md-2 col-lg-2 hidden-sm">@sortablelink('rate', trans('currencies.rate'))</th>
|
||||
<th class="col-xs-4 col-sm-3 col-md-2 col-lg-2">@sortablelink('enabled', trans('general.enabled'))</th>
|
||||
<th class="col-xs-4 col-sm-2 col-md-2 col-lg-1 text-center">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($currencies as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('settings/currencies/' . $item->id . '/edit') }}">{{ $item->name }}</a></td>
|
||||
<td class="hidden-xs">{{ $item->code }}</td>
|
||||
<td>{{ $item->rate }}</td>
|
||||
<td class="hidden-xs">
|
||||
@if ($item->enabled)
|
||||
<span class="label label-success">{{ trans('general.enabled') }}</span>
|
||||
@else
|
||||
<span class="label label-danger">{{ trans('general.disabled') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" data-toggle-position="left" aria-expanded="false">
|
||||
<i class="fa fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="{{ url('settings/currencies/' . $item->id . '/edit') }}">{{ trans('general.edit') }}</a></li>
|
||||
@foreach($currencies as $item)
|
||||
<tr class="row align-items-center border-top-1">
|
||||
<td class="col-sm-2 col-md-2 col-lg-1 hidden-sm">{{ Form::bulkActionGroup($item->id, $item->name) }}</td>
|
||||
<td class="col-xs-4 col-sm-3 col-md-2 col-lg-4"><a class="col-aka text-success" href="{{ route('currencies.edit', $item->id) }}">{{ $item->name }}</a></td>
|
||||
<td class="col-md-2 col-lg-2 hidden-md">{{ $item->code }}</td>
|
||||
<td class="col-sm-2 col-md-2 col-lg-2 hidden-sm">{{ $item->rate }}</td>
|
||||
<td class="col-xs-4 col-sm-3 col-md-2 col-lg-2">
|
||||
@if (user()->can('update-settings-currencies'))
|
||||
{{ Form::enabledGroup($item->id, $item->name, $item->enabled) }}
|
||||
@else
|
||||
@if ($item->enabled)
|
||||
<li><a href="{{ route('currencies.disable', $item->id) }}">{{ trans('general.disable') }}</a></li>
|
||||
<badge rounded type="success">{{ trans('general.enabled') }}</badge>
|
||||
@else
|
||||
<li><a href="{{ route('currencies.enable', $item->id) }}">{{ trans('general.enable') }}</a></li>
|
||||
<badge rounded type="danger">{{ trans('general.disabled') }}</badge>
|
||||
@endif
|
||||
@permission('delete-settings-currencies')
|
||||
<li class="divider"></li>
|
||||
<li>{!! Form::deleteLink($item, 'settings/currencies') !!}</li>
|
||||
@endpermission
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</td>
|
||||
<td class="col-xs-4 col-sm-2 col-md-2 col-lg-1 text-center">
|
||||
<div class="dropdown">
|
||||
<a class="btn btn-neutral btn-sm text-light items-align-center py-2" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-ellipsis-h text-muted"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
|
||||
<a class="dropdown-item" href="{{ route('currencies.edit', $item->id) }}">{{ trans('general.edit') }}</a>
|
||||
@permission('delete-settings-currencies')
|
||||
<div class="dropdown-divider"></div>
|
||||
{!! Form::deleteLink($item, 'settings/currencies') !!}
|
||||
@endpermission
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $currencies, 'type' => 'currencies'])
|
||||
<div class="card-footer table-action">
|
||||
<div class="row">
|
||||
@include('partials.admin.pagination', ['items' => $currencies, 'type' => 'currencies'])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/settings/currencies.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
|
53
resources/views/settings/default/edit.blade.php
Normal file
53
resources/views/settings/default/edit.blade.php
Normal file
@ -0,0 +1,53 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.defaults', 1))
|
||||
|
||||
@section('content')
|
||||
{!! Form::model($setting, [
|
||||
'id' => 'setting',
|
||||
'method' => 'PATCH',
|
||||
'route' => 'settings.update',
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true,
|
||||
]) !!}
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::selectGroup('account', trans_choice('general.accounts', 1), 'university', $accounts, !empty($setting['account']) ? $setting['account'] : null, []) }}
|
||||
|
||||
{{ Form::selectGroup('currency', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, !empty($setting['currency']) ? $setting['currency'] : null, []) }}
|
||||
|
||||
{{ Form::selectGroup('tax', trans_choice('general.taxes', 1), 'percent', $taxes, !empty($setting['tax']) ? $setting['tax'] : null, []) }}
|
||||
|
||||
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', $payment_methods, !empty($setting['payment_method']) ? $setting['payment_method'] : null, []) }}
|
||||
|
||||
{{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed(), !empty($setting['locale']) ? $setting['locale'] : null, []) }}
|
||||
|
||||
{{ Form::selectGroup('list_limit', trans('settings.default.list_limit'), 'columns', ['10' => '10', '25' => '25', '50' => '50', '100' => '100'], !empty($setting['list_limit']) ? $setting['list_limit'] : null, []) }}
|
||||
|
||||
{{ Form::radioGroup('use_gravatar', trans('settings.default.use_gravatar')) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@permission('update-settings-settings')
|
||||
<div class="card-footer">
|
||||
<div class="row float-right">
|
||||
{{ Form::saveButtons(URL::previous()) }}
|
||||
</div>
|
||||
</div>
|
||||
@endpermission
|
||||
</div>
|
||||
|
||||
{!! Form::hidden('_prefix', 'default') !!}
|
||||
|
||||
{!! Form::close() !!}
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/settings/settings.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
295
resources/views/settings/email/edit.blade.php
Normal file
295
resources/views/settings/email/edit.blade.php
Normal file
@ -0,0 +1,295 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.email'))
|
||||
|
||||
@section('content')
|
||||
{!! Form::model($setting, [
|
||||
'id' => 'setting',
|
||||
'method' => 'PATCH',
|
||||
'route' => 'settings.email.update',
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true,
|
||||
]) !!}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="accordion" id="accordion1">
|
||||
<div class="card">
|
||||
<div class="card-header" id="heading1" data-toggle="collapse" data-target="#collapse1" aria-expanded="true" aria-controls="collapse1">
|
||||
<div class="align-items-center">
|
||||
<h4 class="mb-0">{{ trans('settings.email.templates.invoice_new_customer') }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div id="collapse1" class="collapse show" aria-labelledby="heading1" data-parent="#accordion1">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('template_invoice_new_customer_subject', trans('settings.email.templates.subject'), 'font', ['required' => 'required'], null, 'col-md-12') }}
|
||||
|
||||
{{ Form::textareaGroup('template_invoice_new_customer_body', trans('settings.email.templates.body'), null, null, ['required' => 'required', 'rows' => '5', 'data-toggle' => 'quill'], 'col-md-12') }}
|
||||
|
||||
<div class="col-md-12">
|
||||
<small class="text-gray">{!! trans('settings.email.templates.tags', ['tag_list' => $invoice_tags]) !!}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="accordion" id="accordion2">
|
||||
<div class="card">
|
||||
<div class="card-header" id="heading2" data-toggle="collapse" data-target="#collapse2" aria-expanded="true" aria-controls="collapse2">
|
||||
<div class="align-items-center">
|
||||
<h4 class="mb-0">{{ trans('settings.email.templates.invoice_remind_customer') }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div id="collapse2" class="collapse show" aria-labelledby="heading2" data-parent="#accordion2">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('template_invoice_remind_customer_subject', trans('settings.email.templates.subject'), 'font', ['required' => 'required'], null, 'col-md-12') }}
|
||||
|
||||
{{ Form::textareaGroup('template_invoice_remind_customer_body', trans('settings.email.templates.body'), null, null, ['required' => 'required', 'rows' => '5', 'data-toggle' => 'quill'], 'col-md-12') }}
|
||||
|
||||
<div class="col-md-12">
|
||||
<small class="text-gray">{!! trans('settings.email.templates.tags', ['tag_list' => $invoice_tags]) !!}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="accordion" id="accordion3">
|
||||
<div class="card">
|
||||
<div class="card-header" id="heading3" data-toggle="collapse" data-target="#collapse3" aria-expanded="false" aria-controls="collapse3">
|
||||
<div class="align-items-center">
|
||||
<h4 class="mb-0">{{ trans('settings.email.templates.invoice_remind_admin') }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div id="collapse3" class="collapse hide" aria-labelledby="heading3" data-parent="#accordion3">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('template_invoice_remind_admin_subject', trans('settings.email.templates.subject'), 'font', ['required' => 'required'], null, 'col-md-12') }}
|
||||
|
||||
{{ Form::textareaGroup('template_invoice_remind_admin_body', trans('settings.email.templates.body'), null, null, ['required' => 'required', 'rows' => '5', 'data-toggle' => 'quill'], 'col-md-12') }}
|
||||
|
||||
<div class="col-md-12">
|
||||
<small class="text-gray">{!! trans('settings.email.templates.tags', ['tag_list' => $invoice_tags]) !!}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="accordion" id="accordion4">
|
||||
<div class="card">
|
||||
<div class="card-header" id="heading4" data-toggle="collapse" data-target="#collapse4" aria-expanded="false" aria-controls="collapse4">
|
||||
<div class="align-items-center">
|
||||
<h4 class="mb-0">{{ trans('settings.email.templates.invoice_recur_customer') }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div id="collapse4" class="collapse hide" aria-labelledby="heading4" data-parent="#accordion4">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('template_invoice_recur_customer_subject', trans('settings.email.templates.subject'), 'font', ['required' => 'required'], null, 'col-md-12') }}
|
||||
|
||||
{{ Form::textareaGroup('template_invoice_recur_customer_body', trans('settings.email.templates.body'), null, null, ['required' => 'required', 'rows' => '5', 'data-toggle' => 'quill'], 'col-md-12') }}
|
||||
|
||||
<div class="col-md-12">
|
||||
<small class="text-gray">{!! trans('settings.email.templates.tags', ['tag_list' => $invoice_tags]) !!}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="accordion" id="accordion5">
|
||||
<div class="card">
|
||||
<div class="card-header" id="heading5" data-toggle="collapse" data-target="#collapse5" aria-expanded="false" aria-controls="collapse5">
|
||||
<div class="align-items-center">
|
||||
<h4 class="mb-0">{{ trans('settings.email.templates.invoice_recur_admin') }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div id="collapse5" class="collapse hide" aria-labelledby="heading5" data-parent="#accordion5">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('template_invoice_recur_admin_subject', trans('settings.email.templates.subject'), 'font', ['required' => 'required'], null, 'col-md-12') }}
|
||||
|
||||
{{ Form::textareaGroup('template_invoice_recur_admin_body', trans('settings.email.templates.body'), null, null, ['required' => 'required', 'rows' => '5', 'data-toggle' => 'quill'], 'col-md-12') }}
|
||||
|
||||
<div class="col-md-12">
|
||||
<small class="text-gray">{!! trans('settings.email.templates.tags', ['tag_list' => $invoice_tags]) !!}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="accordion" id="accordion6">
|
||||
<div class="card">
|
||||
<div class="card-header" id="heading6" data-toggle="collapse" data-target="#collapse6" aria-expanded="false" aria-controls="collapse6">
|
||||
<div class="align-items-center">
|
||||
<h4 class="mb-0">{{ trans('settings.email.templates.invoice_payment_customer') }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div id="collapse6" class="collapse hide" aria-labelledby="heading6" data-parent="#accordion6">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('template_invoice_payment_customer_subject', trans('settings.email.templates.subject'), 'font', ['required' => 'required'], null, 'col-md-12') }}
|
||||
|
||||
{{ Form::textareaGroup('template_invoice_payment_customer_body', trans('settings.email.templates.body'), null, null, ['required' => 'required', 'rows' => '5', 'data-toggle' => 'quill'], 'col-md-12') }}
|
||||
|
||||
<div class="col-md-12">
|
||||
<small class="text-gray">{!! trans('settings.email.templates.tags', ['tag_list' => $payment_tags]) !!}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="accordion" id="accordion7">
|
||||
<div class="card">
|
||||
<div class="card-header" id="heading7" data-toggle="collapse" data-target="#collapse7" aria-expanded="false" aria-controls="collapse7">
|
||||
<div class="align-items-center">
|
||||
<h4 class="mb-0">{{ trans('settings.email.templates.invoice_payment_admin') }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div id="collapse7" class="collapse hide" aria-labelledby="heading7" data-parent="#accordion7">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('template_invoice_payment_admin_subject', trans('settings.email.templates.subject'), 'font', ['required' => 'required'], null, 'col-md-12') }}
|
||||
|
||||
{{ Form::textareaGroup('template_invoice_payment_admin_body', trans('settings.email.templates.body'), null, null, ['required' => 'required', 'rows' => '5', 'data-toggle' => 'quill'], 'col-md-12') }}
|
||||
|
||||
<div class="col-md-12">
|
||||
<small class="text-gray">{!! trans('settings.email.templates.tags', ['tag_list' => $payment_tags]) !!}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="accordion" id="accordion8">
|
||||
<div class="card">
|
||||
<div class="card-header" id="heading8" data-toggle="collapse" data-target="#collapse8" aria-expanded="false" aria-controls="collapse8">
|
||||
<div class="align-items-center">
|
||||
<h4 class="mb-0">{{ trans('settings.email.templates.bill_remind_admin') }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div id="collapse8" class="collapse hide" aria-labelledby="heading8" data-parent="#accordion8">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('template_bill_remind_admin_subject', trans('settings.email.templates.subject'), 'font', ['required' => 'required'], null, 'col-md-12') }}
|
||||
|
||||
{{ Form::textareaGroup('template_bill_remind_admin_body', trans('settings.email.templates.body'), null, null, ['required' => 'required', 'rows' => '5', 'data-toggle' => 'quill'], 'col-md-12') }}
|
||||
|
||||
<div class="col-md-12">
|
||||
<small class="text-gray">{!! trans('settings.email.templates.tags', ['tag_list' => $bill_tags]) !!}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="accordion" id="accordion9">
|
||||
<div class="card">
|
||||
<div class="card-header" id="heading9" data-toggle="collapse" data-target="#collapse9" aria-expanded="false" aria-controls="collapse9">
|
||||
<div class="align-items-center">
|
||||
<h4 class="mb-0">{{ trans('settings.email.templates.bill_recur_admin') }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div id="collapse9" class="collapse hide" aria-labelledby="heading9" data-parent="#accordion9">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('template_bill_recur_admin_subject', trans('settings.email.templates.subject'), 'font', ['required' => 'required'], null, 'col-md-12') }}
|
||||
|
||||
{{ Form::textareaGroup('template_bill_recur_admin_body', trans('settings.email.templates.body'), null, null, ['required' => 'required', 'rows' => '5', 'data-toggle' => 'quill'], 'col-md-12') }}
|
||||
|
||||
<div class="col-md-12">
|
||||
<small class="text-gray">{!! trans('settings.email.templates.tags', ['tag_list' => $bill_tags]) !!}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="accordion" id="accordion10">
|
||||
<div class="card">
|
||||
<div class="card-header" id="heading10" data-toggle="collapse" data-target="#collapse10" aria-expanded="false" aria-controls="collapse10">
|
||||
<div class="align-items-center">
|
||||
<h4 class="mb-0">{{ trans('settings.email.protocol') }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div id="collapse10" class="collapse hide" aria-labelledby="heading10" data-parent="#accordion10">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::selectGroup('protocol', trans('settings.email.protocol'), 'share', $email_protocols, !empty($setting['protocol']) ? $setting['protocol'] : null, []) }}
|
||||
|
||||
{{ Form::textGroup('sendmail_path', trans('settings.email.sendmail_path'), 'road', [':disabled' => '(form.protocol == "smtp")|| (form.protocol != "sendmail") ? true : false']) }}
|
||||
|
||||
{{ Form::textGroup('smtp_host', trans('settings.email.smtp.host'), 'paper-plane', [':disabled' => '(form.protocol != "smtp") ? true : false']) }}
|
||||
|
||||
{{ Form::textGroup('smtp_port', trans('settings.email.smtp.port'), 'paper-plane', [':disabled' => '(form.protocol != "smtp") ? true : false']) }}
|
||||
|
||||
{{ Form::textGroup('smtp_username', trans('settings.email.smtp.username'), 'paper-plane', [':disabled' => '(form.protocol != "smtp") ? true : false']) }}
|
||||
|
||||
{{ Form::textGroup('smtp_password', trans('settings.email.smtp.password'), 'paper-plane', ['type' => 'password',':disabled' => '(form.protocol != "smtp") ? true : false']) }}
|
||||
|
||||
{{ Form::selectGroup('smtp_encryption', trans('settings.email.smtp.encryption'), 'paper-plane', ['' => trans('settings.email.smtp.none'), 'ssl' => 'SSL', 'tls' => 'TLS'], !empty($setting['smtp_encryption']) ? $setting['smtp_encryption'] : null, [':disabled' => '(form.protocol != "smtp") ? true : false']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@permission('update-settings-settings')
|
||||
<div class="row ml-0 mr-0">
|
||||
<div class="card col-md-12">
|
||||
<div class="card-body mr--3">
|
||||
<div class="row float-right">
|
||||
{{ Form::saveButtons(URL::previous()) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endpermission
|
||||
|
||||
{!! Form::hidden('_prefix', 'email') !!}
|
||||
|
||||
{!! Form::close() !!}
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/settings/settings.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
63
resources/views/settings/invoice/edit.blade.php
Normal file
63
resources/views/settings/invoice/edit.blade.php
Normal file
@ -0,0 +1,63 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.invoices', 1))
|
||||
|
||||
@section('content')
|
||||
{!! Form::model($setting, [
|
||||
'id' => 'setting',
|
||||
'method' => 'PATCH',
|
||||
'route' => 'settings.update',
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true,
|
||||
]) !!}
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('number_prefix', trans('settings.invoice.prefix'), 'font', []) }}
|
||||
|
||||
{{ Form::textGroup('number_digit', trans('settings.invoice.digit'), 'text-width', []) }}
|
||||
|
||||
{{ Form::textGroup('number_next', trans('settings.invoice.next'), 'chevron-right', []) }}
|
||||
|
||||
{{ Form::invoice_text('item_name', trans('settings.invoice.item_name'), 'font', $item_names, null, [], 'item_name_input', null) }}
|
||||
|
||||
{{ Form::invoice_text('price_name', trans('settings.invoice.price_name'), 'font', $price_names, null, [], 'price_name_input', null) }}
|
||||
|
||||
{{ Form::invoice_text('quantity_name', trans('settings.invoice.quantity_name'), 'font', $quantity_names, null, [], 'quantity_name_input', null) }}
|
||||
|
||||
{{ Form::selectGroup('payment_terms', trans('settings.invoice.payment_terms'), 'calendar', $payment_terms, $setting['payment_terms'], []) }}
|
||||
|
||||
{{ Form::textGroup('title', trans('settings.invoice.title'), 'font', []) }}
|
||||
|
||||
{{ Form::textGroup('subheading', trans('settings.invoice.subheading'), 'font', []) }}
|
||||
|
||||
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2)) }}
|
||||
|
||||
{{ Form::textareaGroup('footer', trans('general.footer')) }}
|
||||
|
||||
{{ Form::fileGroup('logo', trans('settings.invoice.logo')) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@permission('update-settings-settings')
|
||||
<div class="card-footer">
|
||||
<div class="row float-right">
|
||||
{{ Form::saveButtons(URL::previous()) }}
|
||||
</div>
|
||||
</div>
|
||||
@endpermission
|
||||
</div>
|
||||
|
||||
{!! Form::hidden('_prefix', 'invoice') !!}
|
||||
|
||||
{!! Form::close() !!}
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/settings/settings.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
49
resources/views/settings/localisation/edit.blade.php
Normal file
49
resources/views/settings/localisation/edit.blade.php
Normal file
@ -0,0 +1,49 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.localisations', 1))
|
||||
|
||||
@section('content')
|
||||
{!! Form::model($setting, [
|
||||
'id' => 'setting',
|
||||
'method' => 'PATCH',
|
||||
'route' => 'settings.update',
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true,
|
||||
]) !!}
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::dateGroup('financial_start', trans('settings.localisation.financial_start'), 'calendar', ['id' => 'financial_start', 'class' => 'form-control datepicker', 'show-date-format' => 'j F', 'date-format' => 'd-m', 'autocomplete' => 'off'], $setting['financial_start']) }}
|
||||
|
||||
{{ Form::selectGroupGroup('timezone', trans('settings.localisation.timezone'), 'globe', $timezones, $setting['timezone'], []) }}
|
||||
|
||||
{{ Form::selectGroup('date_format', trans('settings.localisation.date.format'), 'calendar', $date_formats, $setting['date_format'], ['autocomplete' => 'off']) }}
|
||||
|
||||
{{ Form::selectGroup('date_separator', trans('settings.localisation.date.separator'), 'minus', $date_separators, $setting['date_separator'], []) }}
|
||||
|
||||
{{ Form::selectGroup('percent_position', trans('settings.localisation.percent.title'), 'percent', $percent_positions, $setting['percent_position'], []) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@permission('update-settings-settings')
|
||||
<div class="card-footer">
|
||||
<div class="row float-right">
|
||||
{{ Form::saveButtons(URL::previous()) }}
|
||||
</div>
|
||||
</div>
|
||||
@endpermission
|
||||
</div>
|
||||
|
||||
{!! Form::hidden('_prefix', 'localisation') !!}
|
||||
|
||||
{!! Form::close() !!}
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/settings/settings.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
@ -3,49 +3,54 @@
|
||||
@section('title', $module->getName())
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="card">
|
||||
{!! Form::model($setting, [
|
||||
'id' => 'module',
|
||||
'method' => 'PATCH',
|
||||
'url' => ['settings/apps/' . $module->getAlias()],
|
||||
'url' => ['settings/' . $module->getAlias()],
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button'
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
@foreach($module->get('settings') as $field)
|
||||
@php $type = $field['type']; @endphp
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
@foreach($module->get('settings') as $field)
|
||||
@php $type = $field['type']; @endphp
|
||||
|
||||
@if (($type == 'textGroup') || ($type == 'emailGroup') || ($type == 'passwordGroup'))
|
||||
{{ Form::$type($field['name'], trans($field['title']), $field['icon'], $field['attributes']) }}
|
||||
@elseif ($type == 'textareaGroup')
|
||||
{{ Form::$type($field['name'], trans($field['title'])) }}
|
||||
@elseif ($type == 'selectGroup')
|
||||
{{ Form::$type($field['name'], trans($field['title']), $field['icon'], $field['values'], $field['selected'], $field['attributes']) }}
|
||||
@elseif ($type == 'radioGroup')
|
||||
{{ Form::$type($field['name'], trans($field['title']), trans($field['enable']), trans($field['disable']), $field['attributes']) }}
|
||||
@elseif ($type == 'checkboxGroup')
|
||||
{{ Form::$type($field['name'], trans($field['title']), $field['items'], $field['value'], $field['id'], $field['attributes']) }}
|
||||
@elseif ($type == 'fileGroup')
|
||||
{{ Form::$type($field['name'], trans($field['title']), $field['attributes']) }}
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
@if (($type == 'textGroup') || ($type == 'emailGroup') || ($type == 'passwordGroup'))
|
||||
{{ Form::$type($field['name'], trans($field['title']), $field['icon'], $field['attributes']) }}
|
||||
@elseif ($type == 'textareaGroup')
|
||||
{{ Form::$type($field['name'], trans($field['title'])) }}
|
||||
@elseif ($type == 'selectGroup')
|
||||
{{ Form::$type($field['name'], trans($field['title']), $field['icon'], $field['values'], $field['selected'], $field['attributes']) }}
|
||||
@elseif ($type == 'radioGroup')
|
||||
{{ Form::$type($field['name'], trans($field['title']), null, trans($field['enable']), trans($field['disable']), $field['attributes']) }}
|
||||
@elseif ($type == 'checkboxGroup')
|
||||
{{ Form::$type($field['name'], trans($field['title']), $field['items'], $field['value'], $field['id'], $field['attributes']) }}
|
||||
@elseif ($type == 'fileGroup')
|
||||
{{ Form::$type($field['name'], trans($field['title']), $field['attributes']) }}
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons(URL::previous()) }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
{{ Form::hidden('module_alias', $module->getAlias(), ['id' => 'module_alias']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<div class="float-right">
|
||||
<div class="row">
|
||||
{{ Form::saveButtons(URL::previous()) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
</script>
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/settings/modules.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
|
54
resources/views/settings/schedule/edit.blade.php
Normal file
54
resources/views/settings/schedule/edit.blade.php
Normal file
@ -0,0 +1,54 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('settings.scheduling.name'))
|
||||
|
||||
@section('content')
|
||||
{!! Form::model($setting, [
|
||||
'id' => 'setting',
|
||||
'method' => 'PATCH',
|
||||
'route' => 'settings.update',
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true,
|
||||
]) !!}
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::radioGroup('send_invoice_reminder', trans('settings.scheduling.send_invoice')) }}
|
||||
|
||||
{{ Form::textGroup('invoice_days', trans('settings.scheduling.invoice_days'), 'calendar', []) }}
|
||||
|
||||
{{ Form::radioGroup('send_bill_reminder', trans('settings.scheduling.send_bill')) }}
|
||||
|
||||
{{ Form::textGroup('bill_days', trans('settings.scheduling.bill_days'), 'calendar', []) }}
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label for="cron_command" class="form-control-label">{{ trans('settings.scheduling.cron_command') }}</label>
|
||||
<input type="text" class="form-control form-control-muted" value="php /path-to-akaunting/artisan schedule:run >> /dev/null 2>&1">
|
||||
</div>
|
||||
|
||||
{{ Form::textGroup('time', trans('settings.scheduling.schedule_time'), 'clock', []) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@permission('update-settings-settings')
|
||||
<div class="card-footer">
|
||||
<div class="row float-right">
|
||||
{{ Form::saveButtons(URL::previous()) }}
|
||||
</div>
|
||||
</div>
|
||||
@endpermission
|
||||
</div>
|
||||
|
||||
{!! Form::hidden('_prefix', 'schedule') !!}
|
||||
|
||||
{!! Form::close() !!}
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/settings/settings.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
@ -1,338 +0,0 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.general'))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="row">
|
||||
{!! Form::model($setting, [
|
||||
'method' => 'PATCH',
|
||||
'url' => ['settings/settings'],
|
||||
'class' => 'setting-form form-loading-button',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
]) !!}
|
||||
|
||||
<div class="col-sm-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#company" data-toggle="tab" aria-expanded="true">{{ trans_choice('general.companies', 1) }}</a></li>
|
||||
<li class=""><a href="#localisation" data-toggle="tab" aria-expanded="false">{{ trans('settings.localisation.tab') }}</a></li>
|
||||
<li class=""><a href="#invoice" data-toggle="tab" aria-expanded="false">{{ trans('settings.invoice.tab') }}</a></li>
|
||||
<li class=""><a href="#default" data-toggle="tab" aria-expanded="false">{{ trans('settings.default.tab') }}</a></li>
|
||||
<li class=""><a href="#email" data-toggle="tab" aria-expanded="false">{{ trans('general.email') }}</a></li>
|
||||
<li class=""><a href="#scheduling" data-toggle="tab" aria-expanded="false">{{ trans('settings.scheduling.tab') }}</a></li>
|
||||
<li class=""><a href="#appearance" data-toggle="tab" aria-expanded="false">{{ trans('settings.appearance.tab') }}</a></li>
|
||||
<li class=""><a href="#system" data-toggle="tab" aria-expanded="false">{{ trans('settings.system.tab') }}</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane tab-margin active" id="company">
|
||||
{{ Form::textGroup('company_name', trans('settings.company.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('company_email', trans('settings.company.email'), 'envelope') }}
|
||||
|
||||
{{ Form::textGroup('company_tax_number', trans('general.tax_number'), 'percent', []) }}
|
||||
|
||||
{{ Form::textGroup('company_phone', trans('settings.company.phone'), 'phone', []) }}
|
||||
|
||||
{{ Form::textareaGroup('company_address', trans('settings.company.address')) }}
|
||||
|
||||
{{ Form::fileGroup('company_logo', trans('settings.company.logo')) }}
|
||||
|
||||
{!! Form::hidden('wizard', null, ['id' => 'wizard']) !!}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane tab-margin" id="localisation">
|
||||
{{ Form::textGroup('financial_start', trans('settings.localisation.financial_start'), 'calendar-check-o', ['id' => 'financial_start', 'class' => 'form-control', 'data-inputmask' => '\'alias\': \'dd-mm\'', 'data-mask' => '', 'autocomplete' => 'off'], $setting['financial_start']) }}
|
||||
|
||||
{{ Form::selectGroup('timezone', trans('settings.localisation.timezone'), 'globe', $timezones, null, []) }}
|
||||
|
||||
{{ Form::selectGroup('date_format', trans('settings.localisation.date.format'), 'calendar', $date_formats, null, ['autocomplete' => 'off']) }}
|
||||
|
||||
{{ Form::selectGroup('date_separator', trans('settings.localisation.date.separator'), 'minus', $date_separators, null, []) }}
|
||||
|
||||
{{ Form::selectGroup('percent_position', trans('settings.localisation.percent.title'), 'percent', $percent_positions, null, []) }}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane tab-margin" id="invoice">
|
||||
{{ Form::textGroup('invoice_number_prefix', trans('settings.invoice.prefix'), 'font', []) }}
|
||||
|
||||
{{ Form::textGroup('invoice_number_digit', trans('settings.invoice.digit'), 'text-width', []) }}
|
||||
|
||||
{{ Form::textGroup('invoice_number_next', trans('settings.invoice.next'), 'chevron-right', []) }}
|
||||
|
||||
{{ Form::invoice_text('invoice_item', trans('settings.invoice.item_name'), 'font', $item_names, null, [], 'invoice_item_input', null) }}
|
||||
|
||||
{{ Form::invoice_text('invoice_price', trans('settings.invoice.price_name'), 'font', $price_names, null, [], 'invoice_price_input', null) }}
|
||||
|
||||
{{ Form::invoice_text('invoice_quantity', trans('settings.invoice.quantity_name'), 'font', $quantity_names, null, [], 'invoice_quantity_input', null) }}
|
||||
|
||||
{{ Form::fileGroup('invoice_logo', trans('settings.invoice.logo')) }}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane tab-margin" id="default">
|
||||
{{ Form::selectGroup('default_account', trans('settings.default.account'), 'university', $accounts, null, []) }}
|
||||
|
||||
{{ Form::selectGroup('default_currency', trans('settings.default.currency'), 'exchange', $currencies, null, []) }}
|
||||
|
||||
{{ Form::selectGroup('default_tax', trans('settings.default.tax'), 'percent', $taxes, null, []) }}
|
||||
|
||||
{{ Form::selectGroup('default_payment_method', trans('settings.default.payment'), 'credit-card', $payment_methods, setting('general.default_payment_method'), []) }}
|
||||
|
||||
{{ Form::selectGroup('default_locale', trans('settings.default.language'), 'flag', language()->allowed(), null, []) }}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane tab-margin" id="email">
|
||||
{{ Form::selectGroup('email_protocol', trans('settings.email.protocol'), 'share', $email_protocols, null, []) }}
|
||||
|
||||
{{ Form::textGroup('email_sendmail_path', trans('settings.email.sendmail_path'), 'road', []) }}
|
||||
|
||||
{{ Form::textGroup('email_smtp_host', trans('settings.email.smtp.host'), 'paper-plane-o', []) }}
|
||||
|
||||
{{ Form::textGroup('email_smtp_port', trans('settings.email.smtp.port'), 'paper-plane-o', []) }}
|
||||
|
||||
{{ Form::textGroup('email_smtp_username', trans('settings.email.smtp.username'), 'paper-plane-o', []) }}
|
||||
|
||||
{{ Form::textGroup('email_smtp_password', trans('settings.email.smtp.password'), 'paper-plane-o', ['type' => 'password']) }}
|
||||
|
||||
{{ Form::selectGroup('email_smtp_encryption', trans('settings.email.smtp.encryption'), 'paper-plane-o', ['' => trans('settings.email.smtp.none'), 'ssl' => 'SSL', 'tls' => 'TLS'], null, []) }}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane tab-margin" id="scheduling">
|
||||
{{ Form::radioGroup('send_invoice_reminder', trans('settings.scheduling.send_invoice')) }}
|
||||
|
||||
{{ Form::textGroup('schedule_invoice_days', trans('settings.scheduling.invoice_days'), 'calendar-check-o', []) }}
|
||||
|
||||
{{ Form::radioGroup('send_bill_reminder', trans('settings.scheduling.send_bill')) }}
|
||||
|
||||
{{ Form::textGroup('schedule_bill_days', trans('settings.scheduling.bill_days'), 'calendar-check-o', []) }}
|
||||
|
||||
{{ Form::radioGroup('send_item_reminder', trans('settings.scheduling.send_item_reminder')) }}
|
||||
|
||||
{{ Form::textGroup('schedule_item_stocks', trans('settings.scheduling.item_stocks'), 'cubes', []) }}
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label for="cron_command" class="control-label">{{ trans('settings.scheduling.cron_command') }}</label>
|
||||
<pre>php /path-to-akaunting/artisan schedule:run >> /dev/null 2>&1</pre>
|
||||
</div>
|
||||
|
||||
{{ Form::textGroup('schedule_time', trans('settings.scheduling.schedule_time'), 'clock-o', []) }}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane tab-margin" id="appearance">
|
||||
{{ Form::selectGroup('admin_theme', trans('settings.appearance.theme'), 'paint-brush', ['skin-green-light' => trans('settings.appearance.light'), 'skin-black' => trans('settings.appearance.dark')], null, []) }}
|
||||
|
||||
{{ Form::selectGroup('list_limit', trans('settings.appearance.list_limit'), 'columns', ['10' => '10', '25' => '25', '50' => '50', '100' => '100'], null, []) }}
|
||||
|
||||
{{ Form::radioGroup('use_gravatar', trans('settings.appearance.use_gravatar')) }}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane tab-margin" id="system">
|
||||
{{ Form::selectGroup('session_handler', trans('settings.system.session.handler'), 'database', ['file' => trans('settings.system.session.file'), 'database' => trans('settings.system.session.database')], null, []) }}
|
||||
|
||||
{{ Form::textGroup('session_lifetime', trans('settings.system.session.lifetime'), 'clock-o', []) }}
|
||||
|
||||
{{ Form::textGroup('file_size', trans('settings.system.file_size'), 'upload', []) }}
|
||||
|
||||
{{ Form::textGroup('file_types', trans('settings.system.file_types'), 'file-o', []) }}
|
||||
</div>
|
||||
|
||||
@permission('update-settings-settings')
|
||||
<div class="setting-buttons">
|
||||
<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::previous() }}" class="btn btn-default"><span class="fa fa-times-circle"></span> {{ trans('general.cancel') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endpermission
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
@if (language()->getShortCode() != 'en')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/locales/bootstrap-datepicker.' . language()->getShortCode() . '.js') }}"></script>
|
||||
@endif
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
@endpush
|
||||
|
||||
@push('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endpush
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#email_smtp_password').attr('type', 'password');
|
||||
|
||||
$("#date_format").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.localisation.date.format')]) }}"
|
||||
});
|
||||
|
||||
$("#date_separator").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.localisation.date.separator')]) }}"
|
||||
});
|
||||
|
||||
$("#timezone").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.localisation.timezone')]) }}"
|
||||
});
|
||||
|
||||
$("#percent_position").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.localisation.percent.title')]) }}"
|
||||
});
|
||||
|
||||
$("#default_account").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.default.account')]) }}"
|
||||
});
|
||||
|
||||
$("#default_currency").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.default.currency')]) }}"
|
||||
});
|
||||
|
||||
$("#default_tax").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.default.tax')]) }}"
|
||||
});
|
||||
|
||||
$("#default_payment_method").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.default.payment')]) }}"
|
||||
});
|
||||
|
||||
$("#default_locale").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.default.language')]) }}"
|
||||
});
|
||||
|
||||
$("#admin_theme").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.appearance.theme')]) }}"
|
||||
});
|
||||
|
||||
$("#email_protocol").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.email.protocol')]) }}"
|
||||
});
|
||||
|
||||
$("#list_limit").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.appearance.list_limit')]) }}"
|
||||
});
|
||||
|
||||
$("#session_handler").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans('settings.system.session.handler')]) }}"
|
||||
});
|
||||
|
||||
$('#financial_start').datepicker({
|
||||
format: 'dd-mm',
|
||||
todayBtn: 'linked',
|
||||
weekStart: 1,
|
||||
autoclose: true,
|
||||
language: '{{ language()->getShortCode() }}'
|
||||
});
|
||||
|
||||
$('#company_logo').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
@if($setting['company_logo'])
|
||||
placeholder : '{{ $setting['company_logo']->basename }}',
|
||||
@else
|
||||
placeholder : '{{ trans('general.form.no_file_selected') }}',
|
||||
@endif
|
||||
});
|
||||
|
||||
@if($setting['company_logo'])
|
||||
$.ajax({
|
||||
url: '{{ url('uploads/' . $setting['company_logo']->id . '/show') }}',
|
||||
type: 'GET',
|
||||
data: {column_name: 'company_logo', page: 'setting', key: 'general.company_logo'},
|
||||
dataType: 'JSON',
|
||||
success: function(json) {
|
||||
if (json['success']) {
|
||||
$('#company .fancy-file').after(json['html']);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@permission('delete-common-uploads')
|
||||
$(document).on('click', '#remove-company_logo', function (e) {
|
||||
confirmDelete("#company_logo-{!! $setting['company_logo']->id !!}", "{!! trans('general.attachment') !!}", "{!! trans('general.delete_confirm', ['name' => '<strong>' . $setting['company_logo']->basename . '</strong>', 'type' => strtolower(trans('general.attachment'))]) !!}", "{!! trans('general.cancel') !!}", "{!! trans('general.delete') !!}");
|
||||
});
|
||||
@endpermission
|
||||
@endif
|
||||
|
||||
var invoice_file = false;
|
||||
|
||||
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||
var target = $(e.target).attr("href");
|
||||
|
||||
if (target == '#invoice' && !invoice_file) {
|
||||
$(target + ' #invoice_logo').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
@if($setting['invoice_logo'])
|
||||
placeholder : '{{ $setting['invoice_logo']->basename }}',
|
||||
@else
|
||||
placeholder : '{{ trans('general.form.no_file_selected') }}',
|
||||
@endif
|
||||
});
|
||||
|
||||
@if($setting['invoice_logo'])
|
||||
$.ajax({
|
||||
url: '{{ url('uploads/' . $setting['invoice_logo']->id . '/show') }}',
|
||||
type: 'GET',
|
||||
data: {column_name: 'invoice_logo', page: 'setting', key: 'general.invoice_logo'},
|
||||
dataType: 'JSON',
|
||||
success: function(json) {
|
||||
if (json['success']) {
|
||||
$(target + ' .fancy-file').after(json['html']);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@permission('delete-common-uploads')
|
||||
$(document).on('click', '#remove-invoice_logo', function (e) {
|
||||
confirmDelete("#invoice_logo-{!! $setting['invoice_logo']->id !!}", "{!! trans('general.attachment') !!}", "{!! trans('general.delete_confirm', ['name' => '<strong>' . $setting['invoice_logo']->basename . '</strong>', 'type' => strtolower(trans('general.attachment'))]) !!}", "{!! trans('general.cancel') !!}", "{!! trans('general.delete') !!}");
|
||||
});
|
||||
@endpermission
|
||||
@endif
|
||||
|
||||
invoice_file = true;
|
||||
}
|
||||
});
|
||||
|
||||
$("select[name='email_protocol']").on('change', function() {
|
||||
var selection = $(this).val();
|
||||
|
||||
if (selection == 'mail' || selection == 'log') {
|
||||
$("input[name='email_sendmail_path']").prop('disabled', true);
|
||||
$("input[name='email_smtp_host']").prop('disabled', true);
|
||||
$("input[name='email_smtp_username']").prop('disabled', true);
|
||||
$("input[name='email_smtp_password']").prop('disabled', true);
|
||||
$("input[name='email_smtp_port']").prop('disabled', true);
|
||||
$("select[name='email_smtp_encryption']").prop('disabled', true);
|
||||
} else if(selection == 'sendmail') {
|
||||
$("input[name='email_sendmail_path']").prop('disabled', false);
|
||||
$("input[name='email_smtp_host']").prop('disabled', true);
|
||||
$("input[name='email_smtp_username']").prop('disabled', true);
|
||||
$("input[name='email_smtp_password']").prop('disabled', true);
|
||||
$("input[name='email_smtp_port']").prop('disabled', true);
|
||||
$("select[name='email_smtp_encryption']").prop('disabled', true);
|
||||
} else if (selection == 'smtp') {
|
||||
$("input[name='email_sendmail_path']").prop('disabled', true);
|
||||
$("input[name='email_smtp_host']").prop('disabled', false);
|
||||
$("input[name='email_smtp_username']").prop('disabled', false);
|
||||
$("input[name='email_smtp_password']").prop('disabled', false);
|
||||
$("input[name='email_smtp_port']").prop('disabled', false);
|
||||
$("select[name='email_smtp_encryption']").prop('disabled', false);
|
||||
}
|
||||
});
|
||||
|
||||
$("select[name='email_protocol']").trigger('change');
|
||||
});
|
||||
</script>
|
||||
@endpush
|
209
resources/views/settings/settings/index.blade.php
Normal file
209
resources/views/settings/settings/index.blade.php
Normal file
@ -0,0 +1,209 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.settings',2))
|
||||
|
||||
@section('content')
|
||||
<div class="card shadow">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
@permission('read-settings-company')
|
||||
<div class="col-md-4">
|
||||
<a href="{{ route('settings.company.edit') }}">
|
||||
<button type="button" class="btn-icon-clipboard p-2">
|
||||
<div class="row mx-0">
|
||||
<div class="col-auto">
|
||||
<div class="badge badge-secondary settings-icons">
|
||||
<i class="fa fa-building" ></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col ml--2">
|
||||
<h4 class="mb-0">{{ trans_choice('general.companies', 1) }}</h4>
|
||||
<p class="text-sm text-muted mb-0">{{ trans('settings.company.description') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
@endpermission
|
||||
|
||||
@permission('read-settings-localisation')
|
||||
<div class="col-md-4">
|
||||
<a href="{{ route('settings.localisation.edit') }}">
|
||||
<button type="button" class="btn-icon-clipboard p-2">
|
||||
<div class="row mx-0">
|
||||
<div class="col-auto">
|
||||
<div class="badge badge-secondary settings-icons">
|
||||
<i class="fas fa-map-marker-alt"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col ml--2">
|
||||
<h4 class="mb-0">{{ trans_choice('general.localisations', 1) }}</h4>
|
||||
<p class="text-sm text-muted mb-0">{{ trans('settings.localisation.description') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
@endpermission
|
||||
|
||||
@permission('read-settings-invoice')
|
||||
<div class="col-md-4">
|
||||
<a href="{{ route('settings.invoice.edit') }}">
|
||||
<button type="button" class="btn-icon-clipboard p-2">
|
||||
<div class="row mx-0">
|
||||
<div class="col-auto">
|
||||
<div class="badge badge-secondary settings-icons">
|
||||
<i class="fas fa-file-alt"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col ml--2">
|
||||
<h4 class="mb-0">{{ trans_choice('general.invoices', 1) }}</h4>
|
||||
<p class="text-sm text-muted mb-0">{{ trans('settings.invoice.description') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
@endpermission
|
||||
|
||||
@permission('read-settings-defaults')
|
||||
<div class="col-md-4">
|
||||
<a href="{{ route('settings.default.edit') }}">
|
||||
<button type="button" class="btn-icon-clipboard p-2">
|
||||
<div class="row mx-0">
|
||||
<div class="col-auto">
|
||||
<div class="badge badge-secondary settings-icons">
|
||||
<i class="fa fa-sliders-h"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col ml--2">
|
||||
<h4 class="mb-0">{{ trans_choice('general.defaults', 1) }}</h4>
|
||||
<p class="text-sm text-muted mb-0">{{ trans('settings.default.description') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
@endpermission
|
||||
|
||||
@permission('read-settings-email')
|
||||
<div class="col-md-4">
|
||||
<a href="{{ route('settings.email.edit') }}">
|
||||
<button type="button" class="btn-icon-clipboard p-2">
|
||||
<div class="row mx-0">
|
||||
<div class="col-auto">
|
||||
<div class="badge badge-secondary settings-icons">
|
||||
<i class="fa fa-envelope"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col ml--2">
|
||||
<h4 class="mb-0">{{ trans('general.email') }}</h4>
|
||||
<p class="text-sm text-muted mb-0">{{ trans('settings.email.description') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
@endpermission
|
||||
|
||||
@permission('read-settings-schedule')
|
||||
<div class="col-md-4">
|
||||
<a href="{{ route('settings.schedule.edit') }}">
|
||||
<button type="button" class="btn-icon-clipboard p-2">
|
||||
<div class="row mx-0">
|
||||
<div class="col-auto">
|
||||
<div class="badge badge-secondary settings-icons">
|
||||
<i class="fas fa-history"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col ml--2">
|
||||
<h4 class="mb-0">{{ trans('settings.scheduling.name') }}</h4>
|
||||
<p class="text-sm text-muted mb-0">{{ trans('settings.scheduling.description') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
@endpermission
|
||||
|
||||
<div class="col-md-4">
|
||||
<a href="{{ route('categories.index') }}">
|
||||
<button type="button" class="btn-icon-clipboard p-2">
|
||||
<div class="row mx-0">
|
||||
<div class="col-auto">
|
||||
<div class="badge badge-secondary settings-icons">
|
||||
<i class="fa fa-folder"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col ml--2">
|
||||
<h4 class="mb-0">{{ trans_choice('general.categories', 2) }}</h4>
|
||||
<p class="text-sm text-muted mb-0">{{ trans('settings.categories.description') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<a href="{{ route('currencies.index') }}">
|
||||
<button type="button" class="btn-icon-clipboard p-2">
|
||||
<div class="row mx-0">
|
||||
<div class="col-auto">
|
||||
<div class="badge badge-secondary settings-icons">
|
||||
<i class="fa fa-dollar-sign"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col ml--2">
|
||||
<h4 class="mb-0">{{ trans_choice('general.currencies', 2) }}</h4>
|
||||
<p class="text-sm text-muted mb-0">{{ trans('settings.currencies.description') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<a href="{{ route('taxes.index') }}">
|
||||
<button type="button" class="btn-icon-clipboard p-2">
|
||||
<div class="row mx-0">
|
||||
<div class="col-auto">
|
||||
<div class="badge badge-secondary settings-icons">
|
||||
<i class="fas fa-percent"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col ml--2">
|
||||
<h4 class="mb-0">{{ trans_choice('general.taxes', 2) }}</h4>
|
||||
<p class="text-sm text-muted mb-0">{{ trans('settings.taxes.description') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@foreach($modules as $module)
|
||||
<div class="col-md-4">
|
||||
<a href="{{ url($module['url']) }}">
|
||||
<button type="button" class="btn-icon-clipboard p-2">
|
||||
<div class="row mx-0">
|
||||
<div class="col-auto">
|
||||
<div class="badge badge-secondary settings-icons">
|
||||
<i class="{{ $module['icon'] }}"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col ml--2">
|
||||
<h4 class="mb-0">{{ $module['name'] }}</h4>
|
||||
<p class="text-sm text-muted mb-0">{{ $module['description'] }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/settings/settings.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
@ -3,43 +3,39 @@
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.tax_rates', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'settings/taxes', 'role' => 'form', 'class' => 'form-loading-button']) !!}
|
||||
<div class="card">
|
||||
{!! Form::open([
|
||||
'route' => 'taxes.store',
|
||||
'id' => 'tax',
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'font') }}
|
||||
|
||||
{{ Form::textGroup('rate', trans('taxes.rate'), 'percent') }}
|
||||
{{ Form::textGroup('rate', trans('taxes.rate'), 'percent', ['@input' => 'taxRateReplace']) }}
|
||||
|
||||
{{ Form::selectGroup('type', trans_choice('general.types', 1), 'bars', $types, 'normal') }}
|
||||
{{ Form::selectGroup('type', trans_choice('general.types', 1), 'bars', $types, 'normal') }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('settings/taxes') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
<div class="row float-right">
|
||||
{{ Form::saveButtons('settings/taxes') }}
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#enabled_1').trigger('click');
|
||||
|
||||
$('#name').focus();
|
||||
|
||||
$("#type").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.types', 1)]) }}"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/settings/taxes.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
|
@ -3,48 +3,42 @@
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.tax_rates', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="card">
|
||||
{!! Form::model($tax, [
|
||||
'id' => 'tax',
|
||||
'method' => 'PATCH',
|
||||
'url' => ['settings/taxes', $tax->id],
|
||||
'route' => ['taxes.update', $tax->id],
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button'
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'font') }}
|
||||
|
||||
{{ Form::textGroup('rate', trans('taxes.rate'), 'percent') }}
|
||||
{{ Form::textGroup('rate', trans('taxes.rate'), 'percent', ['@input' => 'taxRateReplace']) }}
|
||||
|
||||
{{ Form::selectGroup('type', trans_choice('general.types', 1), 'bars', $types, null) }}
|
||||
{{ Form::selectGroup('type', trans_choice('general.types', 1), 'bars', $types, $tax->type) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-settings-taxes')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('settings/taxes') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@permission('update-settings-taxes')
|
||||
<div class="card-footer">
|
||||
<div class="row float-right">
|
||||
{{ Form::saveButtons('settings/taxes') }}
|
||||
</div>
|
||||
</div>
|
||||
@endpermission
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#name').focus();
|
||||
|
||||
$("#type").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.types', 1)]) }}"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/settings/taxes.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
|
@ -3,85 +3,90 @@
|
||||
@section('title', trans_choice('general.tax_rates', 2))
|
||||
|
||||
@permission('create-settings-taxes')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('settings/taxes/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@section('new_button')
|
||||
<span><a href="{{ route('taxes.create') }}" class="btn btn-success btn-sm btn-alone"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
{!! Form::open(['url' => 'settings/taxes', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter hidden-xs">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter hidden-xs">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="card">
|
||||
<div class="card-header border-bottom-0" v-bind:class="[bulk_action.show ? 'bg-gradient-primary' : '']">
|
||||
{!! Form::open([
|
||||
'url' => 'settings/taxes',
|
||||
'role' => 'form',
|
||||
'method' => 'GET',
|
||||
'class' => 'mb-0'
|
||||
]) !!}
|
||||
<div class="row" v-if="!bulk_action.show">
|
||||
<div class="col-12 card-header-search">
|
||||
<span class="table-text hidden-lg">{{ trans('general.search') }}:</span>
|
||||
<akaunting-search></akaunting-search>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-striped table-hover" id="tbl-taxes">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-5">@sortablelink('name', trans('general.name'))</th>
|
||||
<th class="col-md-3">@sortablelink('rate', trans('taxes.rate_percent'))</th>
|
||||
<th class="col-md-2">@sortablelink('type', trans_choice('general.types', 1))</th>
|
||||
<th class="col-md-1 hidden-xs">@sortablelink('enabled', trans_choice('general.statuses', 1))</th>
|
||||
<th class="col-md-1 text-center">{{ trans('general.actions') }}</th>
|
||||
{{ Form::bulkActionRowGroup('general.taxes', $bulk_actions, 'settings/taxes') }}
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-flush table-hover">
|
||||
<thead class="thead-light">
|
||||
<tr class="row table-head-line">
|
||||
<th class="col-sm-2 col-md-2 col-lg-1 hidden-sm">{{ Form::bulkActionAllGroup() }}</th>
|
||||
<th class="col-xs-4 col-sm-3 col-md-2 col-lg-4">@sortablelink('name', trans('general.name'), ['filter' => 'active, visible'], ['class' => 'col-aka', 'rel' => 'nofollow'])</th>
|
||||
<th class="col-md-2 col-lg-2 hidden-md">@sortablelink('rate', trans('taxes.rate_percent'))</th>
|
||||
<th class="col-sm-2 col-md-2 col-lg-2 hidden-sm">@sortablelink('type', trans_choice('general.types', 1))</th>
|
||||
<th class="col-xs-4 col-sm-3 col-md-2 col-lg-2">@sortablelink('enabled', trans('general.enabled'))</th>
|
||||
<th class="col-xs-4 col-sm-2 col-md-2 col-lg-1 text-center">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($taxes as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('settings/taxes/' . $item->id . '/edit') }}">{{ $item->name }}</a></td>
|
||||
<td>{{ $item->rate }}</td>
|
||||
<td>{{ $types[$item->type] }}</td>
|
||||
<td class="hidden-xs">
|
||||
@if ($item->enabled)
|
||||
<span class="label label-success">{{ trans('general.enabled') }}</span>
|
||||
@else
|
||||
<span class="label label-danger">{{ trans('general.disabled') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" data-toggle-position="left" aria-expanded="false">
|
||||
<i class="fa fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="{{ url('settings/taxes/' . $item->id . '/edit') }}">{{ trans('general.edit') }}</a></li>
|
||||
@foreach($taxes as $item)
|
||||
<tr class="row align-items-center border-top-1">
|
||||
<td class="col-sm-2 col-md-2 col-lg-1 hidden-sm">{{ Form::bulkActionGroup($item->id, $item->name) }}</td>
|
||||
<td class="col-xs-4 col-sm-3 col-md-2 col-lg-4"><a class="col-aka text-success" href="{{ route('taxes.edit', $item->id) }}">{{ $item->name }}</a></td>
|
||||
<td class="col-md-2 col-lg-2 hidden-md">{{ $item->rate }}</td>
|
||||
<td class="col-sm-2 col-md-2 col-lg-2 hidden-sm">{{ $types[$item->type] }}</td>
|
||||
<td class="col-xs-4 col-sm-3 col-md-2 col-lg-2">
|
||||
@if (user()->can('update-settings-taxes'))
|
||||
{{ Form::enabledGroup($item->id, $item->name, $item->enabled) }}
|
||||
@else
|
||||
@if ($item->enabled)
|
||||
<li><a href="{{ route('taxes.disable', $item->id) }}">{{ trans('general.disable') }}</a></li>
|
||||
<badge rounded type="success">{{ trans('general.enabled') }}</badge>
|
||||
@else
|
||||
<li><a href="{{ route('taxes.enable', $item->id) }}">{{ trans('general.enable') }}</a></li>
|
||||
<badge rounded type="danger">{{ trans('general.disabled') }}</badge>
|
||||
@endif
|
||||
@permission('delete-settings-taxes')
|
||||
<li class="divider"></li>
|
||||
<li>{!! Form::deleteLink($item, 'settings/taxes', 'tax_rates') !!}</li>
|
||||
@endpermission
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</td>
|
||||
<td class="col-xs-4 col-sm-2 col-md-2 col-lg-1 text-center">
|
||||
<div class="dropdown">
|
||||
<a class="btn btn-neutral btn-sm text-light items-align-center py-2" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-ellipsis-h text-muted"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
|
||||
<a class="dropdown-item" href="{{ route('taxes.edit', $item->id) }}">{{ trans('general.edit') }}</a>
|
||||
@permission('delete-settings-taxes')
|
||||
<div class="dropdown-divider"></div>
|
||||
{!! Form::deleteLink($item, 'settings/taxes', 'tax_rates') !!}
|
||||
@endpermission
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="card-footer table-action">
|
||||
<div class="row">
|
||||
@include('partials.admin.pagination', ['items' => $taxes, 'type' => 'taxes'])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $taxes, 'type' => 'taxes'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/settings/taxes.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
|
Reference in New Issue
Block a user