[%# Admin page to view and edit userprops. Authors: Andrea Nall Afuna Copyright (c) 2015 by Dreamwidth Studios, LLC. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. For a copy of the license, please reference 'perldoc perlartistic' or 'perldoc perlgpl'. %] [%- sections.title = ".admin.link" | ml -%] [%- CALL dw.active_resource_group( "foundation" ) -%]
[%- dw.form_auth -%]
[%- form.textbox( label = "Username" name = 'username' maxlength = 50 size = 25 ) -%]
[%- form.submit( value = "View", class = user.defined ? "secondary" : "" ) -%]
[%- UNLESS can_save -%]
To be able to save changes, you need the siteadmin:* or siteadmin:propedit privs.
[%- END -%]
[%- IF u -%]
[%- IF can_save -%]
[%- dw.form_auth -%] [%- form.hidden( name = "username", value = u.username ) -%] [%- form.hidden( name = "_save", value = 1 ) -%] [%- END -%]
Username: [% u.username %] ([%- u.userid -%])
Cluster: [% u.clusterid %]
Database Version: [% u.dversion %]
Statusvis: [% u.statusvis_display %] ([% u.statusvis %])
[%- FOREACH prop = props -%]
[%- IF can_save -%] [%- IF prop.is_text -%] [%- form.textbox( label = prop.name, id = prop.name name = prop.name value = prop.value maxlength = 255 hint = prop.description ) -%] [%- ELSE -%] [%- form.textarea( label = prop.name id = prop.name value = prop.value disabled = 1 ) -%] [%- END -%] [%- ELSE -%] [%- prop.name -%]: [%- prop.value -%]
[%- prop.description -%] [%- END -%]
[%- END -%] [%- IF can_save -%] [%- form.submit( value = "Save" ) -%]
[%- END -%]
[%- END -%]