add-item-page.html 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <div class="add-item-page" ng-controller="AddItemPageController">
  2. <div class="form-wrapper">
  3. <div class="form-tabs">
  4. <div class="form-tab1" ng-class="{'form-tab-active': isFirstTab}" ng-click="isFirstTab = true">
  5. Add custom menu item
  6. </div>
  7. <div class="form-tab2" ng-class="{'form-tab-active': !isFirstTab}" ng-click="isFirstTab = false">
  8. Add ready menu item
  9. </div>
  10. </div>
  11. <form ng-if="isFirstTab" ng-submit='sendMeal()'>
  12. <label for="meal-name"><h2>Enter the name of the meal:</h2></label>
  13. <input type="text" id="meal-name" ng-model="resObj.mealName">
  14. <h2>Enter ingredients:</h2>
  15. <div class="ingredient-wrapper" ng-repeat="ingredient in resObj.ingredients track by $index">
  16. <input type="text" ng-model="resObj.ingredients[$index]">
  17. <span ng-click="deleteIngredient($index)" class="fa fa-times"></span>
  18. </div>
  19. <button type="button" ng-click="addIngredient()">Add ingredient</button>
  20. <input type="text" placeholder="image url" ng-model="resObj.imageUrl">
  21. <select ng-model="resObj.type">
  22. <option value="" disabled selected>Select meal type</option>
  23. <option value="breakfast">Breakfast</option>
  24. <option value="lunch">Lunch</option>
  25. <option value="dinner">Dinner</option>
  26. <option value="snacks">Snacks</option>
  27. </select>
  28. <input type="text" ng-model="resObj.weight" placeholder="weight">
  29. <input type="text" ng-model="resObj.price" placeholder="price">
  30. <button type="submit">Send</button>
  31. </form>
  32. <form ng-if="!isFirstTab" ng-submit='sendDiet()'>
  33. <label for="title"><h2>Enter the title:</h2></label>
  34. <input type="text" id="meal-name" ng-model="resObj2.title">
  35. <label for="description"><h2>Enter the description:</h2></label>
  36. <textarea id="description" ng-model="resObj2.description"></textarea>
  37. <select ng-model="resObj2.dietType">
  38. <option value="" disabled selected>Select diet type</option>
  39. <option value="loss">Weight loss</option>
  40. <option value="gain">Weight gain</option>
  41. <option value="balance">Balanced diet</option>
  42. </select>
  43. <input type="text" placeholder="image url" ng-model="resObj2.imageUrl">
  44. <input type="text" placeholder="price" ng-model="resObj2.price">
  45. <input type="text" ng-model="resObj2.calories" placeholder="calories">
  46. <input type="text" ng-model="resObj2.protein" placeholder="protein">
  47. <input type="text" ng-model="resObj2.fats" placeholder="fats">
  48. <input type="text" ng-model="resObj2.carbs" placeholder="carbs">
  49. <button type="submit">Send</button>
  50. </form>
  51. </div>
  52. </div>
  53. <footer></footer>