</div> </div> <script> (function($) { $(document).ready(function() { jQuery('#cp-task-due-date').datepicker( { altFormat: 'yy-mm-dd', altField: '#cp-task-due-date-formatted', dateFormat: '<?php echo cp_translate_date_format_for_js_datepicker(); ?> ' }) .datepicker( 'setDate', '<?php echo cp_get_task_due_date(cp_get_task_id()); ?> ' ); // init the datepicker // Handle checkbox change for a task $('#item-completed').change( function(event) { var task_id = $('#cp-task-id').val(); var data = { task_id: task_id, task_status: ( $(this).is(':checked') ? 'complete' : 'open' ), collabpress_ajax_request_origin: '<?php echo is_admin() ? 'admin' : 'frontend'; ?> ', }; var nonce = jQuery( '#item-complete-status-change-nonce_' + task_id ).val();
<div id='edit_task_inline_content' style='padding:10px; background:#fff;'> <form id="edit-task-form"> <h2><?php _e('Edit Task', 'collabpress'); ?> </h2> <input type="hidden" id="edit_task_nonce" value="<?php echo wp_create_nonce('edit-task'); ?> " /> <input type="hidden" id="cp-project-id" value="<?php echo cp_get_project_id(); ?> " /> <input type="hidden" id="cp-task-id" value="<?php echo cp_get_task_id(); ?> " /> <table class="form-table"> <tbody> <tr valign="top"> <th scope="row"><?php _e('Description: ', 'collabpress'); ?> </th> <td><fieldset><legend class="screen-reader-text"><span></span></legend> <p><label for="cp-task"></label></p> <p> <textarea class="large-text code" id="cp-task" cols="30" rows="10" name="cp-task"><?php echo cp_get_the_task_description(); ?>