Add lock icon to sidebar

This commit is contained in:
igorkorenfeld 2022-11-10 10:46:34 -05:00
parent 275dbc7768
commit f7c7c78d2f
No known key found for this signature in database
GPG key ID: 826947A4B867F659

View file

@ -1,16 +1,21 @@
{% load static %}
<div class="margin-bottom-4 tablet:margin-bottom-0"> <div class="margin-bottom-4 tablet:margin-bottom-0">
<nav aria-label="Form steps,"> <nav aria-label="Form steps,">
<ul class="usa-sidenav"> <ul class="usa-sidenav">
{% for this_step in wizard.steps.all %} {% for this_step in wizard.steps.all %}
{% if forloop.counter <= wizard.steps.step1 %}
<li class="usa-sidenav__item"> <li class="usa-sidenav__item">
{% if forloop.counter <= wizard.steps.step1 %} <a href="{% url wizard.url_name step=this_step %}"
<a href="{% url wizard.url_name step=this_step %}" {% if this_step == wizard.steps.current %}class="usa-current"{% endif%}>
{% if this_step == wizard.steps.current %}class="usa-current"{% endif%}>
{{ form_titles|get_item:this_step }} {{ form_titles|get_item:this_step }}
</a> </a>
{% else %} {% else %}
{{ form_titles|get_item:this_step }} <li class="usa-sidenav__item step__locked">
{% endif %} {{ form_titles|get_item:this_step }}
<svg class="usa-icon" aria-labelledby="locked-step" role="img">
<title id="locked-step">locked until previous steps have been completed </title>
<use xlink:href="{%static '/img/sprite.svg'%}#lock"></use>
{% endif %}
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>