diff options
| author | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-06-01 18:46:12 +0200 |
|---|---|---|
| committer | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-06-01 18:46:12 +0200 |
| commit | af6dd5f8f9844596e85db25a8e97df9e08cb795c (patch) | |
| tree | 8408e754dd335571635bcde041bbce69213af592 /templates/productedit.tpl | |
| parent | be50d9ed4ba2b844bbc29686cee46b1dc149372a (diff) | |
| download | Catalog-af6dd5f8f9844596e85db25a8e97df9e08cb795c.tar.gz Catalog-af6dd5f8f9844596e85db25a8e97df9e08cb795c.zip | |
Port alls sites to smarty and use the inheritance model
Diffstat (limited to 'templates/productedit.tpl')
| -rw-r--r-- | templates/productedit.tpl | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/templates/productedit.tpl b/templates/productedit.tpl new file mode 100644 index 0000000..ccd8483 --- /dev/null +++ b/templates/productedit.tpl @@ -0,0 +1,66 @@ +{extends file="layout.tpl"} +{block name=title}{$product->getName()}{/block} +{block name=navigation} +<dl> + <dt><a href="contact.php">Contact us</a></dt> + <dt><a href=".">Home</a></dt> + <dt><a href="categories.php">Categories</a></dt> + <dt><a href="products.php?id={$catid}">Back</a></dt> + {if $loggedin} + <dt><a href="login.php?logout">Logout</a></dt> + {else} + <dt><a href="login.php">Login</a></dt> + {/if} +</dl> +{/block} +{block name=content} +<form action="productedit.php?{$type}={$product->getId()}&catid={$catid}" method="post"> + <h1>{block name=title}{/block}</h1> + <div class="row"> + <label for="name"><u>N</u>ame:</label> + <input class="formw" type="text" + placeholder="Name" id="name" name="name" accesskey="n" + maxlength="100" value="{$product->getName()}"> + </div> + <div class="row"> + <label for="price"><u>P</u>rice (Euro):</label> + <input class="formw" type="number" step="0.01" min="0" + placeholder="Price (Euro)" id="price" name="price" accesskey="p" + maxlength="13" value="{$product->getPrice()}"> + </div> + <div class="row"> + <label for="width"><u>W</u>idth (mm):</label> + <input class="formw" type="number" + placeholder="Width (mm)" id="width" name="width" accesskey="w" + maxlength="11" value="{$product->getWidth()}"> + </div> + <div class="row"> + <label for="height"><u>H</u>eight (mm):</label> + <input class="formw" type="number" + placeholder="Height (mm)" id="height" name="height" accesskey="h" + maxlength="11" value="{$product->getHeight()}"> + </div> + <div class="row"> + <label for="desc"><u>D</u>escription:</label> + <textarea class="formw" placeholder="Description" id="desc" name="desc" + accesskey="d" maxlength="1000">{$product->getDescription()}</textarea> + </div> + <div class="row"> + <label for="cat"><u>C</u>ategories:</label> + <select multiple class="formw" id="cat" name="cat[]" accesskey="c"> + {foreach from=$allCategories item=category} + <option value="{$category->getId()}" + {if $product->getCategories()->contains($category)}selected{/if} + >{$category->getName()}</option> + {/foreach} + </select> + </div> + <div class="spacer"> </div> + <button type="submit"> + {$type|capitalize} + </button> + <button type="reset"> + Reset + </button> +</form> +{/block}
\ No newline at end of file |
