diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-10-23 12:36:44 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-04-16 16:38:32 +0200 |
commit | 94a4a57148d2c81dbbc1251b7e79ba09282af217 (patch) | |
tree | e37714d36079e8af4d8e972d16859c6bc338b406 /ishtar_common/templates | |
parent | 406252c203e6863aa4ae02619037f13439706f98 (diff) | |
download | Ishtar-94a4a57148d2c81dbbc1251b7e79ba09282af217.tar.bz2 Ishtar-94a4a57148d2c81dbbc1251b7e79ba09282af217.zip |
✨ imports: allow errors to be pointed out line by line
Diffstat (limited to 'ishtar_common/templates')
-rw-r--r-- | ishtar_common/templates/ishtar/blocks/view_import_csv.html | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/ishtar_common/templates/ishtar/blocks/view_import_csv.html b/ishtar_common/templates/ishtar/blocks/view_import_csv.html index f1b089ce2..ba9f43d50 100644 --- a/ishtar_common/templates/ishtar/blocks/view_import_csv.html +++ b/ishtar_common/templates/ishtar/blocks/view_import_csv.html @@ -1,4 +1,4 @@ -{% load i18n %} +{% load i18n l10n %} <div class="modal-dialog full modal-lg"> <div class="modal-content"> @@ -12,21 +12,27 @@ </button> </div> <div class="table-scroll"> - <table class="table table-striped table-bordered"> + <table class="table table-striped table-bordered" data-import="{{import_id}}"> <thead> <tr> <th> </th> + {% if has_line_errors %}<th>{% trans "Ignore" %}</th>{% endif %} {% for head in header %}<th>{{head}}</th>{% endfor %} </tr> </thead> <tbody> {% for line in content %} - <tr> + <tr{% if has_line_errors and line.0.1 %} class="import-line-ignored"{% endif%}> <td>{{ forloop.counter }}</td> - {% for cell in line %}<td>{{cell}}</td>{% endfor %} + {% for cell in line %}<td> + {% if has_line_errors and not forloop.counter0 %}<input class="check-ignored" value="{{cell.0}}"{% if cell.1%} checked="checked"{% endif %} type="checkbox" />{% else %}{{cell}}{% endif %} + </td>{% endfor %} </tr>{% endfor %} </tbody> </table> </div> </div> </div> +<script type="text/javascript">{% localize off %} +$(".check-ignored").click(import_csv_check_ignored); +{% endlocalize %}</script>
\ No newline at end of file |