Lines 86-112
sub edit_holiday {
Link Here
|
86 |
} |
86 |
} |
87 |
} |
87 |
} |
88 |
} elsif ($showoperation eq 'edit') { |
88 |
} elsif ($showoperation eq 'edit') { |
89 |
if($holidaytype eq 'weekday') { |
89 |
if ( $holidaytype eq 'weekday' ) { |
90 |
$calendar->ModWeekdayholiday(weekday => $weekday, |
90 |
my $isHoliday = $calendar->isHoliday( $day, $month, $year ); |
91 |
title => $title, |
91 |
if ($isHoliday) { |
92 |
description => $description); |
92 |
$calendar->ModWeekdayholiday( |
93 |
} elsif ($holidaytype eq 'daymonth') { |
93 |
weekday => $weekday, |
94 |
$calendar->ModDaymonthholiday(day => $day, |
94 |
title => $title, |
95 |
month => $month, |
95 |
description => $description |
96 |
title => $title, |
96 |
); |
97 |
description => $description); |
97 |
} |
98 |
} elsif ($holidaytype eq 'ymd') { |
98 |
else { |
99 |
$calendar->ModSingleholiday(day => $day, |
99 |
$calendar->insert_week_day_holiday( |
100 |
month => $month, |
100 |
weekday => $weekday, |
101 |
year => $year, |
101 |
title => $title, |
102 |
title => $title, |
102 |
description => $description |
103 |
description => $description); |
103 |
); |
104 |
} elsif ($holidaytype eq 'exception') { |
104 |
} |
105 |
$calendar->ModExceptionholiday(day => $day, |
105 |
} |
106 |
month => $month, |
106 |
elsif ( $holidaytype eq 'daymonth' ) { |
107 |
year => $year, |
107 |
my $isHoliday = $calendar->isHoliday( $day, $month, $year ); |
108 |
title => $title, |
108 |
if ($isHoliday) { |
109 |
description => $description); |
109 |
$calendar->ModDaymonthholiday( |
|
|
110 |
day => $day, |
111 |
month => $month, |
112 |
title => $title, |
113 |
description => $description |
114 |
); |
115 |
} |
116 |
else { |
117 |
$calendar->insert_day_month_holiday( |
118 |
day => $day, |
119 |
month => $month, |
120 |
title => $title, |
121 |
description => $description |
122 |
); |
123 |
} |
124 |
} |
125 |
elsif ( $holidaytype eq 'ymd' ) { |
126 |
my $isHoliday = $calendar->isHoliday( $day, $month, $year ); |
127 |
if ($isHoliday) { |
128 |
$calendar->ModSingleholiday( |
129 |
day => $day, |
130 |
month => $month, |
131 |
year => $year, |
132 |
title => $title, |
133 |
description => $description |
134 |
); |
135 |
} |
136 |
else { |
137 |
$calendar->insert_single_holiday( |
138 |
day => $day, |
139 |
month => $month, |
140 |
year => $year, |
141 |
title => $title, |
142 |
description => $description |
143 |
); |
144 |
} |
145 |
} |
146 |
elsif ( $holidaytype eq 'exception' ) { |
147 |
my $isHoliday = $calendar->isHoliday( $day, $month, $year ); |
148 |
if ($isHoliday) { |
149 |
$calendar->ModExceptionholiday( |
150 |
day => $day, |
151 |
month => $month, |
152 |
year => $year, |
153 |
title => $title, |
154 |
description => $description |
155 |
); |
156 |
} |
157 |
else { |
158 |
$calendar->insert_exception_holiday( |
159 |
day => $day, |
160 |
month => $month, |
161 |
year => $year, |
162 |
title => $title, |
163 |
description => $description |
164 |
); |
165 |
} |
110 |
} |
166 |
} |
111 |
} elsif ($showoperation eq 'delete') { |
167 |
} elsif ($showoperation eq 'delete') { |
112 |
$calendar->delete_holiday(weekday => $weekday, |
168 |
$calendar->delete_holiday(weekday => $weekday, |
113 |
- |
|
|