mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-04 05:06:37 +00:00
Can configure file upload in file imports.
This commit is contained in:
115
resources/views/import/file/configure-upload.twig
Normal file
115
resources/views/import/file/configure-upload.twig
Normal file
@@ -0,0 +1,115 @@
|
||||
{% extends "./layout/default" %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, importJob) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('import.job_config_uc_title') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p>
|
||||
{{ trans('import.job_config_uc_text') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" action="{{ route('import.job.configuration.post', importJob.key) }}" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('import.job_config_input') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<h4>{{ 'mandatoryFields'|_ }}</h4>
|
||||
{{ ExpandedForm.checkbox('has_headers',1,importJob.configuration['has-headers'],{helpText: trans('import.job_config_uc_header_help')}) }}
|
||||
{{ ExpandedForm.text('date_format',importJob.configuration['date-format'],{helpText: trans('import.job_config_uc_date_help', {dateExample: phpdate('Ymd')}) }) }}
|
||||
{{ ExpandedForm.select('csv_delimiter', data.delimiters, importJob.configuration['delimiter'], {helpText: trans('import.job_config_uc_delimiter_help') } ) }}
|
||||
{{ ExpandedForm.assetAccountList('csv_import_account', importJob.configuration['import-account'], {helpText: trans('import.job_config_uc_account_help')}) }}
|
||||
|
||||
<h4>{{ 'optionalFields'|_ }}</h4>
|
||||
<div class="form-group">
|
||||
<label for="apply_rules_label" class="col-sm-4 control-label">
|
||||
{{ trans('import.job_config_uc_apply_rules_title') }}
|
||||
</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<div class="checkbox"><label>
|
||||
{{ Form.checkbox('apply_rules', '1',
|
||||
importJob.configuration['apply-rules'] == true, {'id': 'apply_rules_label'}) }}
|
||||
{{ trans('import.job_config_uc_apply_rules_text') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputSpecifics" class="col-sm-4 control-label">{{ trans('import.job_config_uc_specifics_title') }}</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<p>
|
||||
{{ trans('import.job_config_uc_specifics_txt') }}
|
||||
</p>
|
||||
<select id="inputSpecifics" name="specifics[]" multiple class="form-control">
|
||||
{% for type, specific in data.specifics %}
|
||||
<option value="{{ type }}" {% if importJob.configuration.specifics[type] == 1 %}selected{% endif %}>
|
||||
{{ trans(specific.name) }}
|
||||
<small><br>{{ trans(specific.description) }}</small>
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="box">
|
||||
<div class="box-body">
|
||||
<button type="submit" class="pull-right btn btn-success">
|
||||
{{ trans('import.job_config_uc_submit') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p>
|
||||
<br/> <br/> <br/> <br/> <br/> <br/> <br/>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
||||
{% block styles %}
|
||||
<link href="css/bootstrap-multiselect.css?v={{ FF_VERSION }}" rel="stylesheet" type="text/css"/>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script type="text/javascript">
|
||||
var selectAllText = "{{ trans('firefly.multi_select_select_all')|escape('js') }}";
|
||||
var nonSelectedText = "{{ trans('firefly.multi_select_no_selection')|escape('js') }}";
|
||||
var nSelectedText = "{{ trans('firefly.multi_select_n_selected')|escape('js') }}";
|
||||
var allSelectedText = "{{ trans('firefly.multi_select_all_selected')|escape('js') }}";
|
||||
var filterPlaceholder = "{{ trans('firefly.multi_select_filter_placeholder')|escape('js') }}";
|
||||
</script>
|
||||
<script type="text/javascript" src="js/lib/bootstrap-multiselect.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/ff/import/file/configure-upload.js?v={{ FF_VERSION }}"></script>
|
||||
{% endblock %}
|
||||
@@ -8,11 +8,11 @@
|
||||
<div class="col-lg-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('import.file_upload_title') }}</h3>
|
||||
<h3 class="box-title">{{ trans('import.job_config_file_upload_title') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p>
|
||||
{{ trans('import.file_upload_text') }}
|
||||
{{ trans('import.job_config_file_upload_text') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -28,12 +28,12 @@
|
||||
<div class="col-lg-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('import.file_upload_fields') }}</h3>
|
||||
<h3 class="box-title">{{ trans('import.job_config_input') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.file('import_file', {helpText: trans('import.file_upload_help')}) }}
|
||||
{{ ExpandedForm.file('configuration_file', {helpText: trans('import.file_upload_config_help')|raw}) }}
|
||||
{{ ExpandedForm.select('import_file_type', data.file_types, data.default_type, {'helpText' : trans('import.file_upload_type_help')}) }}
|
||||
{{ ExpandedForm.file('import_file', {helpText: trans('import.job_config_file_upload_help')}) }}
|
||||
{{ ExpandedForm.file('configuration_file', {helpText: trans('import.job_config_file_upload_config_help')|raw}) }}
|
||||
{{ ExpandedForm.select('import_file_type', data.file_types, data.default_type, {'helpText' : trans('import.job_config_file_upload_type_help')}) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -43,7 +43,7 @@
|
||||
<div class="box">
|
||||
<div class="box-body">
|
||||
<button type="submit" class="btn btn-success pull-right">
|
||||
{{ trans('import.file_upload_submit') }} <i class="fa fa-arrow-right"></i>
|
||||
{{ trans('import.job_config_file_upload_submit') }} <i class="fa fa-arrow-right"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
{% extends "./layout/default" %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, job) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('import.csv_initial_title') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p>
|
||||
{{ trans('import.csv_initial_text') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" action="{{ route('import.configure.post', job.key) }}" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('import.csv_initial_box_title') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<h4>{{ 'mandatoryFields'|_ }}</h4>
|
||||
{{ ExpandedForm.checkbox('has_headers',1,job.configuration['has-headers'],{helpText: trans('import.csv_initial_header_help')}) }}
|
||||
{{ ExpandedForm.text('date_format',job.configuration['date-format'],{helpText: trans('import.csv_initial_date_help', {dateExample: phpdate('Ymd')}) }) }}
|
||||
{{ ExpandedForm.select('csv_delimiter', data.delimiters, job.configuration['delimiter'], {helpText: trans('import.csv_initial_delimiter_help') } ) }}
|
||||
{{ ExpandedForm.select('csv_import_account', data.accounts, job.configuration['import-account'], {helpText: trans('import.csv_initial_import_account_help')} ) }}
|
||||
|
||||
<h4>{{ 'optionalFields'|_ }}</h4>
|
||||
<div class="form-group">
|
||||
<label for="apply_rules_label" class="col-sm-4 control-label">
|
||||
{{ trans('import.file_apply_rules_title') }}
|
||||
</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<div class="checkbox"><label>
|
||||
{{ Form.checkbox('apply_rules', '1',
|
||||
job.configuration['apply-rules'] == true, {'id': 'apply_rules_label'}) }}
|
||||
{{ trans('import.file_apply_rules_description') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% for type, specific in data.specifics %}
|
||||
<div class="form-group">
|
||||
<label for="{{ type }}_label" class="col-sm-4 control-label">
|
||||
{{ specific.name }}
|
||||
</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<div class="checkbox"><label>
|
||||
{{ Form.checkbox('specifics['~type~']', '1',
|
||||
job.configuration.specifics[type] == '1', {'id': type ~ '_label'}) }}
|
||||
{{ specific.description }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="box">
|
||||
<div class="box-body">
|
||||
<button type="submit" class="pull-right btn btn-success">
|
||||
{{ trans('import.csv_initial_submit') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user