BUG 4763 Add notes when pause or cancel case SOLVED

- I add field textarea for comment the pause or cancel
- I add field checkbox for notify to case users the pause or cancel
This commit is contained in:
Brayan Osmar Pereyra Suxo
2012-07-25 16:54:54 -04:00
parent fbdf3b1eec
commit c921867292
4 changed files with 218 additions and 53 deletions

View File

@@ -440,6 +440,15 @@ class Ajax
$DEL_INDEX = $_SESSION['INDEX'];
}
// Save the note pause reason
if ($_POST['NOTE_REASON'] != '') {
require_once ( "classes/model/AppNotes.php" );
$appNotes = new AppNotes();
$noteContent = addslashes($_POST['NOTE_REASON']);
$appNotes->postNewNote($APP_UID, $_SESSION['USER_LOGGED'], $noteContent, $_POST['NOTIFY_PAUSE']);
}
// End save
if( $multiple ) {
foreach($appUids as $i=>$appUid)
$oCase->cancelCase($appUid, $delIndexes[$i], $_SESSION['USER_LOGGED']);
@@ -497,6 +506,15 @@ class Ajax
$DEL_INDEX = $_SESSION['INDEX'];
}
// Save the note pause reason
if ($_REQUEST['NOTE_REASON'] != '') {
require_once ( "classes/model/AppNotes.php" );
$appNotes = new AppNotes();
$noteContent = addslashes($_REQUEST['NOTE_REASON']);
$appNotes->postNewNote($APP_UID, $_SESSION['USER_LOGGED'], $noteContent, $_REQUEST['NOTIFY_PAUSE']);
}
// End save
$oCase->pauseCase($APP_UID, $DEL_INDEX, $_SESSION['USER_LOGGED'], $unpauseDate);
$app = new Application();
$caseData = $app->load($APP_UID);

View File

@@ -401,6 +401,15 @@ switch (($_POST['action'])?$_POST['action']:$_REQUEST['action']) {
G::RenderPage('publish', 'raw');
break;
case 'pauseCase':
// Save the note pause reason
if ($_POST['NOTE_REASON'] != '') {
require_once ( "classes/model/AppNotes.php" );
$appNotes = new AppNotes();
$noteContent = addslashes($_POST['NOTE_REASON']);
$result = $appNotes->postNewNote($_POST['APP_UID'], $_SESSION['USER_LOGGED'], $noteContent, $_POST['NOTIFY_PAUSE']);
}
// End save
$unpauseDate = $_POST['unpausedate'];
$oCase = new Cases();
if (isset($_POST['APP_UID']) && isset($_POST['DEL_INDEX'])) {