Location: PHPKode > projects > phpMyOrdering > phpMyOrdering-0.1.7-alpha/phpMyPurchasing-0.1.2-alpha/templates/development/content-options-users.tpl
<!-- manage users template -->
<script type="text/javascript" src="{$template}/scripts/js/functions.users.js" />
<script type="text/javascript">
 {$jsonUsers}
 var $j = jQuery.noConflict();
 $j(document).ready(function(){
  var loading = '<img src="{$templates}/images/loading.gif" width="20" height="20" alt="Loading content..." title="Loading content..." />';
  $j('.sub-form').live('submit', function(){
   $j('#tabsConfig .ui-tabs-panel:visible').html(loading);
   $j.ajax({
    data: $j(this).serialize(),
    type: $j(this).attr('method'),
    url: $j(this).attr('action'),
    success: function(response) {
     $j('#tabsConfig .ui-tabs-panel:visible').html(response);
    }
   });
   return false;
  })
  $j("#autoUsers").autocomplete(users, {
  	minChars: 0,
  	width: 310,
  	matchContains: "word",
  	autoFill: true,
   callBack: queryUsers,
  	formatItem: function(row, i, max) {
  		return i + "/" + max + ": " + row.txtUserName + " :: " + row.txtUserLevel + " :: " + row.txtUserGroup + " :: " + row.txtUserFname + " :: " + row.txtUserLname + " :: " + row.txtUserDepartment + " :: " + row.txtUserPhone + " :: " + row.txtUserEmail;
  	},
  	formatMatch: function(row, i, max) {
  		return row.txtUserName + " :: " + row.txtUserLevel + " :: " + row.txtUserGroup + " :: " + row.txtUserFname + " :: " + row.txtUserLname + " :: " + row.txtUserDepartment + " :: " + row.txtUserPhone + " :: " + row.txtUserEmail;
  	},
  	formatResult: function(row) {
  		return row.txtUserName + " :: " + row.txtUserLevel + " :: " + row.txtUserGroup + " :: " + row.txtUserFname + " :: " + row.txtUserLname + " :: " + row.txtUserDepartment + " :: " + row.txtUserPhone + " :: " + row.txtUserEmail;
  	}
  });
 });
</script>
<form action="{$URL}" method="post" class="sub-form" id="users">
 <fieldset>
  <legend>Manage users&nbsp;
   <a href="javascript:popUp('help/help.html','800','800')" title="Need help?"><img src="{$template}/images/icons/icon-info.png" alt="{$TITLE} Help"></a>&nbsp;
   <a href="formResetPassword.php" class="windowResetPassword" id="windowResetPassword" title="Reset passwords" onclick="Modalbox.show(this.href, {title: this.title, width: 800}); return false;"><img src="{$template}/images/icons/icon-lock.png" title="Reset user passwords" alt="Reset user passwords"></a>
  </legend>
  {$error}
  <div title="Search existing users">
   Existing users&nbsp;&nbsp;
   <input type="text" id="autoUsers" title="Search existing users?" style="width: 30%" value="Search users?" onclick="this.value=''" onblur="if(this.value==''){this.value='Search users?'}">
   <a href="formAdvUserSearch.php" class="windowSearchUser" id="windowSearchUser" title="Search existing users?" onclick="Modalbox.show(this.href, {title: this.title, width: 800}); return false;"><img src="{$template}/images/icons/icon-search.png" title="Search existing users?" alt="Search existing users?"></a><hr />
  </div>
  <div>
   <table border="0" width="100%" cellspacing="5">
    <tr align="left">
     <td width="10%" class="txt" nowrap title="User login name" nowrap><b>Login name:</b></td>
     <td><input type="text" name="txtUserName" id="txtUserName" value="{$txtUserName}" style="width: 100%"></td>
     <td class="copywrite">{$txtUserNameErr}</td>
    </tr>
    <tr>
     <td class="txt" nowrap title="Access level" nowrap><b>Access level:</b></td>
     <td>{$txtUserLevel}</td>
     <td class="copywrite">{$txtUserLevelErr}</td>
    </tr>
    <tr>
     <td class="txt" nowrap title="Group assignment" nowrap><b>Group assignment:</b></td>
     <td>{$txtUserGroup}</td>
     <td class="copywrite">{$txtUserGroupErr}</td>
    </tr>
    <tr>
     <td class="txt" nowrap title="First name" nowrap><b>First name:</b></td>
     <td><input type="text" name="txtUserFname" id="txtUserFname" value="{$txtUserFname}" style="width: 100%"></td>
     <td class="copywrite">{$txtUserFnameErr}</td>
    </tr>
    <tr>
     <td class="txt" nowrap title="Last name" nowrap><b>Last name:</b></td>
     <td><input type="text" name="txtUserLname" id="txtUserLname" value="{$txtUserLname}" style="width: 100%"></td>
     <td class="copywrite">{$txtUserLnameErr}</td>
    </tr>
    <tr>
     <td class="txt" nowrap title="Department information" nowrap><b>Department:</b></td>
     <td>{$txtUserDepartment}</td>
     <td class="copywrite">{$txtUserDepartmentErr}</td>
    </tr>
    <tr>
     <td class="txt" nowrap title="Phone number" nowrap><b>Phone:</b></td>
     <td><input type="text" name="txtUserPhone" id="txtUserPhone" value="{$txtUserPhone}" style="width: 100%"></td>
     <td class="copywrite">{$txtUserPhoneErr}</td>
    </tr>
    <tr>
     <td class="txt" nowrap title="Email" nowrap><b>Email:</b></td>
     <td><input type="text" name="txtUserEmail" id="txtUserEmail" value="{$txtUserEmail}" style="width: 100%"></td>
     <td class="copywrite">{$txtUserEmailErr}</td>
    </tr>
   </table>
  </div>
  <div align="center">
			<input type="hidden" id="cmd" name="cmd" />
   <input type="submit" id="myForm" name="addUser" title="Add new user" value="Add new user" onclick="$j('#cmd').val($j(this).attr('name'))"  />
   <input type="submit" id="myForm" name="editUser" title="Edit user" value="Edit user" onclick="$j('#cmd').val($j(this).attr('name'))"  />
   <input type="submit" id="myForm" name="delUser" title="Delete user" value="Delete user" onclick="$j('#cmd').val($j(this).attr('name'));return confirm('Are you sure you wish to delete the \''+$j('#txtUserName').val()+'\' user?\n\nThis will remove all resource object\npermissions associated with this user')"  />
  </div>
 </fieldset>
</form>
<div style="height: 30px">&nbsp;</div>
<form action="{$URL}" method="post" class="sub-form" name="import" id="import">
 <fieldset>
  <legend>Import users&nbsp;
   <a href="javascript:popUp('help/help.html','800','800')" title="Need help?"><img src="{$template}/images/icons/icon-info.png" alt="{$TITLE} Help"></a>
  </legend>
  {$lerror}
  <div>
   <table border="0" width="100%" cellspacing="5">
    <tr align="left">
     <td class="txt" title="Import users"><b>Use the form below to import users from a configured Active Directory/OpenLDAP setup</b></td>
    </tr>
    <tr align="left">
     <td class="txt" title="Import users">{$importUsers}</td>
    </tr>
   </table>
  </div>
 </fieldset>
</form>
<!-- end manage purchases template -->
Return current item: phpMyOrdering