Index: openacs-4/contrib/packages/simulation/www/simbuild/task-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simbuild/Attic/task-edit.adp,v diff -u -r1.14 -r1.15 --- openacs-4/contrib/packages/simulation/www/simbuild/task-edit.adp 22 Jan 2004 14:08:39 -0000 1.14 +++ openacs-4/contrib/packages/simulation/www/simbuild/task-edit.adp 23 Jan 2004 13:23:42 -0000 1.15 @@ -5,8 +5,4 @@ -

TODO A (.5h): Lars form element to set timeouts. Radio buttons to pick "No time limit/Use time limit". Input field for "Trigger after" x, where x>0, and x is translated by PG's interval conversion stuff, so you can say '1 day'. -

-

TODO A (.5h): Lars Allow multiple recipients (replace recipient dropdown with checkbox

- Index: openacs-4/contrib/packages/simulation/www/simbuild/task-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simbuild/Attic/task-edit.tcl,v diff -u -r1.27 -r1.28 --- openacs-4/contrib/packages/simulation/www/simbuild/task-edit.tcl 23 Jan 2004 13:18:43 -0000 1.27 +++ openacs-4/contrib/packages/simulation/www/simbuild/task-edit.tcl 23 Jan 2004 13:23:42 -0000 1.28 @@ -155,17 +155,46 @@ } } + +switch $trigger_type { + user - message - workflow - parallel - dynamic { + ad_form -extend -name task -form { + {timeout_seconds:integer(text),optional + {label "Timeout"} + {after_html "seconds"} + } + } + } + time { + ad_form -extend -name task -form { + {timeout_seconds:integer(text) + {label "Timeout"} + {after_html "seconds"} + } + } + } +} + ad_form -extend -name task -form { {description:richtext,optional {label "Task Description"} {html {cols 60 rows 8}} {help_text "Suggested text; can be edited when template is instantiated."} } - {attachment_num:integer(text) - {label "Number of attachments"} - {help_text "These are placeholders that are matched to props by the case author during SimInst"} - {html {size 2}} +} + +if { [string equal $trigger_type "user"] } { + ad_form -extend -name task -form { + {attachment_num:integer(text) + {label "Number of attachments"} + {help_text "These are placeholders that are matched to props by the case author during SimInst"} + {html {size 2}} + } } +} else { + ad_form -extend -name task -form { + {attachment_num:integer(hidden) {value 0}} + } } set enabled_options [list] @@ -197,7 +226,7 @@ foreach elm { pretty_name pretty_past_tense new_state_id assigned_role recipient_roles - attachment_num trigger_type + attachment_num trigger_type timeout_seconds } { set $elm $task_array($elm) } @@ -249,7 +278,7 @@ # Removed: child_workflow_id child_role_map foreach elm { pretty_name pretty_past_tense assigned_role description description_mime_type - new_state_id + new_state_id timeout_seconds recipient_roles attachment_num trigger_type } { set row($elm) [set $elm] Index: openacs-4/packages/simulation/www/simbuild/task-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simbuild/task-edit.adp,v diff -u -r1.14 -r1.15 --- openacs-4/packages/simulation/www/simbuild/task-edit.adp 22 Jan 2004 14:08:39 -0000 1.14 +++ openacs-4/packages/simulation/www/simbuild/task-edit.adp 23 Jan 2004 13:23:42 -0000 1.15 @@ -5,8 +5,4 @@ -

TODO A (.5h): Lars form element to set timeouts. Radio buttons to pick "No time limit/Use time limit". Input field for "Trigger after" x, where x>0, and x is translated by PG's interval conversion stuff, so you can say '1 day'. -

-

TODO A (.5h): Lars Allow multiple recipients (replace recipient dropdown with checkbox

- Index: openacs-4/packages/simulation/www/simbuild/task-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simbuild/task-edit.tcl,v diff -u -r1.27 -r1.28 --- openacs-4/packages/simulation/www/simbuild/task-edit.tcl 23 Jan 2004 13:18:43 -0000 1.27 +++ openacs-4/packages/simulation/www/simbuild/task-edit.tcl 23 Jan 2004 13:23:42 -0000 1.28 @@ -155,17 +155,46 @@ } } + +switch $trigger_type { + user - message - workflow - parallel - dynamic { + ad_form -extend -name task -form { + {timeout_seconds:integer(text),optional + {label "Timeout"} + {after_html "seconds"} + } + } + } + time { + ad_form -extend -name task -form { + {timeout_seconds:integer(text) + {label "Timeout"} + {after_html "seconds"} + } + } + } +} + ad_form -extend -name task -form { {description:richtext,optional {label "Task Description"} {html {cols 60 rows 8}} {help_text "Suggested text; can be edited when template is instantiated."} } - {attachment_num:integer(text) - {label "Number of attachments"} - {help_text "These are placeholders that are matched to props by the case author during SimInst"} - {html {size 2}} +} + +if { [string equal $trigger_type "user"] } { + ad_form -extend -name task -form { + {attachment_num:integer(text) + {label "Number of attachments"} + {help_text "These are placeholders that are matched to props by the case author during SimInst"} + {html {size 2}} + } } +} else { + ad_form -extend -name task -form { + {attachment_num:integer(hidden) {value 0}} + } } set enabled_options [list] @@ -197,7 +226,7 @@ foreach elm { pretty_name pretty_past_tense new_state_id assigned_role recipient_roles - attachment_num trigger_type + attachment_num trigger_type timeout_seconds } { set $elm $task_array($elm) } @@ -249,7 +278,7 @@ # Removed: child_workflow_id child_role_map foreach elm { pretty_name pretty_past_tense assigned_role description description_mime_type - new_state_id + new_state_id timeout_seconds recipient_roles attachment_num trigger_type } { set row($elm) [set $elm]