Browse Source

Make descriptions more generic.

pull/92/head
James Cole 4 years ago
parent
commit
bffbed4a3a
No known key found for this signature in database GPG Key ID: B49A324B7EAD6D80
  1. 16
      resources/views/import/003-upload/index.twig
  2. 27
      resources/views/import/004-configure/index.twig
  3. 4
      resources/views/import/005-roles/index.twig
  4. 9
      resources/views/index.twig

16
resources/views/import/003-upload/index.twig

@ -39,18 +39,18 @@
enctype="multipart/form-data"> enctype="multipart/form-data">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/> <input type="hidden" name="_token" value="{{ csrf_token() }}"/>
{# CSV FILE #}
{% if 'csv' == flow %}
{# importable FILE #}
{% if 'file' == flow %}
<div class="form-group row mb-3"> <div class="form-group row mb-3">
<label for="csv_file" class="col-sm-4 col-form-label">CSV file</label>
<label for="importable_file" class="col-sm-4 col-form-label">Importable file</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input type="file" <input type="file"
class="form-control{% if errors.has('csv_file') %} is-invalid{% endif %}"
id="csv_file" name="csv_file"
placeholder="CSV file"/>
{% if errors.has('csv_file') %}
class="form-control{% if errors.has('importable_file') %} is-invalid{% endif %}"
id="importable_file" name="importable_file"
placeholder="Importable file"/>
{% if errors.has('importable_file') %}
<div class="invalid-feedback"> <div class="invalid-feedback">
{{ errors.first('csv_file') }}
{{ errors.first('importable_file') }}
</div> </div>
{% endif %} {% endif %}
</div> </div>

27
resources/views/import/004-configure/index.twig

@ -52,9 +52,9 @@
{{ subTitle }} {{ subTitle }}
</div> </div>
<div class="card-body"> <div class="card-body">
{% if 'csv' == flow %}
{% if 'file' == flow %}
<p> <p>
CSV files come in many shapes and forms. Some of the most important settings are below.
Importable files come in many shapes and forms. Some of the most important settings are below.
They apply to all lines in the file. If you would like some support, <a They apply to all lines in the file. If you would like some support, <a
href="https://docs.firefly-iii.org/data-importer/usage/configure/" target="_blank"> href="https://docs.firefly-iii.org/data-importer/usage/configure/" target="_blank">
check out the documentation for this page.</a> check out the documentation for this page.</a>
@ -172,7 +172,7 @@
{% endif %} {% endif %}
{% if 'csv' == flow %}
{% if 'file' == flow %}
<h5>File options</h5> <h5>File options</h5>
<div class="form-group row mb-3"> <div class="form-group row mb-3">
<div class="col-sm-3">Headers</div> <div class="col-sm-3">Headers</div>
@ -185,8 +185,7 @@
Yes Yes
</label><br> </label><br>
<small id="headersHelp" class="form-text text-muted"> <small id="headersHelp" class="form-text text-muted">
Select this checkbox when your CSV file has headers on the first line of
the CSV file.
Select this checkbox when your importable file is a CSV-like file and has headers on the first line of the file.
</small> </small>
</div> </div>
</div> </div>
@ -203,14 +202,14 @@
Yes Yes
</label><br> </label><br>
<small id="conversionHelp" class="form-text text-muted"> <small id="conversionHelp" class="form-text text-muted">
Try to convert your CSV file to UTF-8. May lead to weird characters.
Try to convert your file to UTF-8. May lead to weird characters.
</small> </small>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group row mb-3"> <div class="form-group row mb-3">
<label for="delimiter" class="col-sm-3 col-form-label">CSV delimiter</label>
<label for="delimiter" class="col-sm-3 col-form-label">CSV-file delimiter</label>
<div class="col-sm-9"> <div class="col-sm-9">
<select id="delimiter" name="delimiter" class="form-control" <select id="delimiter" name="delimiter" class="form-control"
aria-describedby="delimiterHelp"> aria-describedby="delimiterHelp">
@ -228,7 +227,7 @@
</option> </option>
</select> </select>
<small id="delimiterHelp" class="form-text text-muted"> <small id="delimiterHelp" class="form-text text-muted">
Select the field separator of our CSV file. This is almost always a comma.
If your file is a CSV file, select the field separator of the file. This is almost always a comma.
</small> </small>
</div> </div>
</div> </div>
@ -247,7 +246,7 @@
<a href="https://www.php.net/manual/en/function.date.php">on this page</a>. <a href="https://www.php.net/manual/en/function.date.php">on this page</a>.
Don't stop playing with this setting until <strong Don't stop playing with this setting until <strong
id="date_example">1984-09-17</strong> matches what you see in your id="date_example">1984-09-17</strong> matches what you see in your
CSV file.
importable file.
</small> </small>
</div> </div>
</div> </div>
@ -427,7 +426,7 @@
</p> </p>
</div> </div>
{% if 'csv' == flow %}
{% if 'file' == flow %}
<div class="form-group row mb-3"> <div class="form-group row mb-3">
<label for="X" class="col-sm-3 col-form-label">General detection options</label> <label for="X" class="col-sm-3 col-form-label">General detection options</label>
<div class="col-sm-9"> <div class="col-sm-9">
@ -437,13 +436,13 @@
type="checkbox" value="1" id="ignore_duplicate_lines" type="checkbox" value="1" id="ignore_duplicate_lines"
name="ignore_duplicate_lines" aria-describedby="duplicateHelp"> name="ignore_duplicate_lines" aria-describedby="duplicateHelp">
<label class="form-check-label" for="ignore_duplicate_lines"> <label class="form-check-label" for="ignore_duplicate_lines">
Do not import duplicate lines in the import.
Do not import duplicate lines or entries in the importable file.
</label> </label>
<br> <br>
<small class="form-text text-muted" id="duplicateHelp"> <small class="form-text text-muted" id="duplicateHelp">
Whatever method you choose ahead, it's smart to make the importer ignore Whatever method you choose ahead, it's smart to make the importer ignore
any any
duplicated lines in your import.
duplicated lines or entries in your importable file.
</small> </small>
</div> </div>
</div> </div>
@ -477,7 +476,7 @@
</small> </small>
</div> </div>
</div> </div>
{% if 'csv' == flow %}
{% if 'file' == flow %}
<div class="form-group row mb-3" id="unique_column_index_holder"> <div class="form-group row mb-3" id="unique_column_index_holder">
<label for="unique_column_index" class="col-sm-3 col-form-label">Unique column <label for="unique_column_index" class="col-sm-3 col-form-label">Unique column
index</label> index</label>
@ -488,7 +487,7 @@
aria-describedby="unique_column_index_help"> aria-describedby="unique_column_index_help">
<small id="unique_column_index_help" class="form-text text-muted"> <small id="unique_column_index_help" class="form-text text-muted">
This field is only relevant for the "identifier-based" detection option. This field is only relevant for the "identifier-based" detection option.
Indicate which column contains the unique identifier. Start counting from
Indicate which column / field contains the unique identifier. Start counting from
zero! zero!
</small> </small>
</div> </div>

4
resources/views/import/005-roles/index.twig

@ -14,10 +14,10 @@
</div> </div>
<div class="card-body"> <div class="card-body">
<p> <p>
Set up the the meaning of each column in your file.
Set up the meaning of each column in your file.
</p> </p>
<p> <p>
Each column in your CSV file has a role, it contains a specific type of content.
Each column in your importable file has a role, it contains a specific type of content.
By configuring these roles here, you tell the importer how to approach and treat By configuring these roles here, you tell the importer how to approach and treat
the data in each column. <a target="_blank" the data in each column. <a target="_blank"
href="https://docs.firefly-iii.org/data-importer/usage/roles/">Read href="https://docs.firefly-iii.org/data-importer/usage/roles/">Read

9
resources/views/index.twig

@ -73,11 +73,11 @@
<div class="col-lg-4"> <div class="col-lg-4">
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
Import from CSV file
Import from file
</div> </div>
<div class="card-body"> <div class="card-body">
<button class="btn btn-info disabled" value="csv" name="flow" disabled="disabled"
id="csv_button"><span class="fas fa-cog fa-spin"></span></button>
<button class="btn btn-info disabled" value="file" name="flow" disabled="disabled"
id="file_button"><span class="fas fa-cog fa-spin"></span></button>
</div> </div>
</div> </div>
</div> </div>
@ -137,14 +137,13 @@
var tokenPageUrl = '{{ route('token.index') }}'; var tokenPageUrl = '{{ route('token.index') }}';
$.getJSON(url).done(function (data) { $.getJSON(url).done(function (data) {
if ('OK' === data.result) { if ('OK' === data.result) {
$('#csv_button').removeClass('disabled').text('Import CSV file').removeAttr('disabled');
$('#file_button').removeClass('disabled').text('Import file').removeAttr('disabled');
} else { } else {
$('#importers').hide(); $('#importers').hide();
$('#error_explain').show(); $('#error_explain').show();
$('#firefly_expl').hide(); $('#firefly_expl').hide();
$('#error_txt').text(data.message); $('#error_txt').text(data.message);
// window.location = tokenPageUrl;
} }
}).fail(function () { }).fail(function () {
$('#importers').hide(); $('#importers').hide();

Loading…
Cancel
Save