Changeset 26ef4e in indico
- Timestamp:
- 03/23/11 18:28:19 (2 years ago)
- Branches:
- v0.97-series
- Children:
- 652198
- Parents:
- cf32f5
- Location:
- indico/MaKaC/webinterface
- Files:
-
- 2 edited
-
pages/admins.py (modified) (1 diff)
-
tpls/UserIdentitiesTable.tpl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
indico/MaKaC/webinterface/pages/admins.py
rcd6fa3 r26ef4e 1401 1401 am = AuthenticatorMgr() 1402 1402 authTagList = [i.getId() for i in am.getList()] 1403 for item in self._avatar.getIdentityList(): 1404 if not item.getAuthenticatorTag() in authTagList: 1405 continue 1406 changePassword = "" 1407 if item.getAuthenticatorTag() != "Local" : 1408 changePassword = _("External account") 1409 else : 1410 changeURL = urlHandlers.UHUserIdentityChangePassword.getURL() 1411 changeURL.addParam("userId",self._avatar.getId()) 1412 changeURL.addParam("identityId",item.getId()) 1413 changePassword = _("""<a href="%s"><small> _("Change password")</small></a>""")%changeURL 1414 il.append(""" 1415 <tr> 1416 <td width="60%%"> 1417 <input type="checkbox" name="selIdentities" value="%s"> %s 1418 </td> 1419 <td width="20%%"> 1420 <small>%s</small> 1421 </td> 1422 <td width="20%%"> 1423 %s 1424 </td> 1425 </tr> 1426 """%(item.getId(), item.getLogin(), item.getAuthenticatorTag(), changePassword) ) 1427 vars["items"] = "".join( il ) 1403 1404 vars["identityItems"] = filter(lambda x: not x.getAuthenticatorTag() in authTagList, self._avatar.getIdentityList()) 1405 vars["avatar"] = self._avatar 1428 1406 vars["locator"] = self._avatar.getLocator().getWebForm() 1407 vars["accountManagementActive"] = 'Local' in authTagList 1429 1408 return vars 1430 1409 -
indico/MaKaC/webinterface/tpls/UserIdentitiesTable.tpl
r5c0074 r26ef4e 1 1 2 <form action=" %(removeIdentityURL)s" method="POST" style="margin: 0;">2 <form action="<%= removeIdentityURL %>" method="POST" style="margin: 0;"> 3 3 <table> 4 %(items)s 4 <% for item in identityItems: %> 5 <tr> 6 <td width="60%%"> 7 <% if accountManagementActive: %> 8 <input type="checkbox" name="selIdentities" value="<%= item.getId() %>" /> 9 <% end %> 10 <%= item.getLogin() %> 11 </td> 12 <td width="20%%"> 13 <%= item.getAuthenticatorTag() %> 14 </td> 15 <td> 16 <% if item.getAuthenticatorTag() == "Local": %> 17 <a href="<%= urlHandlers.UHUserIdentityChangePassword.getURL(userId=avatar.getId(), identityId=item.getId()) %>"> 18 <small> <%= _("Change password") %></small> 19 </a> 20 <% end %> 21 <% else: %> 22 External account 23 <% end %> 24 </td> 25 </td> 26 </tr> 27 <% end %> 5 28 <tr> 6 29 <td> 7 30 <table> 8 31 <tr> 32 <% if accountManagementActive: %> 9 33 <td> 10 34 <input type="submit" class="btn" value="<%= _("delete selected accounts")%>" name="action"> 11 35 </form> 12 36 </td> 13 14 37 <td> 15 <form style="margin: 0; padding: 0;" action=" %(addIdentityURL)s" method="POST">38 <form style="margin: 0; padding: 0;" action="<%= addIdentityURL %>" method="POST"> 16 39 <input type="submit" class="btn" value="<%= _("create a new account")%>" name="action"> 17 40 </form> 18 19 41 </td> 42 <% end %> 20 43 </tr> 21 44 </table>
Note: See TracChangeset
for help on using the changeset viewer.
