Add attachment sizes to enquiry table
better error view for email sending problems
This commit is contained in:
parent
e4c38d33fc
commit
925ef2133c
|
|
@ -958,8 +958,8 @@ EOT;
|
|||
}
|
||||
else {
|
||||
$this->set('smtp_errors', $this->Email->smtpError);
|
||||
print_r($this->Email->smtpError);
|
||||
$this->Session->setFlash(__('The Email has NOT been sent. Something went wrong.', true));
|
||||
|
||||
$this->Session->setFlash(__('The Email has NOT been sent', true));
|
||||
//$this->redirect(array('action'=>'view/'.$id), null, false);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
<?php if(!empty($smtp_errors)) { ?>
|
||||
<h2>Email error information</h2>
|
||||
<pre>
|
||||
<?php print_r($smtp_errors); ?>
|
||||
</pre>
|
||||
<?php } ?>
|
||||
|
|
@ -8,6 +8,12 @@ echo $javascript->link('document_attachments');
|
|||
?>
|
||||
<?=$this->element('pdf_created_message'); ?>
|
||||
|
||||
<?php if(!empty($smtp_errors)) { ?>
|
||||
<h2>Email error</h2>
|
||||
<pre>
|
||||
<?php print_r($smtp_errors); ?>
|
||||
</pre>
|
||||
<?php } ?>
|
||||
<?
|
||||
echo $this->element($docTypeElement);
|
||||
?>
|
||||
|
|
@ -41,9 +47,13 @@ echo $form->input("DocPage.content", array('class'=>'page', 'label'=>'Page', 'be
|
|||
<th>Filename</th>
|
||||
<th>Name</th>
|
||||
<th>Desc</th>
|
||||
<th>Size</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
<?php
|
||||
|
||||
$totalSize = 0;
|
||||
|
||||
foreach($attachments as $index => $attachment) {
|
||||
?>
|
||||
<tr>
|
||||
|
|
@ -58,9 +68,21 @@ foreach($attachments as $index => $attachment) {
|
|||
</td>
|
||||
<td><?php echo $attachment['Attachment']['name']; ?></td>
|
||||
<td><?php echo $attachment['Attachment']['description']; ?></td>
|
||||
<td><?php echo $number->toReadableSize($attachment['Attachment']['size']); ?></td>
|
||||
<?php $totalSize += $attachment['Attachment']['size']; ?>
|
||||
</tr>
|
||||
|
||||
<?php }
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><?php echo $number->toReadableSize($totalSize); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- #attachments-table -->
|
||||
|
|
|
|||
Loading…
Reference in a new issue