| 1 | {*
|
| 2 | Copyright (C) 2009, All Rights Reserved.
|
| 3 |
|
| 4 | This file is part of RPInventory.
|
| 5 |
|
| 6 | RPInventory is free software: you can redistribute it and/or modify
|
| 7 | it under the terms of the GNU General Public License as published by
|
| 8 | the Free Software Foundation, either version 3 of the License, or
|
| 9 | (at your option) any later version.
|
| 10 |
|
| 11 | RPInventory is distributed in the hope that it will be useful,
|
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 14 | GNU General Public License for more details.
|
| 15 |
|
| 16 | You should have received a copy of the GNU General Public License
|
| 17 | along with RPInventory. If not, see <http://www.gnu.org/licenses/>.
|
| 18 |
|
| 19 | *}
|
| 20 |
|
| 21 | {include file=notificationArea.tpl}
|
| 22 | <form name="storeTransaction" id="storeTransaction" action="updateClubRecord.php" onsubmit="return ValidateForm()" METHOD="post">
|
| 23 | <div class="ui-widget-smaller ui-widget-content ui-corner-all mainForm">
|
| 24 | <h3 class="ui-widget-header ui-corner-all">Edit Club</h3>
|
| 25 |
|
| 26 |
|
| 27 | <table width="500">
|
| 28 | <input type="hidden" name="club_id" size="40" value="{$club->club_id}" id="club_id" class="validate" />
|
| 29 |
|
| 30 | <tr>
|
| 31 | <td>Club Name: </td>
|
| 32 | <td><input type="text" name="club_name" size="40" value="{$club->club_name}" id="club_name" class="validate"></td>
|
| 33 | </tr>
|
| 34 |
|
| 35 | <tr>
|
| 36 | <td valign="top">Users: </td>
|
| 37 | <td>
|
| 38 | <table class="itemsTable userTable ui-widget ui-corner-all" cellspacing="0">
|
| 39 | {section name=userLoop loop=$users}
|
| 40 | <tr {cycle values=" class=\"alt\","}>
|
| 41 | <td>{$users[userLoop]->username}</td>
|
| 42 | <td>
|
| 43 | <input id="userPriv" type="radio" onchange="alterUserClubAccess({$users[userLoop]->user_id}, 1, {$club_id})" name="curaccess-{$users[userLoop]->user_id}" {if $users[userLoop]->access_level == 1} checked="checked"{/if}/><label for="userPriv">User</label>
|
| 44 | <input id="adminPriv" type="radio" onchange="alterUserClubAccess({$users[userLoop]->user_id}, 2, {$club_id})" name="curaccess-{$users[userLoop]->user_id}" {if $users[userLoop]->access_level == 2} checked="checked" {/if}/><label for="adminPriv">Admin</label>
|
| 45 | </td>
|
| 46 | <td>
|
| 47 | <a href="deleteUserClub.php?club_id={$club->club_id}&user_id={$users[userLoop]->user_id}" class="ui-state-default ui-corner-all button">
|
| 48 | <span class="ui-icon ui-icon-circle-minus"></span>
|
| 49 | <span class="buttonText">Remove user</span>
|
| 50 | </a>
|
| 51 | </tr>
|
| 52 | {/section}
|
| 53 | </table>
|
| 54 | </td>
|
| 55 | </tr>
|
| 56 | <tr>
|
| 57 | <td/>
|
| 58 | <td>
|
| 59 | <p id="responseMessage"></p>
|
| 60 | <p style="width: 100px" onclick="newUserClubShow();" class="ui-state-default ui-corner-all button">
|
| 61 | <span class="ui-icon ui-icon-circle-arrow-s"></span>
|
| 62 | <span class="buttonText">Add new user</span>
|
| 63 | </p>
|
| 64 | </td>
|
| 65 | </tr>
|
| 66 |
|
| 67 | <tr id="newUser" style="display: none">
|
| 68 | <td/>
|
| 69 | <td>
|
| 70 | <select id="newUserSelect">
|
| 71 | {section name=usersLoop loop=$newUsers}
|
| 72 | <option value="{$newUsers[usersLoop]->user_id}">{$newUsers[usersLoop]->username}</option>
|
| 73 | {/section}
|
| 74 | </select>
|
| 75 | <br />
|
| 76 | <input type="radio" name="access" id="access1" value="1" checked="checked" /><label for="access1">User </label><input type="radio" name="access" id="access2" value="2" /><label for="access2">Admin</label>
|
| 77 | <p style="width: 100px" onclick="addUserToClub({$club->club_id});" class="ui-state-default ui-corner-all button">
|
| 78 | <span class="ui-icon ui-icon-circle-plus"></span>
|
| 79 | <span class="buttonText">Save new user</span>
|
| 80 | </p>
|
| 81 |
|
| 82 | </td>
|
| 83 | </tr>
|
| 84 |
|
| 85 | </table>
|
| 86 |
|
| 87 | <br>
|
| 88 | <a class="ui-corner-all ui-state-default button" onclick="formSubmit('storeTransaction')">
|
| 89 | <span class="ui-icon ui-icon-circle-check"></span>
|
| 90 | <span class="buttonText">Update Club</span>
|
| 91 | </a>
|
| 92 |
|
| 93 | <a href="manageClubs.php" class="ui-corner-all ui-state-default button">
|
| 94 | <span class="ui-icon ui-icon-circle-arrow-w"></span>
|
| 95 | <span class="buttonText">Back to all clubs</span>
|
| 96 | </a>
|
| 97 | </div>
|
| 98 | <form>
|