Added confirm box to first page overwrite
This commit is contained in:
parent
da23179673
commit
4f9ef7198d
|
|
@ -34,6 +34,15 @@
|
||||||
<br />
|
<br />
|
||||||
<u><b>Attachments:</b></u><br />
|
<u><b>Attachments:</b></u><br />
|
||||||
CMC Technologies Terms & Conditions of Sale 1/7/06 (attached)<br>
|
CMC Technologies Terms & Conditions of Sale 1/7/06 (attached)<br>
|
||||||
<?php foreach($attachments as $attachment) {; ?>
|
<?php foreach($attachments as $attachment) { ?>
|
||||||
<?php echo $attachment['Attachment']['name']; ?> (<?=$pagecounter->count($attachment['Attachment']['file']); ?> pages)<br>
|
<?php
|
||||||
<?php } ?>
|
|
||||||
|
$pagecount = '';
|
||||||
|
|
||||||
|
if($attachment['Attachment']['type'] == 'application/pdf') {
|
||||||
|
$pagecount = '('.$pagecounter->count($attachment['Attachment']['file']).') pages';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?= $attachment['Attachment']['name']; ?> <?= $pagecount ?><br>
|
||||||
|
<?php
|
||||||
|
} ?>
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,11 @@ echo $form->input('Document.id');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="docButtons">
|
<div class="docButtons">
|
||||||
<button id="generateFirstPage">(re)Generate First Page</button>
|
<button id="generateFirstPage">Generate first fage</button>
|
||||||
<button id="addPage">Add Content Page</button>
|
<button id="addPage">Add Content Page</button>
|
||||||
<button id="editQuoteDetails">View/Edit Quote Details</button>
|
<button id="editQuoteDetails">View/Edit Quote details</button>
|
||||||
|
<button id="pdfDocButton">Generate PDF</button>
|
||||||
|
<button id="emailDocButton">Email Quote to customer</button>
|
||||||
<?=$html->link('Generate PDF of this Quote', '/documents/pdf/'.$document['Document']['id']);?>
|
<?=$html->link('Generate PDF of this Quote', '/documents/pdf/'.$document['Document']['id']);?>
|
||||||
<?=$html->link('Email this Quote', '/documents/email_pdf/'.$document['Document']['id']);?>
|
<?=$html->link('Email this Quote', '/documents/email_pdf/'.$document['Document']['id']);?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -352,13 +352,20 @@ $(function() {
|
||||||
if($(".firstPage").length == 0) {
|
if($(".firstPage").length == 0) {
|
||||||
newPage(true);
|
newPage(true);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
var confirmed = confirm("This will overwrite any changes you have made to the first page");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(confirmed) {
|
||||||
$.get('/documents/generateFirstPage/'+docID, function(data) {
|
$.get('/documents/generateFirstPage/'+docID, function(data) {
|
||||||
$(".firstPage").val(data);
|
$(".firstPage").val(data);
|
||||||
savePages();
|
savePages();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#pdfDocButton").click(function() {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue