Index: openacs.org-dev/packages/bug-tracker/www/admin/project-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/bug-tracker/www/admin/project-edit.tcl,v diff -u -r1.1.1.2 -r1.1.1.3 --- openacs.org-dev/packages/bug-tracker/www/admin/project-edit.tcl 25 Jul 2002 18:47:00 -0000 1.1.1.2 +++ openacs.org-dev/packages/bug-tracker/www/admin/project-edit.tcl 8 Oct 2002 15:46:57 -0000 1.1.1.3 @@ -2,12 +2,10 @@ Pick a project maintainer @author Lars Pind (lars@pinds.com) - @date 2002-03-26 + @creation-date 2002-03-26 @cvs-id $Id$ } { cancel:optional - name:optional - description:optional {return_url ""} } @@ -16,46 +14,60 @@ ad_script_abort } -set project_name [bt_conn project_name] +set project_name [bug_tracker::conn project_name] set package_id [ad_conn package_id] set package_key [ad_conn package_key] set page_title "Edit Project" set context_bar [ad_context_bar $page_title] -template::form create project_info +form create project_info -template::element create project_info return_url -datatype text -widget hidden -value $return_url +element create project_info return_url -datatype text -widget hidden -value $return_url -template::element create project_info name \ +element create project_info name \ -datatype text \ -html { size 50 } \ -label "Project Name" -template::element create project_info description \ +element create project_info description \ -datatype text \ -widget textarea \ -label "Description" \ -optional \ -html { cols 50 rows 8 } -if { [template::form is_request project_info] } { - template::element set_properties project_info name \ - -value [bt_conn project_name] - - template::element set_properties project_info description \ - -value [db_string project_description { select description from bt_projects where project_id = :package_id }] +element create project_info email_subject_name \ + -datatype text \ + -html { size 50 } \ + -label "Email subject tag" + +if { [form is_request project_info] } { + db_1row project_info { + select description, email_subject_name + from bt_projects + where project_id = :package_id + } -column_array project_info + + form set_values project_info project_info + + element set_properties project_info name \ + -value [bug_tracker::conn project_name] + } -if { [template::form is_valid project_info] } { +if { [form is_valid project_info] } { + form get_values project_info description email_subject_name name + db_transaction { db_dml project_info_update { update bt_projects - set description = :description + set description = :description, + email_subject_name = :email_subject_name where project_id = :package_id } - bt_set_project_name $name + bug_tracker::set_project_name $name } ad_returnredirect $return_url