Index: openacs-4/packages/lars-blogger/www/entry-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/entry-edit.tcl,v diff -u -r1.24 -r1.25 --- openacs-4/packages/lars-blogger/www/entry-edit.tcl 23 Feb 2005 15:28:57 -0000 1.24 +++ openacs-4/packages/lars-blogger/www/entry-edit.tcl 5 Apr 2005 12:08:47 -0000 1.25 @@ -105,12 +105,29 @@ {(Set to now)} } } - {draft_p:text(select) - {options {{"Draft" "t"} {"Publish" "f"}}} - {label "Post Status"} +} +set unpublish_p [expr ![parameter::get -parameter ImmediatePublishP -default 0]] + +if {$unpublish_p} { + ad_form -extend -name entry -form { + {draft_p:text(select) + {options {{"Draft" "t"} {"Publish" "f"}}} + {label "Post Status"} + } } -} \ +} else { + ad_form -extend -name entry -form { + {draft_p:text(hidden)} + } +} + +ad_form -extend -name entry \ -new_request { + if {$unpublish_p} { + set draft_p t + } else { + set draft_p f + } set entry_date $now_ansi set content [template::util::richtext::create $content {}] } \