Complain in Closed Dates Editor when ending date is earlier than starting date.
Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Ben Shum <bshum@biblio.org>
<!ENTITY staff.server.admin.closed_dates.confirm_delete "Are you sure you wish to delete the selected close date?">
<!ENTITY staff.server.admin.closed_dates.date.invalid "Invalid date format">
<!ENTITY staff.server.admin.closed_dates.time.invalid "Invalid time format">
+<!ENTITY staff.server.admin.closed_dates.date_span.invalid "Ending date is earlier than starting date">
<!ENTITY staff.server.admin.closed_dates.success "Closed date successfully updated">
<!ENTITY staff.server.admin.copy_locations.title "Evergreen: Copy Locations Editor">
<!ENTITY staff.server.admin.copy_locations.editor " Copy Locations Editor ">
end = cdDateStrToDate(edate + ' ' + etime);
}
+ if (end.getTime() < start.getTime()) {
+ alertId('cd_invalid_date_span');
+ return;
+ }
+
cdCreate(start, end, $('cd_edit_note').value);
}
<span class='hide_me' id='cd_invalid_date'>&staff.server.admin.closed_dates.date.invalid;</span>
<span class='hide_me' id='cd_invalid_time'>&staff.server.admin.closed_dates.time.invalid;</span>
<span class='hide_me' id='cd_update_success'>&staff.server.admin.closed_dates.success;</span>
+ <span class='hide_me' id='cd_invalid_date_span'>&staff.server.admin.closed_dates.date_span.invalid;</span>
</center>
</body>