| 1 | <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Wierszowki.Models.MagazineItemViewData>" %>
|
|---|
| 2 |
|
|---|
| 3 | <asp:Content ID="js" ContentPlaceHolderID="jsContent" runat="server">
|
|---|
| 4 | <script src="../../Scripts/jquery-1.3.1.js" type="text/javascript"></script>
|
|---|
| 5 | <script src="../../Scripts/jquery-1.3.1.min.js" type="text/javascript"></script>
|
|---|
| 6 | <script src="../../Scripts/jquery.form.js" type="text/javascript"></script>
|
|---|
| 7 | <script src="../../Scripts/jquery.blockUI.js" type="text/javascript"></script>
|
|---|
| 8 | <script src="../../Scripts/date.js" type="text/javascript"></script>
|
|---|
| 9 | <script src="../../Scripts/jquery.datePicker.js" type="text/javascript"></script>
|
|---|
| 10 | <script src="../../Scripts/spiffy.js" type="text/javascript"></script>
|
|---|
| 11 | <script src="../../Scripts/jHelper.js" type="text/javascript"></script>
|
|---|
| 12 | </asp:Content>
|
|---|
| 13 |
|
|---|
| 14 | <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
|---|
| 15 | Dodaj wierszówkê
|
|---|
| 16 | </asp:Content>
|
|---|
| 17 |
|
|---|
| 18 | <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
|---|
| 19 | <script type="text/javascript">
|
|---|
| 20 | $(function() {
|
|---|
| 21 | $("#Magazine").change(function() {
|
|---|
| 22 | var magazineId = $("#Magazine > option:selected").attr("value");
|
|---|
| 23 | var urlAction = "<%= Url.Action("FindIssuesById", "Magazine") %>";
|
|---|
| 24 | urlAction = urlAction + "/" + magazineId;
|
|---|
| 25 | $.getJSON(urlAction, function(data) {
|
|---|
| 26 | $("#MagazineItem_IssueId").addItems(data);
|
|---|
| 27 | });
|
|---|
| 28 | });
|
|---|
| 29 | });
|
|---|
| 30 | </script>
|
|---|
| 31 |
|
|---|
| 32 | <h2>Dodaj wierszówkê</h2>
|
|---|
| 33 | <%= Html.ValidationSummary("Proszê poprawiæ b³êdy i spróbowaæ ponownie.") %>
|
|---|
| 34 |
|
|---|
| 35 | <div>
|
|---|
| 36 | <div id="messages"></div>
|
|---|
| 37 | <% using (Html.BeginForm("Create", "MagazineItem", Model.MagazineItem))
|
|---|
| 38 | { %>
|
|---|
| 39 | <fieldset>
|
|---|
| 40 | <legend>Nowa wierszówka</legend>
|
|---|
| 41 | <div class="formitem">
|
|---|
| 42 | <label for="MagazineItem.AuthorId">Autor:</label>
|
|---|
| 43 | <%= Html.DropDownList("MagazineItem.AuthorId", ViewData.Model.AuthorList, "-- proszê wybraæ --")%>
|
|---|
| 44 | <%= Html.ValidationMessage("MagazineItem.AuthorId", "*")%>
|
|---|
| 45 | </div>
|
|---|
| 46 | <div class="formitem">
|
|---|
| 47 | <label for="Magazine">Gazeta:</label>
|
|---|
| 48 | <%= Html.DropDownList("Magazine", ViewData.Model.MagazineList, "-- proszê wybraæ --")%>
|
|---|
| 49 | <%= Html.ValidationMessage("Magazine", "*")%>
|
|---|
| 50 | </div>
|
|---|
| 51 | <div class="formitem">
|
|---|
| 52 | <label for="MagazineItem.IssueId">Wydanie:</label>
|
|---|
| 53 | <%= Html.DropDownList("MagazineItem.IssueId", ViewData.Model.IssueList, "-- proszê wybraæ --")%>
|
|---|
| 54 | <%= Html.ValidationMessage("MagazineItem.IssueId", "*")%>
|
|---|
| 55 | </div>
|
|---|
| 56 | <div class="formitem">
|
|---|
| 57 | <label for="MagazineItem.ItemTypeId">Typ:</label>
|
|---|
| 58 | <%= Html.DropDownList("MagazineItem.ItemTypeId", ViewData.Model.ItemTypeList, "-- proszê wybraæ --")%>
|
|---|
| 59 | <%= Html.ValidationMessage("MagazineItem.ItemTypeId", "*")%>
|
|---|
| 60 | </div>
|
|---|
| 61 | <div class="formitem">
|
|---|
| 62 | <label for="MagazineItem.Date">Miesi¹c:</label>
|
|---|
| 63 | <%= Html.TextBox("MagazineItem.Date", Model.MagazineItem.Date, new { Class = "date-pick" })%>
|
|---|
| 64 | <%= Html.ValidationMessage("MagazineItem.Date", "*")%>
|
|---|
| 65 | </div>
|
|---|
| 66 |
|
|---|
| 67 | <div class="formitem">
|
|---|
| 68 | <label for="MagazineItem.Caption">Tytu³:</label>
|
|---|
| 69 | <%= Html.TextBox("MagazineItem.Caption", Model.MagazineItem.Caption, new { title = "Proszê wprowadziæ tytu³ artyku³u." })%>
|
|---|
| 70 | <%= Html.ValidationMessage("MagazineItem.Caption", "*")%>
|
|---|
| 71 | </div>
|
|---|
| 72 | <div class="formitem">
|
|---|
| 73 | <label for="MagazineItem.Description">Opis:</label>
|
|---|
| 74 | <%= Html.TextArea("MagazineItem.Description", Model.MagazineItem.Description, new { title = "Proszê wprowadziæ opis artyku³u." })%>
|
|---|
| 75 | </div>
|
|---|
| 76 | <div class="formitem">
|
|---|
| 77 | <label for="MagazineItem.Price">Wycena:</label>
|
|---|
| 78 | <%= Html.TextBox("MagazineItem.Price", Model.MagazineItem.Price.ToString("#0.00"), new { title = "Proszê wprowadziæ wycenê artyku³u." })%>
|
|---|
| 79 | <%= Html.ValidationMessage("MagazineItem.Price", "*")%>
|
|---|
| 80 | </div>
|
|---|
| 81 | <div class="formitem">
|
|---|
| 82 | <label for="MagazineItem.Bonus">Bonus:</label>
|
|---|
| 83 | <%= Html.TextBox("MagazineItem.Bonus", Model.MagazineItem.Bonus.ToString("#0.00"), new { title = "Proszê wprowadziæ bonus do wyceny artyku³u." })%>
|
|---|
| 84 | <%= Html.ValidationMessage("MagazineItem.Bonus", "*")%>
|
|---|
| 85 | </div>
|
|---|
| 86 | <div class="submit">
|
|---|
| 87 | <input type="submit" value="Dodaj" />
|
|---|
| 88 | </div>
|
|---|
| 89 | </fieldset>
|
|---|
| 90 | <% } %>
|
|---|
| 91 | </div>
|
|---|
| 92 | <div>
|
|---|
| 93 | <%=Html.ActionLink("Powrót", "Index", "Home") %>
|
|---|
| 94 | </div>
|
|---|
| 95 | </asp:Content> |
|---|