Index: openacs-4/packages/calendar/www/cal-item-create-recurrence.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/cal-item-create-recurrence.tcl,v
diff -u -r1.4.8.2 -r1.4.8.3
--- openacs-4/packages/calendar/www/cal-item-create-recurrence.tcl 3 Jul 2004 10:04:57 -0000 1.4.8.2
+++ openacs-4/packages/calendar/www/cal-item-create-recurrence.tcl 23 Nov 2004 18:32:30 -0000 1.4.8.3
@@ -54,28 +54,45 @@
{options $recurrance_options}
}
- {recur_until:date
+ {recur_until:text,text
{label "[_ calendar.lt_Repeat_this_event_unt]"}
+ {html {id sel1}}
+ {after_html { \[y-m-d \]
+ }}
+
}
{submit:text(submit) {label "[_ calendar.Add_Recurrence]"}}
} -validate {
{recur_until
{
- [calendar::item::dates_valid_p -start_date $cal_item(start_date) -end_date [calendar::to_sql_datetime -date $recur_until -time "" -time_p 0]]
+ [calendar::item::dates_valid_p -start_date $cal_item(start_date) -end_date $recur_until]
}
- {[_ calendar.start_time_before_end_time]}
+ {[_ calendar.start_time_before_end_time]}
}
} -edit_data {
+
+ # To support green calendar
+ set recur_until [split $recur_until "-"]
+ lappend recur_until ""
+ lappend recur_until ""
+ lappend recur_until ""
+ lappend recur_until "DD MONTH YYYY"
+
calendar::item::add_recurrence \
-cal_item_id $cal_item_id \
-interval_type $interval_type \
-every_n $every_n \
-days_of_week $days_of_week \
-recur_until [calendar::to_sql_datetime -date $recur_until -time "" -time_p 0]
} -edit_request {
- set recur_until [template::util::date::from_ansi $cal_item(start_date)]
+ set aux [template::util::date::from_ansi $cal_item(start_date)]
+ set recur_until [lindex $aux 0]
+ append recur_until "-"
+ append recur_until [lindex $aux 1]
+ append recur_until "-"
+ append recur_until [lindex $aux 2]
set interval_type week
} -after_submit {
ad_returnredirect $return_url
Index: openacs-4/packages/calendar/www/cal-item-new.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/cal-item-new.tcl,v
diff -u -r1.24.2.1 -r1.24.2.2
--- openacs-4/packages/calendar/www/cal-item-new.tcl 3 May 2004 12:30:06 -0000 1.24.2.1
+++ openacs-4/packages/calendar/www/cal-item-new.tcl 23 Nov 2004 18:32:50 -0000 1.24.2.2
@@ -57,8 +57,12 @@
{html {size 60} maxlength 255}
}
- {date:date
+ {date:text(text)
{label "[_ calendar.Date_1]"}
+ {html {id sel1}}
+ {after_html { \[y-m-d \]
+ }}
+
}
{time_p:text(radio)
@@ -158,7 +162,8 @@
calendar::new -owner_id $user_id -private_p "t" -calendar_name "Personal" -package_id $package_id
}
- set date [template::util::date::from_ansi $date]
+ #set date [template::util::date::from_ansi $date]
+ set date $ansi_date
set repeat_p 0
if {[info exists start_time] && ![empty_string_p $start_time] && $start_time != 0} {
# Set the start time
@@ -174,6 +179,7 @@
}
set calendar_id [lindex [lindex $calendar_options 0] 1]
} -edit_request {
+
calendar::item::get -cal_item_id $cal_item_id -array cal_item
permission::require_write_permission -object_id $cal_item_id -creation_user $cal_item(creation_user)
@@ -201,10 +207,18 @@
if { !$repeat_p } {
element set_properties cal_item edit_all_p -widget hidden
}
- set date [template::util::date::from_ansi $ansi_start_date]
+ # To support green calendar
+ # set date [template::util::date::from_ansi $ansi_start_date]
+ set date [lindex $ansi_start_date 0]
set start_time [template::util::date::from_ansi $ansi_start_date [lc_get formbuilder_time_format]]
set end_time [template::util::date::from_ansi $ansi_end_date [lc_get formbuilder_time_format]]
} -new_data {
+ # To support green calendar
+ set date [split $date "-"]
+ lappend date ""
+ lappend date ""
+ lappend date ""
+ lappend date "YYYY MM DD"
set start_date [calendar::to_sql_datetime -date $date -time $start_time -time_p $time_p]
set end_date [calendar::to_sql_datetime -date $date -time $end_time -time_p $time_p]
@@ -228,6 +242,13 @@
ad_script_abort
} -edit_data {
+ set date [split $date "-"]
+ lappend date ""
+ lappend date ""
+ lappend date ""
+ lappend date "YYYY MM DD"
+
+
# Require write permission on the item and create on the calendar into which we're putting it
permission::require_write_permission -object_id $cal_item_id
if { ![calendar::personal_p -calendar_id $calendar_id] } {
Index: openacs-4/packages/dotlrn/www/admin/term-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/term-edit.tcl,v
diff -u -r1.6.2.2.4.2 -r1.6.2.2.4.3
--- openacs-4/packages/dotlrn/www/admin/term-edit.tcl 11 Oct 2004 06:22:00 -0000 1.6.2.2.4.2
+++ openacs-4/packages/dotlrn/www/admin/term-edit.tcl 23 Nov 2004 18:29:52 -0000 1.6.2.2.4.3
@@ -51,14 +51,20 @@
{term_year:text {label "[_ dotlrn.lt_Year_eg_2003_20032004]"}
{html {size 9 maxlength 9}}}
- {start_date:date
+ {start_date:text(text)
{label "[_ dotlrn.Start_Date]"}
- {format {[lc_get formbuilder_date_format]}}
+ #{format {[lc_get formbuilder_date_format]}}
+ {html {id sel1}}
+ {after_html { \[y-m-d \]
+ }}
}
- {end_date:date
+ {end_date:text(text)
{label "[_ dotlrn.End_Date]"}
- {format {[lc_get formbuilder_date_format]}}
+ #{format {[lc_get formbuilder_date_format]}}
+ {html {id sel2}}
+ {after_html { \[y-m-d \]
+ }}
}
} -validate {
@@ -68,6 +74,21 @@
}
} -edit_data {
+ # Setting the rigth format to send to the procedures
+ # dotlrn_term::start_end_dates_to_term_year and
+ # dotlrn_term::new
+
+ set start_date [split $start_date "-"]
+ lappend start_date ""
+ lappend start_date ""
+ lappend start_date ""
+ lappend start_date "MONTH DD YYYY"
+ set end_date [split $end_date "-"]
+ lappend end_date ""
+ lappend end_date ""
+ lappend end_date ""
+ lappend end_date "MONTH DD YYYY"
+
dotlrn_term::edit \
-term_id $term_id \
-term_name $term_name \
Index: openacs-4/packages/dotlrn/www/admin/term-new.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/term-new.tcl,v
diff -u -r1.8.6.2 -r1.8.6.3
--- openacs-4/packages/dotlrn/www/admin/term-new.tcl 11 Oct 2004 06:22:00 -0000 1.8.6.2
+++ openacs-4/packages/dotlrn/www/admin/term-new.tcl 23 Nov 2004 18:29:40 -0000 1.8.6.3
@@ -34,14 +34,20 @@
{term_name:text {label "[_ dotlrn.Term_eg_Spring_Fall]"} {maxlength 20}
{html {size 30}}}
- {start_date:date
+ {start_date:text(text)
{label "[_ dotlrn.Start_Date]"}
- {format {[lc_get formbuilder_date_format]}}
+ #{format {[lc_get formbuilder_date_format]}}
+ {html {id sel1}}
+ {after_html { \[y-m-d \]
+ }}
}
- {end_date:date
+ {end_date:text(text)
{label "[_ dotlrn.End_Date]"}
- {format {[lc_get formbuilder_date_format]}}
+ #{format {[lc_get formbuilder_date_format]}}
+ {html {id sel2}}
+ {after_html { \[y-m-d \]
+ }}
}
} -validate {
@@ -50,6 +56,21 @@
"The term must start before it ends"
}
} -on_submit {
+
+ # Setting the rigth format to send to the procedures
+ # dotlrn_term::start_end_dates_to_term_year and
+ # dotlrn_term::new
+
+ set start_date [split $start_date "-"]
+ lappend start_date ""
+ lappend start_date ""
+ lappend start_date ""
+ lappend start_date "MONTH DD YYYY"
+ set end_date [split $end_date "-"]
+ lappend end_date ""
+ lappend end_date ""
+ lappend end_date ""
+ lappend end_date "MONTH DD YYYY"
set term_year [dotlrn_term::start_end_dates_to_term_year \
-start_date $start_date \