[795] | 1 | <script language="javascript1.2" src="workflow/js/jscode/participants.js"></script> |
---|
| 2 | <div style="color:red; text-align:center">{message}</div> |
---|
| 3 | <div> |
---|
| 4 | <div> |
---|
| 5 | {proc_bar} |
---|
| 6 | </div> |
---|
| 7 | <div> |
---|
| 8 | {errors} |
---|
| 9 | </div> |
---|
| 10 | </div> |
---|
| 11 | |
---|
| 12 | <form action="{form_action_adminroles}" method="post"> |
---|
| 13 | <input type="hidden" name="p_id" value="{p_id}" /> |
---|
| 14 | <input type="hidden" name="role_id" value="{role_info_role_id}" /> |
---|
| 15 | <input type="hidden" name="sort_mode" value="{sort_mode}" /> |
---|
| 16 | <input type="hidden" name="sort_mode2" value="{sort_mode2}" /> |
---|
| 17 | <input type="hidden" name="find" value="{find}" /> |
---|
| 18 | <input type="hidden" name="start" value="{start}" /> |
---|
| 19 | <table style="border: 1px solid black;width:100%; margin-bottom:10px"> |
---|
| 20 | <tr class="th"> |
---|
| 21 | <td colspan="2" style="font-size: 120%; font-weight:bold"> |
---|
| 22 | {lang_Add_or_edit_a_role} |
---|
| 23 | </td> |
---|
| 24 | </tr> |
---|
| 25 | <tr class="row_on"> |
---|
| 26 | <td>{lang_Name}</td> |
---|
| 27 | <td><input type="text" name="name" value="{role_info_name}" /></td> |
---|
| 28 | </tr> |
---|
| 29 | <tr class="row_off"> |
---|
| 30 | <td>{lang_Description}</td> |
---|
| 31 | <td><textarea name="description" rows="4" cols="60">{role_info_description}</textarea></td> |
---|
| 32 | </tr> |
---|
| 33 | <tr class="th"> |
---|
| 34 | <td colspan="2"> |
---|
| 35 | <table cellpadding="0" cellspacing="0" width="100%"> |
---|
| 36 | <tr> |
---|
| 37 | <td style="text-align: left; font-weight:bold;"><input type="submit" name="save" value="{lang_save}" /> </td> |
---|
| 38 | <td style="text-align: right; font-weight:bold;"> <input type="submit" name="new_role" value="{lang_New}" /></td> |
---|
| 39 | </tr> |
---|
| 40 | </table> |
---|
| 41 | </td> |
---|
| 42 | </tr> |
---|
| 43 | </table> |
---|
| 44 | </form> |
---|
| 45 | |
---|
| 46 | <form action="{form_action_adminroles}" method="post"> |
---|
| 47 | <input type="hidden" name="sort_mode" value="{sort_mode}" /> |
---|
| 48 | <input type="hidden" name="p_id" value="{p_id}" /> |
---|
| 49 | <input type="hidden" name="role_id" value="{info_role_id}" /> |
---|
| 50 | <input type="hidden" name="sort_mode" value="{sort_mode}" /> |
---|
| 51 | <input type="hidden" name="sort_mode2" value="{sort_mode2}" /> |
---|
| 52 | <input type="hidden" name="find" value="{find}" /> |
---|
| 53 | <input type="hidden" name="start" value="{start}" /> |
---|
| 54 | <table style="border: 1px solid black;width:100%; margin-bottom:10px"> |
---|
| 55 | <tr class="th"> |
---|
| 56 | <td colspan="3" style="font-size: 120%; font-weight: bold;"> |
---|
| 57 | {lang_Process_roles} |
---|
| 58 | </td> |
---|
| 59 | </tr> |
---|
| 60 | <tr class="th"> |
---|
| 61 | <td>{lang_Name}</td> |
---|
| 62 | <td>{lang_Description}</td> |
---|
| 63 | <td width="1%"> </td> |
---|
| 64 | </tr> |
---|
| 65 | <!-- BEGIN block_process_roles_list --> |
---|
| 66 | <tr bgcolor="{color_line}"> |
---|
| 67 | <td> |
---|
| 68 | <a href="{all_roles_href}">{all_roles_name}</a> |
---|
| 69 | </td> |
---|
| 70 | <td> |
---|
| 71 | {all_roles_description} |
---|
| 72 | </td> |
---|
| 73 | <td> |
---|
| 74 | <input type="checkbox" name="role[{all_roles_role_id}]" /> |
---|
| 75 | </td> |
---|
| 76 | </tr> |
---|
| 77 | <!-- END block_process_roles_list --> |
---|
| 78 | <tr class="th"> |
---|
| 79 | <td colspan="3" align="right"> |
---|
| 80 | <input type="submit" name="delete_roles" value="{lang_delete_selected}" /> |
---|
| 81 | </td> |
---|
| 82 | </tr> |
---|
| 83 | </table> |
---|
| 84 | </form> |
---|
| 85 | |
---|
| 86 | <!-- BEGIN block_map_roles --> |
---|
| 87 | <form method="post" action="{form_action_adminroles}"> |
---|
| 88 | <input type="hidden" name="p_id" value="{p_id}" /> |
---|
| 89 | <input type="hidden" name="start" value="{start}" /> |
---|
| 90 | <input type="hidden" name="sort_mode" value="{sort_mode}" /> |
---|
| 91 | <input type="hidden" name="sort_mode2" value="{sort_mode2}" /> |
---|
| 92 | <input type="hidden" name="search_str" value="{search_str}" /> |
---|
| 93 | <input type="hidden" name="save_map" value="{lang_map}" /> |
---|
| 94 | <table style="border: 1px solid black;width:100%; margin-bottom:10px"> |
---|
| 95 | <tr class="th"> |
---|
| 96 | <td colspan="2" style="font-size: 120%; font-weight:bold"> |
---|
| 97 | {lang_Map_users/groups_to_roles} |
---|
| 98 | </td> |
---|
| 99 | </tr> |
---|
| 100 | <tr class="th"> |
---|
| 101 | <td width="50%" align="center"> |
---|
| 102 | {lang_Roles} |
---|
| 103 | </td> |
---|
| 104 | <td width="50%" align="center"> |
---|
| 105 | {lang_Users/Groups} |
---|
| 106 | </td> |
---|
| 107 | </tr> |
---|
| 108 | <tr> |
---|
| 109 | <td align="center" valign=top> |
---|
| 110 | <select name="role[]" size=10 style="width:250px;height:200px;" id='role_list'> |
---|
| 111 | <!-- BEGIN block_select_roles --> |
---|
| 112 | <option value="{select_role_id}">{select_role_name}</option> |
---|
| 113 | <!-- END block_select_roles --> |
---|
| 114 | </select> |
---|
| 115 | </td> |
---|
| 116 | <td align="center" valign=top> |
---|
| 117 | <table border=0> |
---|
| 118 | <tr><td> |
---|
| 119 | <select name="user[]" multiple="multiple" style="width:250px;height:200px" id="user_list"> |
---|
| 120 | <!-- BEGIN block_select_users --> |
---|
| 121 | <!-- <option value="{account_id}">{account_name}</option> --> |
---|
| 122 | <!-- END block_select_users --> |
---|
| 123 | </select> |
---|
| 124 | </td><td valign=center align=center> |
---|
| 125 | <a href='javascript:void(0)' onclick="openParticipants('user_list', 'entities=ug&usePreffix=1');"><img border=0 src={src_img_add_users}></a> |
---|
| 126 | <br> |
---|
| 127 | <a href='javascript:void(0)' onclick="openParticipants('user_list', 'entities=ug&usePreffix=1');">{lang_Add}</a> |
---|
| 128 | <br><br> |
---|
| 129 | <a href="javascript:void(0)" onclick="participantsRemoveUser(document.getElementById('user_list'));"><img border=0 src={src_img_del_users}></a> |
---|
| 130 | <br> |
---|
| 131 | <a href='javascript:void(0)' onclick="participantsRemoveUser(document.getElementById('user_list'));">{lang_Remove}</a> |
---|
| 132 | <br><br> |
---|
| 133 | </td></tr> |
---|
| 134 | </table> |
---|
| 135 | </td> |
---|
| 136 | </tr> |
---|
| 137 | <tr class="th"> |
---|
| 138 | <td colspan="2" style="text-align:center;" class="formcolor"> |
---|
| 139 | <input type="button" onclick="mapUsers(this.form);" value="{lang_map}" /> |
---|
| 140 | </td> |
---|
| 141 | </tr> |
---|
| 142 | </table> |
---|
| 143 | </form> |
---|
| 144 | <!-- END block_map_roles --> |
---|
| 145 | |
---|
| 146 | <form action="{form_action_adminroles}" method="post"> |
---|
| 147 | <input type="hidden" name="p_id" value="{p_id}" /> |
---|
| 148 | <input type="hidden" name="start" value="{start}" /> |
---|
| 149 | <input type="hidden" name="find" value="{find}" /> |
---|
| 150 | <input type="hidden" name="sort_mode" value="{sort_mode}" /> |
---|
| 151 | <input type="hidden" name="sort_mode2" value="{sort_mode2}" /> |
---|
| 152 | <table style="border: 1px solid black;width:100%;"> |
---|
| 153 | <tr class="th"> |
---|
| 154 | <td colspan="3" style="font-size: 120%; font-weight:bold"> |
---|
| 155 | {lang_List_of_mappings} |
---|
| 156 | </td> |
---|
| 157 | </tr> |
---|
| 158 | <tr class="th"> |
---|
| 159 | <td width="50%">{lang_Role}</td> |
---|
| 160 | <td width="49%">{lang_User/Group}</td> |
---|
| 161 | <td width="1%"> </td> |
---|
| 162 | </tr> |
---|
| 163 | <!-- BEGIN block_list_mappings --> |
---|
| 164 | <tr bgcolor="{color_line}"> |
---|
| 165 | <td> |
---|
| 166 | {map_role_name} |
---|
| 167 | </td> |
---|
| 168 | <td> |
---|
| 169 | {map_user_name} |
---|
| 170 | </td> |
---|
| 171 | <td> |
---|
| 172 | <input type="checkbox" name="map[{map_user_id}:::{map_role_id}]" /> |
---|
| 173 | </td> |
---|
| 174 | </tr> |
---|
| 175 | <!-- END block_list_mappings --> |
---|
| 176 | <tr class="th"> |
---|
| 177 | <td colspan="3" align="right"> |
---|
| 178 | <input type="submit" name="delete_map" value="{lang_delete_selected}" /> |
---|
| 179 | </td> |
---|
| 180 | </tr> |
---|
| 181 | </table> |
---|
| 182 | </form> |
---|
| 183 | |
---|
| 184 | <script language="javascript1.2"> |
---|
| 185 | |
---|
| 186 | function mapUsers(frm) |
---|
| 187 | { |
---|
| 188 | //selecionou pelo menos um perfil? |
---|
| 189 | roles = window.document.getElementById('role_list'); |
---|
| 190 | role_selected = false; |
---|
| 191 | for(var i = 0; i < roles.options.length; i++) |
---|
| 192 | { |
---|
| 193 | if (roles.options[i].selected) |
---|
| 194 | { |
---|
| 195 | role_selected = true; |
---|
| 196 | break; |
---|
| 197 | } |
---|
| 198 | } |
---|
| 199 | |
---|
| 200 | //se não selecionou deve avisar o usuário e não efetuar o submit |
---|
| 201 | if (!role_selected) |
---|
| 202 | { |
---|
| 203 | alert("{lang_No_role_was_selected}"); |
---|
| 204 | return; |
---|
| 205 | } |
---|
| 206 | |
---|
| 207 | users = window.document.getElementById('user_list'); |
---|
| 208 | for(var i = 0;i < users.options.length; i++) |
---|
| 209 | { |
---|
| 210 | users.options[i].selected = true; |
---|
| 211 | } |
---|
| 212 | frm.submit(); |
---|
| 213 | } |
---|
| 214 | </script> |
---|