<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
?>

<?php if( !$this->noForm ): ?>

  <h3>
    <?php echo $this->translate('Sign In or Join'); ?>
  </h3>

  <?php echo $this->form->setAttrib('class', 'global_form_box')->render($this) ?>
  <?php echo $this->translate('%1$sJoin%2$s', '<a href="'.$this->url(array(), "user_signup").'" class="user_signup_link">', '</a>'); ?>

  <?php if( !empty($this->fbUrl) ): ?>

    <script type="text/javascript">
      var openFbLogin = function() {
        Smoothbox.open('<?php echo $this->fbUrl ?>');
      }
      var redirectPostFbLogin = function() {
        window.proxyLocation.href = window.location;
        Smoothbox.close();
      }
    </script>

    <?php // <button class="user_facebook_connect" onclick="openFbLogin();"></button> ?>

  <?php endif; ?>

<?php else: ?>
    
  <h3 style="margin-bottom: 0px;">
    <?php echo $this->htmlLink(array('route' => 'user_login'), $this->translate('Sign In')) ?>
    <?php echo $this->translate('or') ?>
    <?php echo $this->htmlLink(array('route' => 'user_signup'), $this->translate('Join')) ?>
  </h3>

  <?php echo $this->form->setAttrib('class', 'global_form_box no_form')->render($this) ?>
    
<?php endif; ?>
<?php include APPLICATION_PATH .  '/application/modules/User/views/scripts/auth/_loginByOtp.tpl';?>
