11{% load i18n unfold %}
22
33{% block validation_errors %}
4- < div class ="bg-red-50 border border-red-200 mb-4 mt-8 rounded shadow-sm text-red-500 text-sm dark:bg-red-500/20 dark:border-red-500/20 ">
5- < div class ="border-b border-red-200 flex flex-row py-3 px-4 dark:border-red-500/20 ">
6- < h2 class ="font-medium ">
7- {% trans "Some rows failed to validate" %}
8- </ h2 >
9- </ div >
4+ {% capture as import_error silent %}
5+ < span class ="block font-semibold mb-2 ">
6+ {% trans "Some rows failed to validate" %}
7+ </ span >
108
11- < div class ="px-4 py-3 ">
12- < p >
13- {% trans "Please correct these errors in your data where possible, then reupload it using the form above." %}
14- </ p >
15- </ div >
9+ < span class ="block ">
10+ {% trans "Please correct these errors in your data where possible, then reupload it using the form above." %}
11+ </ span >
12+ {% endcapture %}
13+
14+ < div class ="mt-8 ">
15+ {% include "unfold/helpers/messages/error.html" with error=import_error %}
1616 </ div >
1717
18- < table class ="border-gray-200 border-spacing-none border-separate w-full lg:border lg:rounded-md lg:shadow-sm lg:dark:border-gray-800 ">
18+ < table class ="import-preview border-gray-200 border-spacing-none border-separate w-full lg:border lg:rounded-md lg:shadow-sm lg:dark:border-gray-800 ">
1919 < thead class ="hidden lg:table-header-group font-semibold text-gray-900 dark:text-gray-100 ">
2020 < tr >
2121 < th class ="align-middle capitalize px-3 py-2 text-left ">
@@ -41,19 +41,24 @@ <h2 class="font-medium">
4141 {{ row.number }}
4242 </ td >
4343
44- < td data-label ="{% trans "Errors " %}" class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left before:block before:capitalize before:content-[attr(data-label)] before:mr-auto lg:before:hidden lg:py-3 lg:table-cell dark:border-gray-800 ">
45- < div >
46- < span class ="bg-red-600 font-semibold ml-2 px-1 rounded-sm text-xs text-white "> {{ row.error_count }}</ span >
47- </ div >
44+ < td data-label ="{% trans "Errors " %}" class="errors align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left before:block before:capitalize before:content-[attr(data-label)] before:mr-auto lg:before:hidden lg:py-3 lg:table-cell dark:border-gray-800 ">
45+ < span class ="validation-error-count bg-red-600 font-semibold ml-2 px-1 rounded-sm text-xs text-white "> {{ row.error_count }}</ span >
4846
49- < div class ="validation-error-container ">
47+ < div class ="validation-error-container rounded-md !bg-white border left-12 !m-0 !p-0 !top-3 dark:!bg-gray-800 dark:!border-gray-700 min-w-72 ">
5048 < ul class ="validation-error-list ">
5149 {% for field_name, error_list in row.field_specific_errors.items %}
52- < li >
53- < span class ="validation-error-field-label "> {{ field_name }}</ span >
54- < ul >
50+ < li class ="p-3 ">
51+ < span class ="validation-error-field-label !border-0 font-semibold mb-1 !text-font-important-light dark:!text-font-important-dark ">
52+ {{ field_name }}
53+ </ span >
54+
55+ < ul class ="text-xs !m-0 ">
5556 {% for error in error_list %}
56- < li > {{ error }}</ li >
57+ < li class ="!m-0 ">
58+ < p class ="leading-normal ">
59+ {{ error }}
60+ </ p >
61+ </ li >
5762 {% endfor %}
5863 </ ul >
5964 </ li >
0 commit comments