Merge pull request #394 from brayanpereyra/BUG-4763

BUG 4763 Add notes when pause or cancel case SOLVED
This commit is contained in:
julceslauhub
2012-07-25 15:39:51 -07:00
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'])) {