<% var e, error, n, notice; %> <% if (!_.isEmpty(m.errors)) { %>
<% foreach (m.errors as e => error) { %>
{{zenario.htmlspecialchars(error.message, true)}}
<% } %>
<% } %> <% foreach (m.notices as n => notice) { %>
<% if (notice.html) { %> {{notice.message}} <% } else { %> {{zenario.htmlspecialchars(notice.message, true)}} <% } %>
<% } %> <% if (m.fields) { %> <% var f, field, val, ff = m.fields[0], fl = m.fields.length, lf = m.fields[fl-1], pgf = ff._lastVisibleGroupingField, lgf = lf._lastVisibleGroupingField, rowHasError = false, hadKeySymbol = false, hadProtectedSymbol = false; %> <% foreach (m.fields as f => field) { %> <% if (field.error) { %> <% rowHasError = true; %> <% break; %> <% } %> <% } %> <% if (ff._lastVisibleGrouping !== ff.grouping) { %> <% if (pgf) { %> <% if (pgf.post_grouping_html) { %> {{pgf.post_grouping_html}} <% } %> <% if (!ff.grouping || m.grouping.start_new_grouping_wrapper) { %> <% } %> <% } %> <% if (ff.grouping) { %> <% if (!pgf || m.grouping.start_new_grouping_wrapper) { %> <% if (m.grouping.grouping_wrapper_icon_class) { %>
<% if (zenario.defined(m.grouping.grouping_wrapper_record_count)) { %> {{m.grouping.grouping_wrapper_record_count|escape}} <% } %>
<% } %> <% } %> <% if (m.grouping.pre_grouping_html) { %> {{m.grouping.pre_grouping_html}} <% } %>
<% } %> <% } %> <% if (ff.legend) { %> {{ff.legend}} <% } %>
<% if (!zenario.engToBoolean(ff.full_width)) { %> <% foreach (m.fields as f => field) { %> <% if (field.side_note) { %>
{{zenario.unfun(field.side_note)}}
<% } %> <% } %> <% if (ff.label && !zenario.IN(ff.type, 'checkbox', 'radio')) { %>
<% if (ff.pre_field_post_label_html) { %> {{ff.pre_field_post_label_html}} <% } %> <% if (ff.encrypted && zenario.IN(ff.type, 'checkboxes', 'radios')) { %> 🔑 <% hadKeySymbol = true; %> <% } %> <% if (ff.site_setting && ff.site_setting.protect_from_database_restore && zenario.IN(ff.type, 'checkboxes', 'radios')) { %> <% hadProtectedSymbol = true; %> <% } %>
<% } %> <% } %>
<% foreach (m.fields as f => field) { %> <% var showEncryptedIcon = !hadKeySymbol && field.encrypted; %> <% var showProtectedIcon = !hadProtectedSymbol && field.site_setting && field.site_setting.protect_from_database_restore; %> <% var showPhraseIcon = field.show_phrase_icon; %> {{field._html}} <% if (showEncryptedIcon) { %> 🔑 <% } %> <% if (showProtectedIcon) { %> <% } %> <% if (showPhraseIcon) { %> <% } %> <% } %>
<% var nb; %> <% foreach (m.fields as f => field) { %> <% if (field.note_below && $.trim(nb = zenario.unfun(field.note_below))) { %> <% if (field.show_plain_note_below) { %> <% var note_below_class = "zenario_note_below_plain"; %> <% } else { %> <% var note_below_class = "zenario_note_below"; %> <% } %>
{{nb}}
<% } %> <% } %> <% foreach (m.fields as f => field) { %> <% if (field.error && field.error != true) { %>
{{zenario.htmlspecialchars(field.error, true)}}
<% } %> <% } %>
<% if (ff._isLastRow) { %> <% if (ff.grouping) { %>
<% if (lgf && lgf.post_grouping_html) { %> {{lgf.post_grouping_html}} <% } %>
<% } %> <% } %> <% } %>