{% load i18n %}
{% if status %}
<div class="well well-danger">
   {% if status == "new" or status == "processing" %}
       <button class="btn btn-primary" type="submit" name="action" value="generate_packing_slips">{% trans "Print Packaging Slips" %}</button>
   {% endif %}

   {% for slug, name in available_status_list %}
       <a data-toggle="modal" href="#{{ slug }}-modal" class="btn btn-primary">{% trans "Mark as" %} {{ name }}</a>

       <div class="modal hide fade" id="{{ slug }}-modal">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">×</button>
                <h3>{% trans "Change order status to" %} {{ name }}</h3>
            </div>

            <div class="modal-body">
                <span class="control-group">
                    <label for="new_status">{% trans "Change order status to" %} {{ name }}</label>
                    <input type="checkbox" name="new_status" id="new_status" value="{{ slug }}"/>
                </span>
            </div>

            <div class="modal-footer">
                <a href="#" class="btn" data-dismiss="modal">{% trans "Cancel" %}</a>
                <button type="submit" class="btn btn-primary" name="action" value="change_status_selected_orders">{% trans "Done" %}</button>
            </div>

        </div>
   {% endfor %}
</div>
{% endif %}
