Files
firefly-iii/resources/views/import/csv/configure.twig

98 lines
3.8 KiB
Twig
Raw Normal View History

2016-06-10 21:00:00 +02:00
{% extends "./layout/default.twig" %}
{% block breadcrumbs %}
{{ Breadcrumbs.renderIfExists(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">{{ 'import_csv_configure_title'|_ }}</h3>
</div>
<div class="box-body">
<p>
2016-06-11 06:31:40 +02:00
{{ 'import_csv_configure_intro'|_ }}
2016-06-10 21:00:00 +02:00
</p>
</div>
</div>
</div>
</div>
2016-06-24 14:24:34 +02:00
<form class="form-horizontal" action="{{ route('import.process_configuration', job.key) }}" method="post" enctype="multipart/form-data">
2016-06-10 21:00:00 +02:00
<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">{{ 'import_csv_configure_form'|_ }}</h3>
</div>
<div class="box-body">
{{ ExpandedForm.checkbox('has_headers',1,null,{helpText: 'csv_header_help'|_}) }}
{{ ExpandedForm.text('date_format','Ymd',{helpText: trans('firefly.csv_date_help', {dateExample: phpdate('Ymd')}) }) }}
{{ ExpandedForm.select('csv_delimiter', data.delimiters, 0, {helpText: 'csv_delimiter_help'|_} ) }}
{{ ExpandedForm.file('csv_config',{helpText: 'csv_csv_config_file_help'|_}) }}
{{ ExpandedForm.select('csv_import_account', data.accounts, 0, {helpText: 'csv_import_account_help'|_} ) }}
2016-06-24 14:24:34 +02:00
{% for type, specific in data.specifics %}
<div class="form-group">
<label for="{{ type }}_label" class="col-sm-4 control-label">
{{ specific.name }}
</label>
2016-06-10 21:00:00 +02:00
2016-06-24 14:24:34 +02:00
<div class="col-sm-8">
<div class="radio"><label>
{{ Form.checkbox('specifics['~type~']', '1', Input.old('specifics')[type] == '1', {'id': type ~ '_label'}) }}
{{ specific.description }}
</label>
</div>
</div>
</div>
{% endfor %}
2016-06-10 21:00:00 +02:00
2016-06-11 06:31:40 +02:00
{% if not data.is_upload_possible %}
2016-06-10 21:00:00 +02:00
<div class="form-group" id="csv_holder">
<div class="col-sm-4">
&nbsp;
</div>
<div class="col-sm-8">
2016-06-11 06:31:40 +02:00
<pre>{{ data.upload_path }}</pre>
2016-06-10 21:00:00 +02:00
<p class="text-danger">
{{ 'csv_upload_not_writeable'|_ }}
</p>
</div>
</div>
{% endif %}
</div>
</div>
</div>
</div>
2016-06-11 06:31:40 +02:00
{% if data.is_upload_possible %}
2016-06-24 14:24:34 +02:00
<div class="row">
<div class="col-lg-12">
<div class="box">
<div class="box-body">
<button type="submit" class="pull-right btn btn-success">
{{ 'csv_upload_button'|_ }}
</button>
</div>
2016-06-10 21:00:00 +02:00
</div>
</div>
</div>
2016-06-11 06:31:40 +02:00
{% endif %}
2016-06-10 21:00:00 +02:00
</form>
{% endblock %}