<?php
  /**
   * User Manager
   *
   * @package Wojo Framework
   * @author wojoscripts.com
   * @copyright 2017
   * @version $Id: _users_new.tpl.php, v1.00 2017-01-08 10:12:05 gewa Exp $
   */
  if (!defined("_WOJO"))
      die('Direct access to this location is not allowed.');
?>
<div class="row horizontal-gutters align-middle">
  <div class="columns">
    <h2><?php echo Lang::$word->USR_NEW;?></h2>
  </div>
  <div class="columns shrink"><a data-action="toggle" data-page="user" class="wojo small primary icon label sAction"><i class="icon question sign"></i></a>
  </div>
</div>
<form method="post" id="wojo_form" name="wojo_form">
  <div class="wojo segment form">
    <div class="wojo fields align-middle">
      <div class="field four wide labeled">
        <label class="content-right mobile-content-left"><?php echo Lang::$word->FNAME;?>
          <i class="icon asterisk"></i></label>
      </div>
      <div class="field">
        <input name="fname" type="text" placeholder="<?php echo Lang::$word->FNAME;?>">
      </div>
    </div>
    <div class="wojo fields align-middle">
      <div class="field four wide labeled">
        <label class="content-right mobile-content-left"><?php echo Lang::$word->LNAME;?>
          <i class="icon asterisk"></i></label>
      </div>
      <div class="field">
        <input name="lname" type="text" placeholder="<?php echo Lang::$word->LNAME;?>">
      </div>
    </div>
    <div class="wojo fields align-middle">
      <div class="field four wide labeled">
        <label class="content-right mobile-content-left"><?php echo Lang::$word->EMAIL;?>
          <i class="icon asterisk"></i></label>
      </div>
      <div class="field">
        <input name="email" type="text" placeholder="<?php echo Lang::$word->EMAIL;?>">
      </div>
    </div>
    <div class="wojo fields align-middle">
      <div class="field four wide labeled">
        <label class="content-right mobile-content-left">
          <?php echo Lang::$word->NEWPASS;?>
          <i class="icon asterisk"></i></label>
      </div>
      <div class="field">
        <div class="wojo input action">
          <input type="text" name="password">
          <button class="wojo icon button" type="button" id="randPass">
          <i class="lock icon"></i>
          </button>
        </div>
      </div>
    </div>
    <div class="wojo fields align-middle">
      <div class="field four wide labeled">
        <label class="content-right mobile-content-left"><?php echo Lang::$word->USR_MEMBERSHIP;?></label>
      </div>
      <div class="field">
        <div class="row align-middle">
          <div class="column">
            <select name="membership_id" class="wojo fluid dropdown selection">
              <option value="0">-/-</option>
              <?php echo Utility::loopOptions($this->mlist, "id", "title");?>
            </select>
          </div>
          <div class="column shrink half-left-padding">
            <div class="wojo small slider checkbox">
              <input name="update_membership" type="checkbox" value="1">
              <label><?php echo Lang::$word->YES;?></label>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="wojo fields align-middle">
      <div class="field four wide labeled">
        <label class="content-right mobile-content-left"><?php echo Lang::$word->USR_EXTEND;?></label>
      </div>
      <div class="field">
        <div class="row align-middle">
          <div class="column">
            <div class="wojo fluid calendar left icon input" data-datepicker="true">
              <input name="mem_expire" type="text" placeholder="<?php echo Lang::$word->TO;?>">
              <i class="icon date"></i>
            </div>
          </div>
          <div class="column shrink half-left-padding">
            <div class="wojo small slider checkbox">
              <input name="extend_membership" type="checkbox" value="1">
              <label><?php echo Lang::$word->YES;?></label>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="wojo basic attached segment">
      <h6 class="wojo secondary text"><?php echo Lang::$word->CF_TITLE;?></h6>
      <div class="wojo space divider"></div>
      <?php echo $this->custom_fields;?></div>
    <a class="wojo left floating tiny icon button" data-trigger="#uAddress" data-type="slideDown" data-velocity="true" ><i class="icon chevron down"></i></a>
    <div class="wojo basic attached segment hide-all" id="uAddress">
      <h6 class="wojo secondary text"><?php echo Lang::$word->USR_ADDRESS;?></h6>
      <div class="wojo fields align-middle">
        <div class="field four wide labeled">
          <label class="content-right mobile-content-left"><?php echo Lang::$word->ADDRESS;?></label>
        </div>
        <div class="field">
          <input type="text" placeholder="<?php echo Lang::$word->ADDRESS;?>"  name="address">
        </div>
      </div>
      <div class="wojo fields align-middle">
        <div class="field four wide labeled">
          <label class="content-right mobile-content-left"><?php echo Lang::$word->CITY;?></label>
        </div>
        <div class="field">
          <input type="text" placeholder="<?php echo Lang::$word->CITY;?>" name="city">
        </div>
      </div>
      <div class="wojo fields align-middle">
        <div class="field four wide labeled">
          <label class="content-right mobile-content-left"><?php echo Lang::$word->STATE;?></label>
        </div>
        <div class="field">
          <input type="text" placeholder="<?php echo Lang::$word->STATE;?>" name="state">
        </div>
      </div>
      <div class="wojo fields align-middle">
        <div class="basic field four wide labeled">
          <label class="content-right mobile-content-left"><?php echo Lang::$word->COUNTRY;?>/<?php echo Lang::$word->ZIP;?></label>
        </div>
        <div class="basic field">
          <div class="wojo action input">
            <input type="text" placeholder="<?php echo Lang::$word->ZIP;?>" name="zip">
            <select class="wojo search selection dropdown" name="country">
              <?php echo Utility::loopOptions($this->clist, "abbr", "name");?>
            </select>
          </div>
        </div>
      </div>
    </div>
    <div class="wojo big space divider"></div>
    <div class="wojo fields">
      <div class="field">
        <label><?php echo Lang::$word->STATUS;?></label>
        <div class="wojo inline fields">
          <div class="wojo checkbox radio field">
            <input name="active" type="radio" value="y" checked="checked">
            <label><?php echo Lang::$word->ACTIVE;?></label>
          </div>
          <div class="wojo checkbox radio field">
            <input name="active" type="radio" value="n">
            <label><?php echo Lang::$word->INACTIVE;?></label>
          </div>
          <div class="wojo checkbox radio field">
            <input name="active" type="radio" value="t">
            <label><?php echo Lang::$word->PENDING;?></label>
          </div>
          <div class="wojo checkbox radio field">
            <input name="active" type="radio" value="b">
            <label><?php echo Lang::$word->BANNED;?></label>
          </div>
        </div>
      </div>
    </div>
    <div class="wojo fields">
      <div class="field">
        <label><?php echo Lang::$word->USR_TYPE;?></label>
        <div class="wojo inline fields">
          <div class="wojo checkbox radio field">
            <input name="type" type="radio" value="staff">
            <label><?php echo Lang::$word->STAFF;?></label>
          </div>
          <div class="wojo checkbox radio field">
            <input name="type" type="radio" value="editor">
            <label><?php echo Lang::$word->EDITOR;?></label>
          </div>
          <div class="wojo checkbox radio field">
            <input name="type" type="radio" value="member" checked="checked">
            <label><?php echo Lang::$word->MEMBER;?></label>
          </div>
        </div>
      </div>
      <div class="field">
        <label><?php echo Lang::$word->USR_NLETTER;?></label>
        <div class="wojo inline fields">
          <div class="wojo checkbox radio field">
            <input name="newsletter" type="radio" value="1">
            <label><?php echo Lang::$word->YES;?></label>
          </div>
          <div class="wojo checkbox radio field">
            <input name="newsletter" type="radio" value="0" checked="checked">
            <label><?php echo Lang::$word->NO;?></label>
          </div>
        </div>
      </div>
      <div class="field">
        <label><?php echo Lang::$word->USR_NOTIFY;?></label>
        <div class="wojo inline fields">
          <div class="wojo checkbox field">
            <input name="notify" type="checkbox" value="1">
            <label><?php echo Lang::$word->YES;?></label>
          </div>
        </div>
      </div>
    </div>
    <textarea placeholder="<?php echo Lang::$word->USR_NOTE;?>" name="notes"></textarea>
  </div>
  <div class="content-center">
    <a href="<?php echo Url::url("/admin/users");?>" class="wojo small basic button"><?php echo Lang::$word->CANCEL;?></a>
    <button type="button" data-action="processUser" name="dosubmit" class="wojo primary button"><?php echo Lang::$word->USR_CREATE;?></button>
  </div>
</form>