<?php foreach($fields_abas as $abas) { if($abas[0] != 'hidden'){?>
					<div class="card card-accent-info">
						<div class="card-header"><h5 class="mb-0"><?php echo $abas[0]; ?></h5></div>
							<div class="card-body">
							<?php foreach($fields as $field) { 	if (in_array($field->field_name, $abas[1])) {  ?>
						    	
						    	<div class="form-group <?php echo $field->field_name; ?>_form_group">
                                    <label class="col-sm-2 control-label">
                                        <?php echo $input_fields[$field->field_name]->display_as; ?><?php echo ($input_fields[$field->field_name]->required) ? "<span class='required'>*</span> " : ""; ?>
                                    </label>
                                    <div class="col-sm-12">
                                        <?php echo $input_fields[$field->field_name]->input?>
                                    </div>
                                </div>
                                
                        	<?php }}?>
                        </div>
					</div>
<?php }else{ ?>

    <?php foreach($fields as $field) { 	if (in_array($field->field_name, $abas[1])) {  ?>
						    	
    	<div class="form-group <?php echo $field->field_name; ?>_form_group">
            <label class="col-sm-2 control-label">
                <?php echo $input_fields[$field->field_name]->display_as; ?><?php echo ($input_fields[$field->field_name]->required) ? "<span class='required'>*</span> " : ""; ?>
            </label>
            <div class="col-sm-9">
                <?php echo $input_fields[$field->field_name]->input?>
            </div>
        </div>
        
	<?php }}?>
	
<?php }} ?>
<!-- Start of hidden inputs -->
                            <?php
                            foreach ($hidden_fields as $hidden_field) {
                                echo $hidden_field->input;
                            }
                            ?>
                            <!-- End of hidden inputs -->
                            <?php if ($is_ajax) { ?><input type="hidden" name="is_ajax" value="true" /><?php }?>

                            <div class='small-loading hidden' id='FormLoading'><?php echo $this->l('form_insert_loading'); ?></div>

                            <div class="form-group">
                                <div id='report-error' class='report-div error bg-danger' style="display:none"></div>
                                <div id='report-success' class='report-div success bg-success' style="display:none"></div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-offset-3 col-sm-7">
                                    <button class="btn btn-default btn-success b10" type="submit" id="form-button-save">
                                        <i class="fa fa-check"></i>
                                        <?php echo $this->l('form_save'); ?>
                                    </button>
                                    <?php 	if(!$this->unset_back_to_list) { ?>
                                        <button class="btn btn-info b10" type="button" id="save-and-go-back-button">
                                            <i class="fa fa-rotate-left"></i>
                                            <?php echo $this->l('form_save_and_go_back'); ?>
                                        </button>
                                        <button class="btn btn-default cancel-button b10" type="button" id="cancel-button">
                                            <i class="fa fa-warning"></i>
                                            <?php echo $this->l('form_cancel'); ?>
                                        </button>
                                    <?php } ?>
                                </div>
                            </div>