I've figured out the code to add the pop up calendar to the edit notes page.
Backup your admin/notes.php before you make any changes so you can put things back if there are any problems!!!
The only file to edit is admin/notes.php as follows:
Line 304:
Code:
<body onLoad="init()">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
to:
Code:
<body onLoad="init()">
<div id="spiffycalendar" class="text"></div>
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
Line 368:
Code:
case 'edit':
// $parameters =
// ((isset($_GET['cPath'])) ? $_GET['cPath'] : $note->fields['categories_id'])
// ((isset($_GET['pID'])) ? '<strong class="notesCheckValue">*</strong>' : '')
// ((isset($_GET['oID'])) ? '<strong class="notesCheckValue">*</strong>' : '')
// ((isset($_GET['cID'])) ? '<strong class="notesCheckValue">*</strong>' : '')
echo zen_draw_form('edit_note', FILENAME_NOTES, zen_get_all_get_params(array('action')) . '&action=update'); ?>
to:
Code:
case 'edit':
// $parameters =
// ((isset($_GET['cPath'])) ? $_GET['cPath'] : $note->fields['categories_id'])
// ((isset($_GET['pID'])) ? '<strong class="notesCheckValue">*</strong>' : '')
// ((isset($_GET['oID'])) ? '<strong class="notesCheckValue">*</strong>' : '')
// ((isset($_GET['cID'])) ? '<strong class="notesCheckValue">*</strong>' : '')
?>
<link rel="stylesheet" type="text/css" href="includes/javascript/spiffyCal/spiffyCal_v2_1.css">
<script language="JavaScript" src="includes/javascript/spiffyCal/spiffyCal_v2_1.js"></script>
<script language="javascript">
var startDate = new ctlSpiffyCalendarBox("startDate", "edit_note", "notes_start_date","btnDate1","<?php echo $note->fields['notes_start_date']; ?>",scBTNMODE_CUSTOMBLUE);
var endDate = new ctlSpiffyCalendarBox("endDate", "edit_note", "notes_end_date","btnDate2","<?php echo $note->fields['notes_end_date']; ?>",scBTNMODE_CUSTOMBLUE);
</script>
<?php echo zen_draw_form('edit_note', FILENAME_NOTES, zen_get_all_get_params(array('action')) . '&action=update'); ?>
Line 380:
Code:
<tr><th><?php echo TEXT_INFO_NOTE_START_DATE; ?></th><td><?php echo zen_draw_input_field('notes_start_date', zen_date_short($note->fields['notes_start_date'])); ?></td></tr>
<tr><th><?php echo TEXT_INFO_NOTE_END_DATE; ?></th><td><?php echo zen_draw_input_field('notes_end_date', zen_date_short($note->fields['notes_end_date'])); ?></td></tr>
to:
Code:
<tr><th><?php echo TEXT_INFO_NOTE_START_DATE; ?></th><td class="main"><script language="javascript">startDate.writeControl(); startDate.dateFormat="yyyy-MM-dd";</script></td></tr>
<tr><th><?php echo TEXT_INFO_NOTE_END_DATE; ?></th><td class="main"><script language="javascript">endDate.writeControl(); endDate.dateFormat="yyyy-MM-dd";</script></td></tr>
Finally, line 183:
Code:
case 'update':
$db->Execute("update " . TABLE_NOTES . "
SET
`notes_status` = '" . zen_db_input(zen_db_prepare_input($_POST['notes_status'])) . "',
`notes_title` = '" . zen_db_input(zen_db_prepare_input($_POST['notes_title'])) . "',
`notes_text` = '" . zen_db_input(zen_db_prepare_input($_POST['notes_text'])) . "',
`notes_start_date` = '" . zen_db_input(zen_db_prepare_input(zen_date_raw($_POST['notes_start_date']))) . "',
`notes_end_date` = '" . zen_db_input(zen_db_prepare_input(zen_date_raw($_POST['notes_end_date']))) . "',
`notes_date_modified` = NOW(),
`notes_categories_id` = '" . (int)$_POST['notes_categories_id'] . "',
`notes_priority` = '" . (int)$_POST['notes_priority'] . "',
`notes_is_special_status` = '" . (int)$_POST['notes_is_special_status'] . "',
`customers_id` = '" . (int)$_POST['customers_id'] . "',
`orders_id` = '" . (int)$_POST['orders_id'] . "',
`products_id` = '" . (int)$_POST['products_id'] . "',
`categories_id` = '" . zen_db_input(zen_db_prepare_input($_POST['categories_id'])) . "'
WHERE notes_id = '" . (int)$_POST['notes_id'] . "'");
to:
Code:
case 'update':
$db->Execute("update " . TABLE_NOTES . "
SET
`notes_status` = '" . zen_db_input(zen_db_prepare_input($_POST['notes_status'])) . "',
`notes_title` = '" . zen_db_input(zen_db_prepare_input($_POST['notes_title'])) . "',
`notes_text` = '" . zen_db_input(zen_db_prepare_input($_POST['notes_text'])) . "',
`notes_start_date` = '" . zen_db_input(zen_db_prepare_input($_POST['notes_start_date'])) . "',
`notes_end_date` = '" . zen_db_input(zen_db_prepare_input($_POST['notes_end_date'])) . "',
`notes_date_modified` = NOW(),
`notes_categories_id` = '" . (int)$_POST['notes_categories_id'] . "',
`notes_priority` = '" . (int)$_POST['notes_priority'] . "',
`notes_is_special_status` = '" . (int)$_POST['notes_is_special_status'] . "',
`customers_id` = '" . (int)$_POST['customers_id'] . "',
`orders_id` = '" . (int)$_POST['orders_id'] . "',
`products_id` = '" . (int)$_POST['products_id'] . "',
`categories_id` = '" . zen_db_input(zen_db_prepare_input($_POST['categories_id'])) . "'
WHERE notes_id = '" . (int)$_POST['notes_id'] . "'");
Bookmarks