Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The user controller functions for changing information were ripped ou…
…t before providing a way for admin functionality to use the new javascript stuff. Seems nontrivial, so this puts the endpoint back temporarily until the adminjs rewrite which can include the new functionality.
- Loading branch information
Showing
2 changed files
with
287 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<%inherit file="/base.mako"/> | ||
<%namespace file="/user/info.mako" import="render_user_info" /> | ||
<%namespace file="/message.mako" import="render_msg" /> | ||
|
||
%if message: | ||
${render_msg( message, status )} | ||
%endif | ||
|
||
${render_user_info()} | ||
|
||
%if user.values or user_info_forms: | ||
<p></p> | ||
<div class="toolForm"> | ||
<form name="user_info" id="user_info" action="${h.url_for( controller='user', action='edit_info', cntrller=cntrller, user_id=trans.security.encode_id( user.id ) )}" method="post" > | ||
<div class="toolFormTitle">User information</div> | ||
%if user_type_fd_id_select_field and len( user_type_fd_id_select_field.options ) >= 1: | ||
<div class="form-row"> | ||
<label>User type:</label> | ||
${user_type_fd_id_select_field.get_html()} | ||
</div> | ||
%else: | ||
<input type="hidden" name="user_type_fd_id" value="${trans.security.encode_id( user_type_fd_id )}"/> | ||
%endif | ||
%for field in widgets: | ||
<div class="form-row"> | ||
<label>${field['label']}:</label> | ||
${field['widget'].get_html()} | ||
<div class="toolParamHelp" style="clear: both;"> | ||
${field['helptext']} | ||
</div> | ||
<div style="clear: both"></div> | ||
</div> | ||
%endfor | ||
<div class="form-row"> | ||
<input type="submit" name="edit_user_info_button" value="Save"/> | ||
</div> | ||
</form> | ||
</div> | ||
<p></p> | ||
%endif | ||
|
||
<p/> | ||
|
||
<div class="toolForm"> | ||
<form name="user_addresses" id="user_addresses" action="${h.url_for( controller='user', action='new_address', cntrller=cntrller, id=trans.security.encode_id( user.id ) )}" method="post" > | ||
<div class="toolFormTitle">User Addresses</div> | ||
<div class="toolFormBody"> | ||
%if user.addresses: | ||
<div class="form-row"> | ||
<div class="grid-header"> | ||
%for i, filter in enumerate( ['Active', 'Deleted', 'All'] ): | ||
%if i > 0: | ||
<span>|</span> | ||
%endif | ||
%if show_filter == filter: | ||
<span class="filter"><a href="${h.url_for( controller='user', action='manage_user_info', cntrller=cntrller, show_filter=filter, id=trans.security.encode_id( user.id ) )}"><b>${filter}</b></a></span> | ||
%else: | ||
<span class="filter"><a href="${h.url_for( controller='user', action='manage_user_info', cntrller=cntrller, show_filter=filter, id=trans.security.encode_id( user.id ) )}">${filter}</a></span> | ||
%endif | ||
%endfor | ||
</div> | ||
</div> | ||
<table class="grid"> | ||
<tbody> | ||
%for index, address in enumerate(addresses): | ||
<tr class="libraryRow libraryOrFolderRow" id="libraryRow"> | ||
<td> | ||
<div class="form-row"> | ||
<label>${address.desc | h}:</label> | ||
${address.get_html()} | ||
</div> | ||
<div class="form-row"> | ||
<ul class="manage-table-actions"> | ||
<li> | ||
%if not address.deleted: | ||
<a class="action-button" href="${h.url_for( controller='user', action='edit_address', cntrller=cntrller, address_id=trans.security.encode_id( address.id ), id=trans.security.encode_id( user.id ) )}">Edit</a> | ||
<a class="action-button" href="${h.url_for( controller='user', action='delete_address', cntrller=cntrller, address_id=trans.security.encode_id( address.id ), id=trans.security.encode_id( user.id ) )}">Delete</a> | ||
%else: | ||
<a class="action-button" href="${h.url_for( controller='user', action='undelete_address', cntrller=cntrller, address_id=trans.security.encode_id( address.id ), id=trans.security.encode_id( user.id ) )}">Undelete</a> | ||
%endif | ||
</li> | ||
</ul> | ||
</div> | ||
</td> | ||
</tr> | ||
%endfor | ||
</tbody> | ||
</table> | ||
%endif | ||
<div class="form-row"> | ||
<input type="submit" value="Add a new address"> | ||
</div> | ||
</div> | ||
</form> | ||
</div> |