<?php
/**
 * @version    $Id$
 * @package    IT_Theme_Framework
 * @author     InnoThemes Team <support@innothemes.com>
 * @copyright  Copyright (C) 2012 InnoThemes.com. All Rights Reserved.
 * @license    GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html
 *
 * Websites: http://www.innothemes.com
 */
?>
<div class="it-form-accordion">
<?php foreach ( $this->current_accordion as $aid => $accordion ) : ?>
	<h3><?php esc_html_e( isset( $accordion['title'] ) ? $accordion['title'] : $aid, IT_THEME_TEXTDOMAIN ); ?></h3>
	<div id="it-form-accordion-<?php esc_attr_e( $aid ); ?>" class="row">
	<?php
	if ( isset( $accordion['fields'] ) ) :
		$this->current_fields = $accordion['fields'];

		// Load fields template
		include IT_Loader::get_path( 'form/tmpl/fields.php' );
	endif;

	if ( isset( $accordion['fieldsets'] ) ) :
		$this->current_fieldsets = $accordion['fieldsets'];

		// Load fieldsets template
		include IT_Loader::get_path( 'form/tmpl/fieldsets.php' );
	endif;
	?>
	</div>
<?php endforeach; ?>
</div>
