Index: openacs-4/packages/news/www/item-create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/item-create.tcl,v diff -u -r1.17 -r1.18 --- openacs-4/packages/news/www/item-create.tcl 19 Jan 2018 14:24:20 -0000 1.17 +++ openacs-4/packages/news/www/item-create.tcl 3 Sep 2024 15:37:39 -0000 1.18 @@ -2,7 +2,7 @@ ad_page_contract { - This page enables registered users and the news-admin + This page enables registered users and the news-admin to enter news releases. @author stefan@arsdigita.com @@ -14,8 +14,8 @@ {publish_lead {}} {publish_body:allhtml {}} {publish_body.format {}} - {publish_date_ansi {now}} - {archive_date_ansi {}} + {publish_date:clock(%Y-%m-%d) {now}} + {archive_date:clock(%Y-%m-%d) {}} {permanent_p:boolean {}} } @@ -25,7 +25,7 @@ # Furthermore, with news_admin privilege, items are approved immediately -# or if open approval policy +# or if open approval policy if { [permission::permission_p -object_id $package_id -privilege news_admin] || [parameter::get -parameter ApprovalPolicy -default "open"] eq "open" } { @@ -37,48 +37,43 @@ set title "[_ news.Create_News_Item]" set context [list $title] -set lc_format [lc_get formbuilder_date_format] - set date_today [clock format [clock seconds] -format %Y-%m-%d] set active_days [parameter::get -parameter ActiveDays -default 14] set date_proj [clock format [clock scan "$active_days days"] -format %Y-%m-%d] -if { $publish_date_ansi eq "" || $publish_date_ansi eq "now"} { - set publish_date_ansi $date_today +if { $publish_date eq "" || $publish_date eq "now"} { + set publish_date $date_today } -if { $archive_date_ansi eq "" } { - set archive_date_ansi $date_proj +if { $archive_date eq "" } { + set archive_date $date_proj } ad_form -name "news" -action "preview" -html {enctype "multipart/form-data"} -form { {action:text(hidden) {value "News Item"}} - {publish_title:text(text) + {publish_title:text(text) {label "[_ news.Title]"} {html {maxlength 400 size 61}} {value $publish_title}} {publish_lead:text(textarea),optional {label "[_ news.Lead]"} {html {cols 60 rows 3}} {value $publish_lead}} - {publish_body:text(richtext),optional + {publish_body:text(richtext) {label "[_ news.Body]"} {html {cols 60 rows 20}} {value "[list $publish_body ${publish_body.format}]"}} } -# {options {editor ckeditor5 JSEditorClass InlineEditor}} if { $immediate_approve_p } { ad_form -extend -name "news" -form { - {publish_date:date,optional + {publish_date:h5date,optional {label "[_ news.Release_Date]"} - {value "[split $publish_date_ansi -]"} - {format {$lc_format}} + {value $publish_date} } - {archive_date:date,optional + {archive_date:h5date,optional {label "[_ news.Archive_Date]"} - {value "[split $archive_date_ansi -]"} - {format {$lc_format}} + {value $archive_date} } {permanent_p:text(checkbox),optional {label "[_ news.never]"}