<?php $__env->startSection('content'); ?>

<?php echo $__env->make('offerings/head', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

<div class="row">
    <div class="col-md-12">
        <div class="gray_container">
            <h4 class="head_h4">QUESTIONS AND ANSWERS</h4><br>
            <?php if($errors->has()): ?>
                <div class="alert alert-danger">
                <?php foreach ($errors->all() as $row): ?>
                	<?php echo $row; ?>
                <?php endforeach; ?>
                </div>
            <?php endif; ?>
            
            <?php if(Session::has('success')): ?>
            	<div class="alert alert-success"><?php echo Session::get('success'); ?></div>
            <?php endif; ?>
            <div class="Q_A_form">
            	<?php echo Form::open(array('action' => 'FaqOfferingController@postAddQuestion')); ?>
                <textarea class="form-control" name="question"></textarea><input type="submit" class="btn" value="SUBMIT QUESTION">
                <p>Thank you. Your question has been sent to the management team. You will be notified when it is answered.</p>
                <?php echo Form::close(); ?>
            </div>
            <?php if($faq->count() > 0): ?>
            <ul class="Q_A_text">
                <?php foreach($faq as $row): ?>
                <li><span>Q:</span><?php echo $row->question; ?></li>
                <li><span>A:</span><?php echo $row->answer; ?></li>
            	<?php endforeach; ?>
            </ul>
            <?php echo $faq->links(); ?>
            <?php endif; ?>
        </div>
    </div>
</div>    

<?php $__env->stopSection(); ?>