validation-error-modal.underscore 1.28 KB
Newer Older
1 2 3 4
<div class = "validation-error-modal-content">
    <div class "error-header">
        <p>
        <%= _.template(
5 6 7 8 9 10 11 12 13 14 15
            ngettext(
                "There was {strong_start}{num_errors} validation error{strong_end} while trying to save the course settings in the database.",
                "There were {strong_start}{num_errors} validation errors{strong_end} while trying to save the course settings in the database.",
                num_errors
            ),
            {interpolate: /\{(.+?)\}/g})(
            {
                strong_start:'<strong>',
                num_errors: num_errors,
                strong_end: '</strong>'
            })%>
16 17 18 19 20 21
        <%= gettext("Please check the following validation feedbacks and reflect them in your course settings:")%></p>
    </div>

    <hr>

    <ul class = "error-list">
22
        <% _.each(response, function(value, index, list) { %>
23 24 25

            <li class = "error-item">
                <span class='error-item-title'>
26
                    <span class="icon fa fa-warning" aria-hidden="true"></span>
27 28 29 30 31 32 33 34
                    <strong><%= value.model.display_name %></strong>:
                </span>
                <textarea class = "error-item-message" disabled='disabled'><%=value.message%></textarea>
            </li>

        <% }); %>
    </ul>
</div>