<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
?>
<?php echo $this->form->render($this); ?>
<script type="text/javascript">
  en4.core.runonce.add(function() {
    <?php if(empty($this->emailErrors) && $this->emailverify && empty($_POST['code']) && !empty($_POST['email'])) { ?>
      scriptJquery('#code-wrapper').show();
      scriptJquery('#code-label').children('label').removeClass('optional').addClass('requried');
      scriptJquery('#verification_message-wrapper').show();
      scriptJquery('#verificationmessage').html('<?php echo $this->translate("We\'ve sent a verification code in an email to %s. Enter the verification code to proceed further.", $_POST['email']); ?>');
    <?php } else if(empty($this->emailErrors) && $this->emailverify && !empty($_POST['code']) && !empty($_POST['email'])) { ?>
      scriptJquery('#code-wrapper').show();
      scriptJquery('#code-label').children('label').removeClass('optional').addClass('requried');
      scriptJquery('#verification_message-wrapper').show();
      scriptJquery('#verificationmessage').html('<?php echo $this->translate("We've sent a verification code in an email to %s. Enter the verification code to proceed further.", $_POST['email']); ?>');
    <?php } else { ?>
      scriptJquery('#code-wrapper').hide();
      scriptJquery('#verification_message-wrapper').hide();
    <?php } ?>
  });
</script>
