<?php
/*
Theme designed by daynaweb
Buy this theme only from https://www.zhaket.com/web/gajcommerce-wordpress-theme
Author: https://daynaweb.ir
*/
if (!defined('ABSPATH')) {
    exit;
}
?>
<?php /*Template Name: صفحه ثبت نام - گاج کامرس */ ?>
<?php get_header(); ?>
  <div class="container">
    <div class="row justify-content-center">
      <div class="col-12 col-md-8 col-lg-6 col-xl-5">

  <div class="tab-content seperate-gc-forms">
    <?php wc_print_notices(); ?>
    <div class="tab-pane fade show active" id="customer-gc" role="tabpanel" aria-labelledby="home-tab">
      <?php if (!is_user_logged_in()) { ?>

      <div class="seperate-gc-forsm-title text-center">
        <h2>ثبت‌نام در <?php echo get_bloginfo('title') ?></h2>
      </div>

    <?php if (is_plugin_active('digits/digit.php')) {
      echo '<div class="text-center alert alert-primary">';
      echo do_shortcode('[dm-signup-modal]');
      echo '</div>';
    } else { ?>

      <?php

      do_action( 'woocommerce_before_customer_login_form' );

      ?>
         <form method="post" class="woocommerce-form woocommerce-form-register register" <?php do_action( 'woocommerce_register_form_tag' ); ?> >

            <?php do_action( 'woocommerce_register_form_start' ); ?>

            <?php if ( 'no' === get_option( 'woocommerce_registration_generate_username' ) ) : ?>

               <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide position-relative">
                 <span class="gc-textbox-icon">
                                                         <svg xmlns="http://www.w3.org/2000/svg" width="15" height="18" viewBox="0 0 18 21">
                                                             <defs>
                                                                 <style>
                                                                     .cls-11 {
                                                                         fill: #ccc;
                                                                         fill-rule: evenodd;
                                                                     }
                                                                 </style>
                                                             </defs>
                                                             <path class="cls-11" d="M1458.83,611a8.539,8.539,0,0,0,.16-1.609,9,9,0,0,0-17.99,0,8.539,8.539,0,0,0,.16,1.609h17.67Zm-4.37-16.685A4.468,4.468,0,1,1,1450,590,4.391,4.391,0,0,1,1454.46,594.31Z" transform="translate(-1441 -590)"></path>
                                                         </svg>
                                                     </span>
                  <input type="text" class="woocommerce-Input woocommerce-Input--text input-text" placeholder="نام کاربری" name="username" id="reg_username" autocomplete="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( wp_unslash( $_POST['username'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?>
               </p>

            <?php endif; ?>

            <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide position-relative">
              <span class="gc-textbox-icon">
                                                      <svg xmlns="http://www.w3.org/2000/svg" width="15" height="18" viewBox="0 0 18 21">
                                                          <defs>
                                                              <style>
                                                                  .cls-11 {
                                                                      fill: #ccc;
                                                                      fill-rule: evenodd;
                                                                  }
                                                              </style>
                                                          </defs>
                                                          <path class="cls-11" d="M1458.83,611a8.539,8.539,0,0,0,.16-1.609,9,9,0,0,0-17.99,0,8.539,8.539,0,0,0,.16,1.609h17.67Zm-4.37-16.685A4.468,4.468,0,1,1,1450,590,4.391,4.391,0,0,1,1454.46,594.31Z" transform="translate(-1441 -590)"></path>
                                                      </svg>
                                                  </span>
               <input type="email" class="woocommerce-Input woocommerce-Input--text input-text" placeholder="ایمیل معتبر" name="email" id="reg_email" autocomplete="email" value="<?php echo ( ! empty( $_POST['email'] ) ) ? esc_attr( wp_unslash( $_POST['email'] ) ) : ''; ?>" /><?php // @codingStandardsIgnoreLine ?>
            </p>

            <?php if ( 'no' === get_option( 'woocommerce_registration_generate_password' ) ) : ?>

               <p class="woocommerce-form-row woocommerce-form-row--wide form-row form-row-wide position-relative">
                 <span class="gc-textbox-icon">
                                               <svg xmlns="http://www.w3.org/2000/svg" width="15" height="20" viewBox="0 0 18 23">
                                                   <defs>
                                                       <style>
                                                           .cls-11 {
                                                               fill: #ccc;
                                                               fill-rule: evenodd;
                                                           }
                                                       </style>
                                                   </defs>
                                                   <path class="cls-11" d="M1457.81,690.168H1457v-3.5a7.023,7.023,0,0,0-14.03,0v3.5h-0.8a1.088,1.088,0,0,0-1.18.961v10.92a1.088,1.088,0,0,0,1.18.961h15.64a1.088,1.088,0,0,0,1.18-.961v-10.92A1.088,1.088,0,0,0,1457.81,690.168Zm-4.51,0h-6.62v-3.5a3.314,3.314,0,0,1,6.62,0v3.5Z" transform="translate(-1441 -680)"></path>
                                               </svg>
                                           </span>
                  <input type="password" class="woocommerce-Input woocommerce-Input--text input-text" placeholder="رمز عبور" name="password" id="reg_password" autocomplete="new-password" />
               </p>

            <?php else : ?>

               <p><?php esc_html_e( 'A password will be sent to your email address.', 'woocommerce' ); ?></p>

            <?php endif; ?>

            <?php do_action( 'woocommerce_register_form' ); ?>

            <p class="woocommerce-FormRow form-row">
               <?php wp_nonce_field( 'woocommerce-register', 'woocommerce-register-nonce' ); ?>
               <button type="submit" class="woocommerce-Button woocommerce-button button woocommerce-form-register__submit" name="register" value="<?php esc_attr_e( 'Register', 'woocommerce' ); ?>"><?php esc_html_e( 'Register', 'woocommerce' ); ?></button>
            </p>

            <?php do_action( 'woocommerce_register_form_end' ); ?>

         </form>

        <?php $gcloginpageurl = ot_get_option( 'gcloginpageurl', false );
         if ( $gcloginpageurl ) { ?>
         <div class="arent-you-gc text-center">
           <p class="m-0">قبلا ثبت‌نام کرده‌اید؟ <a href="<?php echo get_home_url() . '/' . $gcloginpageurl; ?>">ورود به <?php echo get_bloginfo('title'); ?></a></p>
         </div>
        <?php } ?>

       <?php } } else { ?>
         <p class="text-center">شما وارد سایت شده‌اید!</p>
      <?php } ?>
    </div>

<?php if( class_exists( 'WeDevs_Dokan' ) ) { ?>
    <div class="tab-pane fade" id="vendor-gc" role="tabpanel" aria-labelledby="profile-tab">
      <?php echo do_shortcode('[dokan-vendor-registration]') ?>
    </div>
<?php } ?>


  </div>
      </div>
    </div>
  </div>
<?php get_footer(); ?>
