Пример #1
0
            // need to switch 1 and -1
        } else {
            return 1;
        }
    });
}
if (isset($_POST["page_action"]) && $_POST["page_action"] == "history") {
    $action = $ow_history_service->get_action_history_by_from_id($_POST["actionid"]);
    $post_id = $action->post_id;
    if ($action) {
        $comments[] = json_decode($action->comment);
    }
}
if (isset($_POST["page_action"]) && $_POST["page_action"] == "review") {
    $action = $ow_history_service->get_review_action_by_id($_POST["actionid"]);
    $action_history = $ow_history_service->get_action_history_by_id($action->action_history_id);
    $post_id = $action_history->post_id;
    if ($action) {
        $comments[] = json_decode($action->comments);
    }
}
?>
<div id="ow-editorial-readonly-comment-popup">
   <div id="ow-comment-popup" class="ow-modal-dialog ow-top_15">
      <a class="ow-modal-close" onclick="ow_modal_close(event);"></a>
      <div class="ow-modal-header">
         <h3 class="ow-modal-title" id="poststuff"><?php 
echo __('Editorial Comments On: ') . get_the_title($post_id);
?>
</h3>
      </div>
Пример #2
0
 public function send_step_email($action_id, $to_user_id = null)
 {
     // sanitize the input
     $action_id = intval($action_id);
     $to_user_id = intval($to_user_id);
     $ow_history_service = new OW_History_Service();
     $action_step = $ow_history_service->get_action_history_by_id($action_id);
     $to_user_id = $to_user_id ? $to_user_id : $action_step->assign_actor_id;
     $mails = $this->get_step_mail_content($action_id, $action_step->step_id, $to_user_id, $action_step->post_id);
     $comment = $this->get_step_comment_content($action_id);
     $data = array('to_user' => $to_user_id, 'history_id' => $action_id, 'create_datetime' => current_time('mysql'));
     // send email if setting is true
     $emails_table = OW_Utility::instance()->get_emails_table_name();
     $email_settings = get_option('oasiswf_email_settings');
     if ($mails->assign_subject && $mails->assign_content && $email_settings['assignment_emails'] == "yes") {
         $mail_content = $mails->assign_content . $comment;
         $this->send_mail($to_user_id, $mails->assign_subject, $mail_content);
         $data["subject"] = $mails->assign_subject;
         $data["message"] = $mail_content;
         $data["send_date"] = current_time('mysql');
         $data["action"] = 0;
         OW_Utility::instance()->insert_to_table($emails_table, $data);
     }
     // set reminder email for future delivery
     if ($mails->reminder_subject && $mails->reminder_content) {
         $mail_content = $mails->reminder_content . $comment;
         $data["subject"] = $mails->reminder_subject;
         $data["message"] = $mail_content;
         $data["action"] = 1;
         // for reminder before date
         if ($action_step->reminder_date) {
             $data["send_date"] = $action_step->reminder_date;
             OW_Utility::instance()->insert_to_table($emails_table, $data);
         }
         // for reminder after date
         if ($action_step->reminder_date_after) {
             $data["send_date"] = $action_step->reminder_date_after;
             OW_Utility::instance()->insert_to_table($emails_table, $data);
         }
     }
 }
Пример #3
0
if (isset($_GET["task_user"]) && sanitize_text_field($_GET["task_user"])) {
    $task_user = intval(sanitize_text_field($_GET["task_user"]));
} else {
    if (isset($_GET["user"]) && sanitize_text_field($_GET["user"])) {
        $task_user = intval(sanitize_text_field($_GET["user"]));
    } else {
        $task_user = "";
    }
}
$editable = current_user_can('edit_posts');
$post_id = null;
$ow_process_flow = new OW_Process_Flow();
$ow_history_service = new OW_History_Service();
$ow_workflow_service = new OW_Workflow_Service();
if ($action_history_id) {
    $current_action = $ow_history_service->get_action_history_by_id($action_history_id);
    $current_step = $ow_workflow_service->get_step_by_id($current_action->step_id);
    $process = $ow_workflow_service->get_gpid_dbid($current_step->workflow_id, $current_action->step_id, "process");
    $success_status = json_decode($current_step->step_info);
    $success_status = $success_status->status;
    $post_id = $current_action->post_id;
}
$default_due_days = get_option('oasiswf_default_due_days');
$default_date = '';
if (!empty($default_due_days)) {
    $default_date = date(OASISWF_EDIT_DATE_FORMAT, current_time('timestamp') + DAY_IN_SECONDS * $default_due_days);
}
$reminder_days = get_option('oasiswf_reminder_days');
$reminder_days_after = get_option('oasiswf_reminder_days_after');
$workflow_terminology_options = get_option('oasiswf_custom_workflow_terminology');
$sign_off_label = !empty($workflow_terminology_options['signOffText']) ? $workflow_terminology_options['signOffText'] : __('Sign Off', 'oasisworkflow');
Пример #4
0
<?php

$history_id = trim($_POST["oasiswf"]);
// sanitize data
$history_id = intval(sanitize_text_field($history_id));
$task_user = isset($_POST["task_user"]) && $_POST["task_user"] ? trim($_POST["task_user"]) : get_current_user_id();
// sanitize data
$task_user = intval(sanitize_text_field($task_user));
$ow_process_flow = new OW_Process_Flow();
$ow_history_service = new OW_History_Service();
$workflow_service = new OW_Workflow_Service();
$history_details = $ow_history_service->get_action_history_by_id($history_id);
$user_info = $ow_process_flow->get_users_in_step_internal($history_details->step_id);
$users = $user_info["users"];
?>
<div id="reassgn-setting" class="info-setting">
	<div class="dialog-title"><strong><?php 
echo __("Reassign", "oasisworkflow");
?>
</strong></div>
	<br class="clear">
	<div class="owf-text-info left full-width">
		<div class="left">
			<label><?php 
echo __("Select a User: "******"oasisworkflow");
?>
</label>
		</div>
		<div class="left">	
			<select id="reassign_actors" style="width:200px;">
				<option value=""></option>
Пример #5
0
 private function set_loading_post_status()
 {
     $status_info = sanitize_text_field($_POST["hi_process_info"]);
     $post_id = intval(sanitize_text_field($_POST["post_ID"]));
     $temp_array = explode("@#@", $status_info);
     $ow_history_service = new OW_History_Service();
     $action = $ow_history_service->get_action_history_by_id($temp_array[0]);
     $this->copy_step_status_to_post($post_id, $action->step_id, $temp_array[1]);
 }