Index: openacs-4/packages/survey/www/admin/survey-create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/www/admin/survey-create.tcl,v diff -u -r1.9 -r1.9.4.1 --- openacs-4/packages/survey/www/admin/survey-create.tcl 27 Oct 2014 16:41:58 -0000 1.9 +++ openacs-4/packages/survey/www/admin/survey-create.tcl 9 Feb 2020 16:10:31 -0000 1.9.4.1 @@ -34,45 +34,45 @@ {name:text(text) {label "[_ survey.Survey_Name_1]"} {html {size 55}}} {description:text(textarea) {label "[_ survey.Description_1]"} {html {rows 10 cols 40}}} {desc_html:text(radio) {label "[_ survey.lt_The_Above_Description]"} - {options {{"[_ survey.Preformatted_Text]" "pre"} - {"HTML" "html"} }} - {value "pre"} + {options {{"[_ survey.Preformatted_Text]" "pre"} + {"HTML" "html"} }} + {value "pre"} } - -} -validate { + +} -validate { {name {[string length $name] <= 4000} "[_ survey.lt_Survey_Name_must_be_4]" } {description {[string length $description] <= 4000} "[_ survey.lt_Survey_Name_must_be_4]" } {survey_id {[db_string count_surveys "select count(survey_id) from surveys where survey_id=:survey_id"] < 1} "[_ survey.oops]" } - + } -new_data { - + if {$desc_html eq "html" } { - set description_html_p "t" + set description_html_p "t" } else { - set description_html_p "f" + set description_html_p "f" } if {[parameter::get -package_id $package_id -parameter survey_enabled_default_p -default 0]} { - set enabled_p "t" + set enabled_p "t" } else { - set enabled_p "f" + set enabled_p "f" } db_transaction { - db_exec_plsql create_survey "" + db_exec_plsql create_survey "" - # survey type-specific inserts + # survey type-specific inserts - # create new section here. the questions go in the section - # section_id is null to create a new section - # we might want to specify a section_id later for - # multiple section surveys - set section_id "" - set section_id [db_exec_plsql create_section ""] + # create new section here. the questions go in the section + # section_id is null to create a new section + # we might want to specify a section_id later for + # multiple section surveys + set section_id "" + set section_id [db_exec_plsql create_section ""] } ad_returnredirect "question-add?section_id=$section_id" ad_script_abort @@ -87,3 +87,9 @@ ad_return_template + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: