<?php
$form = $this->form;
$form->prepare();
//$form->setAttribute('action', $this->url('common-user', ['action' => 'index']));
$form->setAttribute('method', 'post');
$form->setAttribute('id', 'registration-form');
echo $this->form()->openTag($form);
?>
<section id="main-form" class="padding12top">
    <div class="container">
        <div class="" id="reg_form">
            <h4><a href="javascript:window.history.back();" id="back_but"><i class="fa fa-backward"></i> <?php echo $this->translate('Back'); ?></a></h4>
            <div class="col-sm-12" align="center" id="login_detail">

                <h4><?php echo $this->translate('Sign-up'); ?></h4>

                <div>
                    <?php echo "<font color='red'><strong>$error_msg</strong></font>"; ?>
                </div>

                <div class="col-sm-6" style="float:none;" align="left">

                    <div class="form-group">
                        <span class="col-sm-6"><?php echo $this->translate($form->get('first_name')->getLabel()); ?></span>
                        <div class="col-sm-12">
                            <?php echo $this->formElement($form->get('first_name')); ?>
                            <span class="showerror">
                                <?php echo $this->formElementErrors($form->get('first_name'), ['class' => 'error']); ?>
                            </span>
                        </div>
                    </div>

                    <div class="form-group">
                        <span class="col-sm-6"><?php echo $this->translate($form->get('last_name')->getLabel()); ?></span>
                        <div class="col-sm-12">
                            <?php echo $this->formElement($form->get('last_name')); ?>
                            <span class="showerror">
                                <?php echo $this->formElementErrors($form->get('last_name'), ['class' => 'error']); ?>
                            </span>
                        </div>
                    </div>

                    <!--<div class="form-group">
                        <span class="col-sm-6"><?php //echo $this->translate($form->get('username')->getLabel());  ?></span>
                        <div class="col-sm-12">

                    <?php //echo $this->formElement($form->get('username')); ?>
                            <span class="showerror">
                    <?php //echo $this->formElementErrors($form->get('username'), ['class' => 'error']); ?>
                            </span>

                        </div>
                    </div>-->

                    <div class="form-group">
                        <span class="col-sm-6"><?php echo $this->translate($form->get('email')->getLabel()); ?></span>
                        <div class="col-sm-12">
                            <?php echo $this->formElement($form->get('email')); ?>
                            <span class="showerror">
                                <?php echo $this->formElementErrors($form->get('email'), ['class' => 'error']); ?>
                            </span>
                        </div>
                    </div>

                    <div class="form-group">
                        <span class="col-sm-6"><?php echo $this->translate($form->get('contact_no')->getLabel()); ?></span>
                        <div class="col-sm-12">
                            <div class="col-sm-2">
                                <?php echo $this->formElement($form->get('prefix_contact_no')); ?>
                            </div>
                            <div class="col-sm-10">
                                <?php echo $this->formElement($form->get('contact_no')); ?>
                                <span class="showerror">
                                    <?php echo $this->formElementErrors($form->get('contact_no'), ['class' => 'error']); ?>
                                </span>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <span class="col-sm-6"><?php echo $this->translate($form->get('reference_name')->getLabel()); ?></span>
                        <div class="col-sm-12">
                            <?php echo $this->formElement($form->get('reference_name')); ?>
                            <span class="showerror">
                                <?php echo $this->formElementErrors($form->get('reference_name'), ['class' => 'error']); ?>
                            </span>
                        </div>
                    </div>

                    <div class="form-group">
                        <span class="col-sm-12"><?php echo $this->translate($form->get('password')->getLabel()); ?></span>
                        <div class="col-sm-12">
                            <?php echo $this->formElement($form->get('password')); ?>
                            <span class="showerror">
                                <?php echo $this->formElementErrors($form->get('password'), ['class' => 'error']); ?>
                            </span>
                        </div>
                    </div>

                    <div class="form-group">
                        <span class="col-sm-12">
                            <?php echo $this->translate($form->get('confirm_password')->getLabel()); ?>
                        </span>
                        <div class="col-sm-12">
                            <?php echo $this->formElement($form->get('confirm_password')); ?>
                            <span class="showerror ">
                                <?php echo $this->formElementErrors($form->get('confirm_password'), ['class' => 'error']); ?>
                            </span>
                        </div>
                    </div>

                    <div class="form-group">
                        <span class="col-sm-12">
                            <?php echo $this->translate($form->get('nationality')->getLabel()); ?>
                        </span>
                        <div class="col-sm-12">
                            <?php echo $this->formElement($form->get('nationality')); ?>
                            <?php echo $this->formElement($form->get('nationality_value')); ?>
                            <span class="showerror">
                                <?php echo $this->formElementErrors($form->get('nationality'), ['class' => 'error']); ?>
                            </span>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-12">
                            <label class="booking-check">Accept the Terms and Conditions (Receive Updates & Offers)<span class="mandat_star red_text">*</span>
                                <?php echo $this->formElement($form->get('agreeterms')); ?>
                                <?php echo $this->formElementErrors($form->get('agreeterms'), ['class' => 'error']); ?>
                                <span class="checkmark"></span>
                            </label>

                        </div>
                    </div>



                    <div class="form-group">
                        <div class="col-sm-12">
                            <?php echo $this->formElement($form->get('registration_type')); ?>
                            <?php echo $this->FormElement($form->get('login_detail')); ?>
                        </div>
                    </div><br/>
                </div>
            </div>
        </div>
    </div>
</section>
<?php echo $this->form()->openTag($form); ?>