diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-10-23 12:36:44 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-02-05 10:51:52 +0100 |
| commit | 6e09eff4157d09015942f61a2c4a59b96c6817a8 (patch) | |
| tree | d4c714975ca2efc1400ea87fd7e00f69eeb00060 /ishtar_common/templates | |
| parent | 995e0faab655718da4c9a5c9545e02b3552f18d8 (diff) | |
| download | Ishtar-6e09eff4157d09015942f61a2c4a59b96c6817a8.tar.bz2 Ishtar-6e09eff4157d09015942f61a2c4a59b96c6817a8.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 |
