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 {
|
else {
|
||||||
$this->set('smtp_errors', $this->Email->smtpError);
|
$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);
|
//$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'); ?>
|
<?=$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);
|
echo $this->element($docTypeElement);
|
||||||
?>
|
?>
|
||||||
|
|
@ -41,9 +47,13 @@ echo $form->input("DocPage.content", array('class'=>'page', 'label'=>'Page', 'be
|
||||||
<th>Filename</th>
|
<th>Filename</th>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Desc</th>
|
<th>Desc</th>
|
||||||
|
<th>Size</th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
$totalSize = 0;
|
||||||
|
|
||||||
foreach($attachments as $index => $attachment) {
|
foreach($attachments as $index => $attachment) {
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -58,9 +68,21 @@ foreach($attachments as $index => $attachment) {
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo $attachment['Attachment']['name']; ?></td>
|
<td><?php echo $attachment['Attachment']['name']; ?></td>
|
||||||
<td><?php echo $attachment['Attachment']['description']; ?></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>
|
</tr>
|
||||||
|
|
||||||
<?php } ?>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div> <!-- #attachments-table -->
|
</div> <!-- #attachments-table -->
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue