Index: openacs-4/packages/acs-subsite/www/admin/themes/view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/themes/view.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-subsite/www/admin/themes/view.tcl 17 May 2018 07:47:01 -0000 1.4 +++ openacs-4/packages/acs-subsite/www/admin/themes/view.tcl 3 Sep 2024 15:37:34 -0000 1.5 @@ -1,17 +1,17 @@ ad_page_contract { View (and maybe edit) theme parameters - + @author Gustaf Neumann @creation-date 2017-01-21 } { {theme:word,trim} } -validate { theme_valid -requires theme { - if {![db_string check_exists_theme { - select 1 from subsite_themes where key = :theme - } -default 0]} { - ad_complain "Theme with key '$theme' does not exist" - } + if {![db_string check_exists_theme { + select 1 from subsite_themes where key = :theme + } -default 0]} { + ad_complain "Theme with key '$theme' does not exist" + } } } @@ -63,12 +63,12 @@ lappend htmlSpecs size 80 set currentSpec [list ${var}:text,optional [list label $param] [list html $htmlSpecs]] } - + if {$currentThemeKey eq $key} { set currentValue [string trim [parameter::get -parameter $param -package_id $subsite_id]] - regsub -all {\r\n} $currentValue "\n" currentValue + regsub -all -- {\r\n} $currentValue "\n" currentValue set value [string trim [set $var]] - regsub -all {\r\n} $value "\n" value + regsub -all -- {\r\n} $value "\n" value if {$currentValue ne $value} { lappend currentSpec [list help_text "differs"] ns_log notice "current value \n<$currentValue>\ndiffers from\n<$value>" @@ -97,9 +97,9 @@ -form $formSpec \ -on_request { #ns_log notice "on request" - + } -on_submit { - + if {[ns_queryget formbutton:save] ne "" || [ns_queryget formbutton:overwrite] ne ""} { #ns_log notice "edit theme ====== SAVE form values in actual parameter settings" foreach {var param} $settings { @@ -120,7 +120,7 @@ -local_p true \ {*}$params } - + } -after_submit { ad_returnredirect $return_url ad_script_abort