PageRenderTime 53ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/sys/templates/default/modules/inventory/edit.tpl

http://simpleinvoices.googlecode.com/
Smarty Template | 90 lines | 80 code | 10 blank | 0 comment | 5 complexity | 99991ab09d0b8d6d16e1fe80e479b5be MD5 | raw file
Possible License(s): GPL-3.0, LGPL-2.1, GPL-2.0, LGPL-3.0
  1. {if $saved == 'true' }
  2. <meta http-equiv="refresh" content="2;URL=index.php?module=inventory&amp;view=manage" />
  3. <br />
  4. {$LANG.save_inventory_success}
  5. <br />
  6. <br />
  7. {/if}
  8. {if $saved == 'false' }
  9. <meta http-equiv="refresh" content="2;URL=index.php?module=inventory&amp;view=manage" />
  10. <br />
  11. {$LANG.save_inventory_failure}
  12. <br />
  13. <br />
  14. {/if}
  15. {if $saved ==false}
  16. {if $smarty.post.op == 'add' AND $smarty.post.product_id == ''}
  17. <div class="validation_alert"><img src="{$baseUrl}images/common/important.png" alt="" />
  18. You must select a product</div>
  19. <hr />
  20. {/if}
  21. <div id="gmail_loading" class="gmailLoader" style="float:right; display: none;">
  22. <img src="images/common/gmail-loader.gif" alt="{$LANG.loading} ..." /> {$LANG.loading} ...
  23. </div>
  24. <form name="frmpost" action="index.php?module=inventory&view=edit&id={$inventory.id|urlencode}" method="POST" id="frmpost">
  25. <br />
  26. <table align="center">
  27. <tr wrap="nowrap">
  28. <td class="details_screen">{$LANG.date_upper}</td>
  29. <td wrap="nowrap">
  30. <input type="text" class="validate[required,custom[date],length[0,10]] date-picker" size="10" name="date" id="date" value='{$inventory.date|htmlsafe}' />
  31. </td>
  32. </tr>
  33. <tr>
  34. <td class="details_screen">{$LANG.product}</td>
  35. <td>
  36. <select name="product_id" class="validate[required] product_inventory_change">
  37. <option value=''></option>
  38. {foreach from=$product_all item=product}
  39. <option value="{$product.id|htmlsafe}" {if $product.id == $inventory.product_id}selected{/if} >
  40. {$product.description|htmlsafe}
  41. </option>
  42. {/foreach}
  43. </select>
  44. </td>
  45. </tr>
  46. <tr>
  47. <td class="details_screen">{$LANG.quantity}</td>
  48. <td>
  49. <input name="quantity" size="10" class="validate[required]" value='{$inventory.quantity|siLocal_number_formatted}'>
  50. </td>
  51. </tr>
  52. <tr>
  53. <td class="details_screen">{$LANG.cost}</td>
  54. <td>
  55. <input id="cost" name="cost" size="10" class="validate[required]" value='{$inventory.cost|siLocal_number_formatted}'>
  56. </td>
  57. </tr>
  58. <tr>
  59. <td class="details_screen">{$LANG.notes}</td>
  60. <td><textarea name="note" class="editor" rows="8" cols="50">{$inventory.note|outhtml}</textarea></td>
  61. </tr>
  62. </table>
  63. <br />
  64. <table class="buttons" align="center">
  65. <tr>
  66. <td>
  67. <button type="submit" class="positive" name="id" value="{$LANG.save}">
  68. <img class="button_img" src="{$baseUrl}images/common/tick.png" alt="" />
  69. {$LANG.save}
  70. </button>
  71. <input type="hidden" name="op" value="edit" />
  72. <a href="./index.php?module=inventory&view=manage" class="negative">
  73. <img src="{$baseUrl}images/common/cross.png" alt="" />
  74. {$LANG.cancel}
  75. </a>
  76. </td>
  77. </tr>
  78. </table>
  79. </form>
  80. {/if}