glacier-web-cli 0.5.0

Command-line tool for creating and running Glacier applications.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{% props fields: Vec<Field> = Vec::new(), errors: Vec<(String, String)> = Vec::new(), title: String = "There is a problem" %}
{# fields: each error links to its input in the words its field shows; errors: more (input id, message) pairs #}
{%- if !errors.is_empty() || fields.iter().any(|field| field.has_errors()) %}
<div class="ui-error-summary" role="alert" tabindex="-1" aria-labelledby="error-summary-title">
  <h2 class="ui-error-summary-title" id="error-summary-title"><svg class="ui-icon" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="10"/><path d="M12 8v4"/><path d="M12 16h.01"/></svg>{{ title }}</h2>
  <ul>
    {%- for field in fields.iter() %}{% for message in field.errors.iter() %}
    <li><a href="#{{ field.id }}">{{ field.label }} {{ message }}</a></li>
    {%- end %}{% end %}
    {%- for (id, message) in errors.iter() %}
    <li><a href="#{{ id }}">{{ message }}</a></li>
    {%- end %}
  </ul>
</div>
{%- end %}