<?php /* Smarty version 2.6.22, created on 2016-11-22 20:52:54
         compiled from /data/vhosts/orders.eurojaponautosupply.com/httpdocs/ultimate_support_chat/modules/users/views/add.html */ ?>
<div class="usc_app_page_wrap" style="min-height:600px">

<h1>Add new operator</h1>

<form role="form" method="post" enctype="multipart/form-data" >

    <input class="name_nulled" type="text" name="username"/>
    <input class="name_nulled"  type="password" name="password"/>

    <div class="col-lg-6">
        <div class="box-body">
            <div class="form-group">
                <label>Display name</label><span id="username_ajax_return"></span>
				<?php if (isset ( $this->_tpl_vars['error']['username'] )): ?><span class="rm_ajax_username error_handling"><?php echo $this->_tpl_vars['error']['username']; ?>
</span><?php endif; ?>
                <input type="text" class="form-control" id="username" name="username" value="<?php echo $_POST['username']; ?>
" placeholder="Enter display name" onblur="checkUsername()"  required />
            </div>
			
            <div class="form-group">
                <label>First name</label><?php if (isset ( $this->_tpl_vars['error']['firstname'] )): ?><span class="error_handling ml20"><?php echo $this->_tpl_vars['error']['firstname']; ?>
</span><?php endif; ?>

                <input type="text" class="form-control" id="firstname" name="firstname" value="<?php echo $_POST['firstname']; ?>
" placeholder="Enter first name" required />
            </div>

            <div class="form-group">
                <label>Last name</label><?php if (isset ( $this->_tpl_vars['error']['lastname'] )): ?><span class="error_handling ml20"><?php echo $this->_tpl_vars['error']['lastname']; ?>
</span><?php endif; ?>
                <input type="text" class="form-control" id="lastname" name="lastname" value="<?php echo $_POST['lastname']; ?>
" placeholder="Enter last name" required />
            </div>


            <div class="form-group">
                <label>Email address</label><span id="email_ajax_return"></span>
				<?php if (isset ( $this->_tpl_vars['error']['email'] )): ?><span class="rm_ajax_email error_handling"><?php echo $this->_tpl_vars['error']['email']; ?>
</span><?php endif; ?>
                <input type="email" class="form-control" id="email" name="email" value="<?php echo $_POST['email']; ?>
" placeholder="Enter email" onblur="checkEmail()" required />
            </div>


            <div class="form-group">
                <label>Password</label><?php if (isset ( $this->_tpl_vars['error']['password'] )): ?><span class="error_handling ml20"><?php echo $this->_tpl_vars['error']['password']; ?>
</span><?php endif; ?>
                <input type="password" class="form-control" id="password" name="password" value="<?php echo $_POST['password']; ?>
" placeholder="Enter password" required />
            </div>

            <div class="checkbox">
                <label>
                    <input type="checkbox" id="make_admin" name="role" value="admin" <?php if ($_POST['role'] == 'admin'): ?>checked<?php endif; ?>> Admin
                    <p class="help-block">Can manage operators, departments, settings and widget customization</p>
                </label>
            </div>
        </div>

        <div class="box-footer">
            <button type="submit" name="submit" value="true" class="btn btn-primary">Save</button>
        </div>
    </div>


<div class="col-lg-6">

    <div class="form-group">
        <?php if ($_POST['avatar'] == ''): ?>
        <span id="operator_avatar"><img src="<?php echo $this->_tpl_vars['data_server']; ?>
config/themes/img/avatars/default.png"></span>
        <?php else: ?>
        <span id="operator_avatar"><img src="<?php echo $this->_tpl_vars['data_server']; ?>
<?php echo $_POST['avatar']; ?>
"></span>
        <?php endif; ?>

    </div>


    <div class="form-group">
        <label>Upload avatar</label>


            <input type="file" name="file" id="file" onchange="uploadFile();">
            <input type="hidden" name="selected_avatar" id="selected_avatar" value="">
            <p class="help-block">JPG or PNG (Max: 90px by 90px)</p>

            <button type="button" value="Remove_File" class="btn btn-primary" onclick="remove_avatar();">Remove</button>
            <br/><br/>

            <p id="error_handling"></p>

            <progress id="progressBar" value="0" max="100"></progress>
            <p id="loaded_n_total"></p>

            <p id="status"></p>


    </div>

</div>
</form>

</div>
<script src="<?php echo $this->_tpl_vars['data_server']; ?>
js/users_add.min.js" type="text/javascript"></script>