Advertisement
darryljf

add.tpl - latest

Apr 5th, 2020
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 2.02 KB | None | 0 0
  1. {extends file = "layouts/main.tpl"}
  2. {block name="body"}
  3. <div class="hero" style="background-image: url('./images/banner_1.jpg');">
  4.   <div class="container">
  5.     <h1>Add New Recipe</h1>
  6.   </div>
  7. </div>
  8. <div class="container mt-5">
  9.   {if $error}
  10.   <div class="alert alert-danger mb-3" role="alert">
  11.   {$error}
  12.   </div>
  13.   {else if $success}
  14.   <div class="alert alert-success mb-3" role="alert">
  15.   {$success}
  16.   </div>
  17.   {/if}
  18.  
  19.   <div class="container mt-5">
  20.     <div class="btn-group mb-3" role="group" aria-label="Basic example">
  21.       <a href="index.php?p=account" class="btn btn-secondary">Home</a>
  22.       <a href="index.php?p=favourite" class="btn btn-primary">Favourite Recipes</a>
  23.       <a href="index.php?p=myrecipes" class="btn btn-primary">My Recipes</a>
  24.       <a href="index.php?p=add" class="btn btn-primary">Add Recipe</a>
  25.       <a href="index.php?p=changepassword" class="btn btn-primary">Change Password</a>
  26.     </div>
  27.     <form action="" method="post" enctype="multipart/form-data">
  28.       <div class="form-group">
  29.         <label for="recipe_name">Recipe Name</label>
  30.         <input type="text" class="form-control" id="recipe_name" name="recipe_name">
  31.       </div>
  32.       <div class="form-group">
  33.         <label for="cat_id">Recipe Category</label>
  34.         <select class="form-control" id="cat_id" name="cat_id">
  35.           {foreach from=$categories item=category}
  36.           <option value="{$category.cat_id}">{$category.cat_name}</option>
  37.           {/foreach}
  38.         </select>
  39.       </div>
  40.       <div class="form-group">
  41.         <label for="recipe_image">Recipe Image</label>
  42.         <input type="file" class="form-control-file" id="recipe_image" name="recipe_image">
  43.       </div>
  44.       <div class="form-group">
  45.         <label for="recipe_instructions">Recipe Instructions</label>
  46.         <textarea name="recipe_instructions" id="recipe_instructions" class="form-control"></textarea>
  47.       </div>
  48.       <button class="btn btn-primary" type="submit">Add Recipe</button>
  49.     </form>
  50.  
  51.   </div>
  52. </div>
  53. {/block}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement