<?php
/*----------------------------------------------------------------------------------|  www.vdm.io  |----/
				fdsh 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.32
	@build			14th June, 2021
	@created		17th December, 2020
	@package		Reservation
	@subpackage		default_personalinfo.php
	@author			farhad shahbazi <http://farhad.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____  _____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \(  _  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/ )(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__)  (_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>

<!--[JCBGUI.template.template.1.$$$$]-->
<?php echo JLayoutHelper::render('doctorinfo', $this->item); ?>

<?php
$app = JFactory::getApplication();
$personalInfo = $app->getUserState('data.personalinfo');
?>
<section>
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-md-8">
                <div id="accordion">
                    <div class="card">
                        <div class="card-header" id="headingOne">
                            <h5 class="mb-0">
                                <button type="button" style="color: #31bfce" class="btn btn-link" data-toggle="collapse"
                                        data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
                                    <strong>نوبت را برای خودم میخواهم</strong>
                                </button>
                            </h5>
                        </div>

                        <div id="collapseOne" class="collapse show" aria-labelledby="headingOne"
                             data-parent="#accordion">
                            <div class="card-body">
                                <form action="" method="post" enctype="multipart/form-data">
                                    <div class="form-group col-md-6">
                                        <label for="">نام و نام خانوادگی :</label>
                                        <input type="text" name="jform[name]" class="form-control" readonly
                                               value="<?= isset($personalInfo['name'])? $personalInfo['name']: '';?>">
                                    </div>
                                    <div class="form-group col-md-6">
                                        <label for="">کد ملی :</label>
                                        <input type="text" name="jform[nationalnumber]" class="form-control" readonly
                                               value="<?= isset($personalInfo['nationalnumber'])? $personalInfo['nationalnumber']: '';?>">
                                    </div>
                                    <div class="col-md-6">
                                        <button type="submit" class="btn btn-success submit"
                                                onclick="Joomla.submitbutton('reserve.reserve')">ادامه
                                        </button>
                                    </div>
                                    <input type="hidden" name="jform[me]" value="1">
                                    <input type="hidden" name="task">
                                    <?= JHtml::_('form.token'); ?>
                                </form>

                            </div>
                        </div>
                    </div>
                    <div class="card">
                        <div class="card-header" id="headingTwo">
                            <h5 class="mb-0">
                                <button type="button" style="color: #31bfce" class="btn btn-link collapsed"
                                        data-toggle="collapse"
                                        data-target="#collapseTwo" aria-expanded="false"
                                        aria-controls="collapseTwo">
                                    <strong>نوبت را برای شخص دیگری میخواهم</strong>
                                </button>
                            </h5>
                        </div>
                        <div id="collapseTwo" class="collapse" aria-labelledby="headingTwo"
                             data-parent="#accordion">
                            <div class="card-body">
                                <form action="" method="post" enctype="multipart/form-data">

                                    <div class="form-group col-md-6">
                                        <label for="">نام و نام خانوادگی مراجعه کننده :</label>
                                        <input type="text" name="jform[name2]" class="form-control" value="<?= isset($personalInfo['name2'])? $personalInfo['name2']: '';?>">
                                    </div>
                                    <div class="form-group col-md-6">
                                        <label for="">کد ملی مراجعه کننده :</label>
                                        <input type="text" name="jform[nationalnumber2]" class="form-control" value="<?= isset($personalInfo['nationalnumber2'])? $personalInfo['nationalnumber2']: '';?>">
                                    </div>
                                    <div class="col-md-6">
                                        <button type="submit"
                                                class="btn btn-success submit"
                                                onclick="Joomla.submitbutton('reserve.reserve')">ادامه
                                        </button>
                                    </div>
                                    <input type="hidden" name="jform[other]" value="1">
                                    <input type="hidden" name="task">
                                    <?= JHtml::_('form.token'); ?>
                                </form>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<script>
    jQuery(document).ready(function ($)
    {
        $('.submit').click(function (e){
            e.preventDefault()
            $(this).parents('form').attr('id','adminForm');
            Joomla.submitbutton('reserve.reserve')
        });
    })
</script><!--[/JCBGUI$$$$]-->

