Subversion Repositories SmartDukaan

Rev

Rev 33105 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<section class="wrapper">
    <div class="row">
        <div class="col-lg-12">
            <h3 class="page-header"><i class="icon_document_alt"></i>USER</h3>
            <ol class="breadcrumb">
                <li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
                <li><i class="icon_document_alt"></i>Create Auth User</li>
            </ol>
        </div>
    </div>
    <form id="create-scheme-form">
        <div class="row">

            <div class="col-lg-2 form-group">
                <input placeholder="Employee Code" id="authUserEmployeeCode" name="authUserEmployeeCode" type="text"
                       value="" class="form-control input-sm">
            </div>
            <div class="col-lg-2 form-group">
                <input placeholder="First Name" id="authUserFirstName" name="authUserFirstName" type="text" value=""
                       class="form-control input-sm">
            </div>
            <div class="col-lg-2 form-group">
                <input placeholder="Last Name" id="authUserLastName" name="authUserLastName" type="text" value=""
                       class="form-control input-sm">
            </div>
            <div class="col-lg-2 form-group">
                <input placeholder="Email" id="authUserEmail" name="authUserEmail" type="email" value=""
                       class="form-control input-sm">
            </div>
            <div class="col-lg-2 form-group">
                <input placeholder="Mobile Number" id="authUserMobileNumber" name="authUserMobileNumber" type="Number"
                       value="" class="form-control input-sm" pattern="\d{3}[\-]\d{3}[\-]\d{4}" required>
            </div>
            <div class="col-lg-2 form-group">
                <input placeholder="Gmail Id" id="authUserGmailId" name="authUserGmailId" type="text" value=""
                       class="form-control input-sm" required>
            </div>
            <div class="col-lg-2 form-group">
                <input placeholder="Image" id="authUserImage" name="authUserImage" type="text" value=""
                       class="form-control input-sm">
            </div>
        </div>
        <div class="row">
            <div class="col-lg-3">
                <input class="btn btn-primary create-auth-user" type="button" value="Create Auth User">
            </div>
        </div>
    </form>
    <br><br>
    <div id="auth-user-table">
        <div class="row">
            <div class="col-lg-12">
                <table class="table table-striped table-advance table-hover" id="authTable">
                    <thead>
                    <tr>
                        <th>Id</th>
                        <th>Employee Code</th>
                        <th>First Name</th>
                        <th>Last Name</th>
                        <th>Email</th>
                        <th>Mobile Number</th>
                        <th>Gmail Id</th>
                        <th>Image</th>
                        <th>Reporting Manager</th>
                        <th>Created Date</th>
                        <th>Reset Password</th>
                        <th>Remove</th>


                    </tr>
                    </thead>
                    <tbody>

                        #if(!$authUsers.isEmpty())
                            #foreach( $authUser in $authUsers )
                            <tr>
                                <td>$authUser.getId()</td>
                                <td>$authUser.getEmployeeCode()</td>
                                <td>$authUser.getFirstName()</td>
                                <td>$authUser.getLastName()</td>
                                <td>$authUser.getEmailId()</td>
                                <td>$authUser.getMobileNumber()</td>
                                <td>#if($authUser.getGmailId())
                                    <span>$authUser.getGmailId()</span>
                                    <button class="mk_gmail_edit btn btn-primary" data-id="$authUser.getEmailId()">
                                        Update
                                    </button>
                                #else
                                    <span></span>
                                    <button class="mk_gmail_edit btn btn-primary" data-id="$authUser.getEmailId()">Add
                                    </button>
                                #end
                                </td>

                                <td>

                                    #if($authUser.getImageUrl())
                                        <span> $authUser.getImageUrl() </span>
                                        <button class="img_edit btn btn-primary" data-id="$authUser.getEmailId()">Edit
                                        </button>
                                    #else
                                        <span></span>
                                        <button class="img_edit btn btn-primary" data-id="$authUser.getEmailId()">Edit
                                        </button>
                                    #end

                                </td>

                                <td>
                                    <select class="form-control input-sm" id="auth-users" name="auth-users"
                                            placeholder="Authusers">
                                        #if($authUser.getManagerId()==0)
                                            <option value="" disabled>Choose Manager</option>
                                        #end
                                        #foreach($activeAuthUser in $activeAuthUsers)
                                            <option value="$activeAuthUser.getId()"
                                                #if($authUser.getManagerId()==$activeAuthUser.getId())
                                                    selected
                                                #end
                                            >$activeAuthUser.getFullName()</option>
                                        #end
                                    </select>
                                    <button class="btn btn-primary add-manager" data-id="$authUser.getId()">Add
                                    </button>
                                </td>

                                <td>$authUser.getFormattedCreateTimestamp()</td>
                                <td>
                                    <button class="btn btn-primary reset-password" data-id="$authUser.getEmailId()">
                                        Reset
                                    </button>
                                </td>
                                <td>
                                    <button class="btn btn-primary remove-user" data-id="$authUser.getId()">Remove
                                    </button>
                                </td>

                            </tr>
                            #end
                        #else
                        <tr>
                            <td colspan="12" style="text-align:center;">NO MATCHING DATA FOUND FOR CRITERIA</td>
                        </tr>
                        #end
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</section>
<div id="auth-user-details-container" style="background:white;background-color:white;">
</div>
<script type="text/javascript">
    $(document).ready(function () {
        var dtable = $('#authTable').DataTable({

            pageLength: 10,
            paging: true,
            scrollCollapse: true,
            fixedHeader: true,
            columnDefs: [
                {
                    targets: [7],
                    searchable: false
                }
            ]
        });
    });
</script>