<?php

do_action('dolphy_access_header');

$signinUrl = wp_login_url();
?>

<div class="content signup" id="signup-page">
  <?php if (!get_option('users_can_register')) { ?>
    <div class="dol-text-center dol-text-italic dol-m-b-50">
      <h2>Registration is currently not allowed</h2>
    </div>
  <?php } else { ?>
    <fieldset v-bind:disabled="loading">
      <form name="SignUp" v-on:submit="submit">
        <div class="field-group">
          <div class="field-group-icon">
            <i class="fa fa-fw fa-user"></i>
          </div>
          <input type="text" name="email" v-model="form.email" placeholder="Email Address" autocomplete="email">
        </div>

        <div class="field-group">
          <div class="field-group-icon">
            <i class="fa fa-fw fa-user"></i>
          </div>
          <input type="text" name="username" v-model="form.username" placeholder="Username" autocomplete="username">
        </div>

        <div class="field-group">
          <div class="field-group-icon">
            <i class="fa fa-fw fa-lock"></i>
          </div>
          <input type="password" name="password" v-model="form.password" placeholder="Password" autocomplete="new-password">
        </div>

        <div class="field-group">
          <div class="field-group-icon">
            <i class="fa fa-fw fa-lock"></i>
          </div>
          <input type="password" name="confirmPassword" v-model="confirmPassword" placeholder="Confirm Password" autocomplete="new-password">
        </div>

        <div class="form-group">
          <button type="submit">Create Account</button>
        </div>
      </form>
    </fieldset>
  <?php } ?>

  <div class="form-group mini-text dol-text-center">
    Already a member? <a href="<?php echo esc_url($signinUrl); ?>">SIGN IN</a>
  </div>

  <dolphy-dialog-placeholder></dolphy-dialog-placeholder>
</div>

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