<?php

defined('_WPBOOKINGPRO_EXEC') or die;

extract($displayData);
?>
<div
        class="subform-repeatable-group subform-repeatable-group-<?php esc_html_e($unique_subform_id); ?>"
        data-base-name="<?php esc_html_e($basegroup); ?>"
        data-group="<?php esc_html_e($group); ?>"
>
	<?php if (!empty($buttons)) : ?>
        <div class="btn-toolbar text-right">
            <div class="btn-group">
				<?php if (!empty($buttons['add'])) : ?>
                    <a class="btn btn-mini button btn-success group-add group-add-<?php esc_html_e($unique_subform_id); ?>"
                       aria-label="<?php esc_attr_e('Jglobal field add','wpbookingpro'); ?>">
                        <span class="icon-plus" aria-hidden="true"></span>
                    </a>
				<?php endif; ?>
				<?php if (!empty($buttons['remove'])) : ?>
                    <a class="btn btn-mini button btn-danger group-remove group-remove-<?php esc_html_e($unique_subform_id); ?>"
                       aria-label="<?php esc_attr_e('Jglobal field remove','wpbookingpro'); ?>">
                        <span class="icon-minus" aria-hidden="true"></span>
                    </a>
				<?php endif; ?>
				<?php if (!empty($buttons['move'])) : ?>
                    <a class="btn btn-mini button btn-primary group-move group-move-<?php esc_html_e($unique_subform_id); ?>"
                       aria-label="<?php esc_attr_e('Jglobal field move','wpbookingpro'); ?>">
                        <span class="icon-move" aria-hidden="true"></span>
                    </a>
				<?php endif; ?>
            </div>
        </div>
	<?php endif; ?>
    <div class="row-fluid">
		<?php foreach ($form->getFieldsets() as $fieldset) : ?>
            <fieldset class="<?php if (!empty($fieldset->class)) {
				esc_html_e($fieldset->class);
			} ?>">
				<?php if (!empty($fieldset->label)) : ?>
                    <legend><?php esc_html_e($fieldset->label); ?></legend>
				<?php endif; ?>
				<?php foreach ($form->getFieldset($fieldset->name) as $field) : ?>
					<?php $field->renderField(); ?>
				<?php endforeach; ?>
            </fieldset>
		<?php endforeach; ?>
    </div>
</div>
