Index: openacs-4/contrib/packages/simulation/www/siminst/simulation-casting-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/simulation-casting-2.adp,v diff -u -r1.6 -r1.7 --- openacs-4/contrib/packages/simulation/www/siminst/simulation-casting-2.adp 18 Dec 2003 09:58:28 -0000 1.6 +++ openacs-4/contrib/packages/simulation/www/siminst/simulation-casting-2.adp 18 Dec 2003 12:39:55 -0000 1.7 @@ -1,8 +1,19 @@ @page_title;noquote@ @context;noquote@ + + + + -

TODO: if enrollment type is invite only, the boxes for enrollment -dates should disappear

TODO: implement invitations. +

TODO: When switching from open enrollment to "by invitation only" and back, the dates are lost -- see if we can avoid that. Index: openacs-4/contrib/packages/simulation/www/siminst/simulation-casting-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/simulation-casting-2.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/contrib/packages/simulation/www/siminst/simulation-casting-2.tcl 18 Dec 2003 12:27:25 -0000 1.12 +++ openacs-4/contrib/packages/simulation/www/siminst/simulation-casting-2.tcl 18 Dec 2003 12:39:55 -0000 1.13 @@ -26,6 +26,11 @@ set eligible_groups [simulation::casting_groups -workflow_id $workflow_id] ad_form -export { workflow_id } -name simulation -form { + {enroll_type:text(radio) + {label "Enrollment type"} + {options {{"By invitation only" closed} {Open open}}} + {html {onChange "javascript:FormRefresh('simulation');"}} + } {enroll_start:date,to_sql(ansi),from_sql(ansi),optional {label "Enrollment start date"} } @@ -41,10 +46,6 @@ {case_end:date,to_sql(ansi),from_sql(ansi),optional {label "Simulation end date"} } - {enroll_type:text(radio) - {label "Enrollment type"} - {options {{"By invitation only" closed} {Open open}}} - } {casting_type:text(radio) {label "Casting type"} {options {{Automatic auto} {Group group} {Open open}}} @@ -98,7 +99,21 @@ set casting_type "auto" } + if { [string equal $enroll_type "closed"] } { + element set_properties simulation enroll_start -widget hidden + element set_properties simulation enroll_end -widget hidden + } +} -on_refresh { + + if { [string equal $enroll_type "closed"] } { + element set_properties simulation enroll_start -widget hidden + element set_properties simulation enroll_end -widget hidden + } else { + element set_properties simulation enroll_start -widget date + element set_properties simulation enroll_end -widget date + } + } -on_submit { # TODO: Use underscore in "auto-enroll" -> "auto_enroll" for consistency Index: openacs-4/packages/simulation/www/siminst/simulation-casting-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/Attic/simulation-casting-2.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/simulation/www/siminst/simulation-casting-2.adp 18 Dec 2003 09:58:28 -0000 1.6 +++ openacs-4/packages/simulation/www/siminst/simulation-casting-2.adp 18 Dec 2003 12:39:55 -0000 1.7 @@ -1,8 +1,19 @@ @page_title;noquote@ @context;noquote@ + + + + -

TODO: if enrollment type is invite only, the boxes for enrollment -dates should disappear

TODO: implement invitations. +

TODO: When switching from open enrollment to "by invitation only" and back, the dates are lost -- see if we can avoid that. Index: openacs-4/packages/simulation/www/siminst/simulation-casting-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/Attic/simulation-casting-2.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/simulation/www/siminst/simulation-casting-2.tcl 18 Dec 2003 12:27:25 -0000 1.12 +++ openacs-4/packages/simulation/www/siminst/simulation-casting-2.tcl 18 Dec 2003 12:39:55 -0000 1.13 @@ -26,6 +26,11 @@ set eligible_groups [simulation::casting_groups -workflow_id $workflow_id] ad_form -export { workflow_id } -name simulation -form { + {enroll_type:text(radio) + {label "Enrollment type"} + {options {{"By invitation only" closed} {Open open}}} + {html {onChange "javascript:FormRefresh('simulation');"}} + } {enroll_start:date,to_sql(ansi),from_sql(ansi),optional {label "Enrollment start date"} } @@ -41,10 +46,6 @@ {case_end:date,to_sql(ansi),from_sql(ansi),optional {label "Simulation end date"} } - {enroll_type:text(radio) - {label "Enrollment type"} - {options {{"By invitation only" closed} {Open open}}} - } {casting_type:text(radio) {label "Casting type"} {options {{Automatic auto} {Group group} {Open open}}} @@ -98,7 +99,21 @@ set casting_type "auto" } + if { [string equal $enroll_type "closed"] } { + element set_properties simulation enroll_start -widget hidden + element set_properties simulation enroll_end -widget hidden + } +} -on_refresh { + + if { [string equal $enroll_type "closed"] } { + element set_properties simulation enroll_start -widget hidden + element set_properties simulation enroll_end -widget hidden + } else { + element set_properties simulation enroll_start -widget date + element set_properties simulation enroll_end -widget date + } + } -on_submit { # TODO: Use underscore in "auto-enroll" -> "auto_enroll" for consistency