Permalink
Browse files

Adding simple error handling for form display

  • Loading branch information...
1 parent 3384a9d commit 443e84f97c7aae201dd8a0789b4afc883a65dd81 Michael Lawrence Evans committed Feb 7, 2012
Showing with 8 additions and 4 deletions.
  1. +8 −4 site/templates/scan.html.tpl
@@ -93,10 +93,14 @@
{/if}
</p>
<div class="fieldSet">
- <iframe style="margin-left: 20px; margin-top: 20px;" width="500px"
- height="450px" align="middle" frameborder="0"
- src="{$form.form_url}">
- </iframe>
+ {if $form.form_url}
+ <iframe style="margin-left: 20px; margin-top: 20px;" width="500px"
+ height="450px" align="middle" frameborder="0"
+ src="{$form.form_url}">
+ </iframe>
+ {else}
+ <p>We could not find your form!</p>
+ {/if}
<form action="{$base_dir}/fieldset.php?id={$scan.id}" method="post">
<div><span id="notes_title">Notes</span></div><br />
<textarea name="notes" id="notes" cols="45" rows="5"></textarea>

0 comments on commit 443e84f

Please sign in to comment.