{% set renderBackButton = flow.getFirstStepNumber() < flow.getLastStepNumber() and flow.getCurrentStepNumber() in (flow.getFirstStepNumber() + 1) .. flow.getLastStepNumber() %}
<div class="craue_formflow_buttons craue_formflow_button_count_{% if renderBackButton %}3{% else %}2{% endif %}">
    {#
        Default button (the one trigged by pressing the enter/return key) must be defined first.
        Thus, all buttons are defined in reverse order and will be reversed again via CSS.
        See http://stackoverflow.com/questions/1963245/multiple-submit-buttons-specifying-default-button
    #}

    {%- set isLastStep = flow.getCurrentStepNumber() == flow.getLastStepNumber() -%}
    {%- set craue_formflow_button_class_last = craue_formflow_button_class_last | default('craue_formflow_button_last') -%}
    {%- set craue_formflow_button_class_last = isLastStep
        ? craue_formflow_button_class_finish | default(craue_formflow_button_class_last)
        : craue_formflow_button_class_next | default(craue_formflow_button_class_last)
    -%}

    <div class="col-xs-3">
        <button type="submit" class="button button_red text-center" name="{{ flow.getFormTransitionKey() }}" value="reset" formnovalidate="formnovalidate">
            {{- 'button.reset' | trans({}, 'CraueFormFlowBundle') -}}
        </button>
    </div>
    <div class="pull-right">
        {% if renderBackButton %}
            <button type="submit" class="button button_green text-center" name="{{ flow.getFormTransitionKey() }}" value="back" formnovalidate="formnovalidate">
                {{- 'button.back' | trans({}, 'CraueFormFlowBundle') -}}
            </button>
        {% endif %}
        <button type="submit" class="button button_green text-center">

            {{- (isLastStep ? 'button.finish' : 'button.next') | trans({}, 'CraueFormFlowBundle') -}}
        </button>
    </div>
</div>