Added some basic error checking for addedit line items
This commit is contained in:
parent
3a39d5ba63
commit
4cc13184c5
6
vendors/pdfdoc.php
vendored
6
vendors/pdfdoc.php
vendored
|
|
@ -121,8 +121,12 @@ ENDHTML;
|
||||||
$this->MultiCell($firstColWidth, 0, "$docTypeFullName TO:", 'LTR', 'L', 0, 0);
|
$this->MultiCell($firstColWidth, 0, "$docTypeFullName TO:", 'LTR', 'L', 0, 0);
|
||||||
$this->MultiCell($secondColWidth, 0, $companyName, 'LTR', 'L', 0, 0);
|
$this->MultiCell($secondColWidth, 0, $companyName, 'LTR', 'L', 0, 0);
|
||||||
|
|
||||||
|
$fromString = <<<ENDSTRING
|
||||||
|
<a href="mailto:{$fromEmail}">{$fromName}</a>
|
||||||
|
ENDSTRING;
|
||||||
|
|
||||||
$this->MultiCell($thirdColWidth, 0, "FROM:", 'LT', 'L', 0, 0);
|
$this->MultiCell($thirdColWidth, 0, "FROM:", 'LT', 'L', 0, 0);
|
||||||
$this->MultiCell($fourthColWidth, 0, "<a href=\"mailto:$fromEmail\">$fromName</a>", 'TR', 'L', false, 1, null,null, true,0,true, false, 0, null, false); //Start a new line after this.
|
$this->MultiCell($fourthColWidth, 0, $fromString, 'TR','L', 0, 1, null, null, true, 0, true); //Start a new line after this.
|
||||||
|
|
||||||
|
|
||||||
$this->MultiCell($firstColWidth, 0, "EMAIL TO:", 'LR', 'L', 0, 0);
|
$this->MultiCell($firstColWidth, 0, "EMAIL TO:", 'LR', 'L', 0, 0);
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,16 @@ $(function() {
|
||||||
var thisLineItemInputs = $('#LineItemAddForm').find('input,select,textarea');
|
var thisLineItemInputs = $('#LineItemAddForm').find('input,select,textarea');
|
||||||
|
|
||||||
$.post('/line_items/ajax_add', thisLineItemInputs, function(data) {
|
$.post('/line_items/ajax_add', thisLineItemInputs, function(data) {
|
||||||
|
|
||||||
|
if(data == 'SUCCESS') {
|
||||||
$( "#addLineItemModal" ).dialog('close');
|
$( "#addLineItemModal" ).dialog('close');
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
alert("Line Item could not be saved")
|
||||||
|
$('#LineItemDescription').ckeditor(config);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -69,8 +77,19 @@ $(function() {
|
||||||
var thisLineItemInputs = $('#LineItemEditForm').find('input,select,textarea');
|
var thisLineItemInputs = $('#LineItemEditForm').find('input,select,textarea');
|
||||||
|
|
||||||
$.post('/line_items/ajax_edit', thisLineItemInputs, function(data) {
|
$.post('/line_items/ajax_edit', thisLineItemInputs, function(data) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(data == 'SUCCESS') {
|
||||||
$( "#editLineItemModal" ).dialog('close');
|
$( "#editLineItemModal" ).dialog('close');
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
alert("Line Item could not be saved")
|
||||||
|
$('#LineItemDescription').ckeditor(config);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue