<?php $this->extend('block_unsearchable'); ?>

<?php $this->block('content'); ?>

<?php if (is_array($this->steps) && count($this->steps)): ?>
<div class="steps block w-100 mb-3">
<ul class="w-100 list-group list-group-horizontal-md level_1 steps<?php echo count($this->steps); ?>">
<?php foreach( $this->steps as $step ): ?>
<li class="list-group-item float-left col-md-6 col-24 <?php echo $step['class']; ?>">
<?php if (strlen($step['href'])): ?>
<a class="link-colM d-block <?php echo $step['class']; ?>" href="<?php echo $step['href']; ?>" title="<?php echo $step['title']; ?>"><?php echo $step['link']; ?></a>
<?php else: ?>
<span class="<?php echo $step['class']; ?>"><?php if($step['isActive']): ?><span class="invisible"><?php echo $this->activeStep; ?></span><?php endif; ?><?php echo $step['link']; ?></span>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>

<?php if (strlen($this->message)): ?>
<p class="<?php echo $this->mtype; ?> message"><?php echo $this->message; ?></p>
<?php endif; ?>

<?php if ($this->showForm): ?>
<form action="<?php echo $this->action; ?>" id="<?php echo $this->formId; ?>" method="post" enctype="<?php echo $this->enctype; ?>" novalidate="novalidate">
<div class="formbody bg-gryXL p-3 rounded">
<input type="hidden" name="FORM_SUBMIT" value="<?php echo $this->formSubmit; ?>">
<input type="hidden" name="REQUEST_TOKEN" value="{{request_token}}">
<?php echo $this->hidden; ?>
<?php endif; ?>
<?php foreach ($this->fields as $field): ?>
<div class="<?php echo $field['class']; ?>">
<?php echo $field['html']; ?>
</div>
<?php endforeach; ?>
<?php if ($this->showForm): ?>
</div>
<?php if ($this->showPrevious || $this->showNext): ?>
    <div class="submit_container btn-group my-3 w-100">
        <?php if ($this->showPrevious): ?><input type="submit" class="btn btn-secondary" name="previousStep" value="<?php echo $this->previousLabel; ?>"><?php endif; ?>
        <?php if ($this->showNext): ?><input type="submit" class="btn btn-success <?php echo $this->nextClass; ?> button" name="nextStep" value="<?php echo $this->nextLabel; ?>"><?php endif; ?>
    </div>
<?php endif; ?>
</form>
<?php endif; ?>

<script>
    Isotope.checkoutButton(document.getElementById('<?php echo $this->formId; ?>'));
</script>

<?php $this->endblock(); ?>
