Index: openacs-4/packages/dotlrn/www/subcommunity-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/subcommunity-edit.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/subcommunity-edit.adp 30 Apr 2002 21:24:42 -0000 1.1 @@ -0,0 +1,28 @@ +<% + + # + # Copyright (C) 2001, 2002 OpenForce, Inc. + # + # This file is part of dotLRN. + # + # dotLRN is free software; you can redistribute it and/or modify it under the + # terms of the GNU General Public License as published by the Free Software + # Foundation; either version 2 of the License, or (at your option) any later + # version. + # + # dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY + # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + # details. + # + +%> + + +@title@ +@admin_portal_id@ +1 +1 + + + Index: openacs-4/packages/dotlrn/www/subcommunity-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/subcommunity-edit.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/subcommunity-edit.tcl 30 Apr 2002 21:24:42 -0000 1.1 @@ -0,0 +1,71 @@ +# +# Copyright (C) 2001, 2002 OpenForce, Inc. +# +# This file is part of dotLRN. +# +# dotLRN is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# + +ad_page_contract { + edit a subcommunity (aka subgroup) + + @author arjun (arjun@openforce.net) + @version $Id: subcommunity-edit.tcl,v 1.1 2002/04/30 21:24:42 arjun Exp $ +} -query { + {community_id:notnull} + {referer "one-community-admin"} +} -properties { + title:onevalue +} + +set user_id [ad_get_user_id] +set admin_portal_id \ + [dotlrn_community::get_portal_template_id $community_id] + +set title "Edit [ad_parameter subcommunity_pretty_name]" +set old_pn [dotlrn_community::get_community_name $community_id] + +dotlrn::require_user_admin_community $community_id + +form create edit_subcomm + +element create edit_subcomm pretty_name \ + -label "Rename $old_pn to:" \ + -datatype text \ + -widget text \ + -html {size 40} \ + -value $old_pn + +element create edit_subcomm referer \ + -label "Referer" \ + -datatype text \ + -widget hidden \ + -value $referer + +element create edit_subcomm community_id \ + -label "community_id" \ + -datatype text \ + -widget hidden \ + -value $community_id + +if {[form is_valid edit_subcomm]} { + form get_values edit_subcomm pretty_name referer community_id + + dotlrn_community::set_community_name \ + -community_id $community_id \ + -pretty_name $pretty_name + + ad_returnredirect "$referer" + + ad_script_abort +} + +ad_return_template