| 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_Id").change(function() {
|
|---|
| 22 | var magazineId = $("#Magazine_Id > 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>Edytuj 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("Update", "MagazineItem", Model.MagazineItem))
|
|---|
| 38 | { %>
|
|---|
| 39 | <fieldset>
|
|---|
| 40 | <legend>Dane wierszówki</legend>
|
|---|
| 41 | <%= Html.Hidden("MagazineItem.Id", Model.MagazineItem.Id)%>
|
|---|
| 42 | <div class="formitem">
|
|---|
| 43 | <label for="MagazineItem.AuthorId">Autor:</label>
|
|---|
| 44 | <%= Html.DropDownList("MagazineItem.AuthorId", ViewData.Model.AuthorList, "-- proszê wybraæ --")%>
|
|---|
| 45 | <%= Html.ValidationMessage("MagazineItem.AuthorId", "*")%>
|
|---|
| 46 | </div>
|
|---|
| 47 | <div class="formitem">
|
|---|
| 48 | <label for="Magazine">Gazeta:</label>
|
|---|
| 49 | <%= Html.DropDownList("Magazine.Id", ViewData.Model.MagazineList, "-- proszê wybraæ --")%>
|
|---|
| 50 | <%= Html.ValidationMessage("Magazine.Id", "*")%>
|
|---|
| 51 | </div>
|
|---|
| 52 | <div class="formitem">
|
|---|
| 53 | <label for="MagazineItem.IssueId">Wydanie:</label>
|
|---|
| 54 | <%= Html.DropDownList("MagazineItem.IssueId", ViewData.Model.IssueList, "-- proszê wybraæ --")%>
|
|---|
| 55 | <%= Html.ValidationMessage("MagazineItem.IssueId", "*")%>
|
|---|
| 56 | </div>
|
|---|
| 57 | <div class="formitem">
|
|---|
| 58 | <label for="MagazineItem.ItemTypeId">Typ:</label>
|
|---|
| 59 | <%= Html.DropDownList("MagazineItem.ItemTypeId", ViewData.Model.ItemTypeList, "-- proszê wybraæ --")%>
|
|---|
| 60 | <%= Html.ValidationMessage("MagazineItem.ItemTypeId", "*")%>
|
|---|
| 61 | </div>
|
|---|
| 62 | <div class="formitem">
|
|---|
| 63 | <label for="MagazineItem.Date">Miesi¹c:</label>
|
|---|
| 64 | <%= Html.TextBox("MagazineItem.Date", Model.MagazineItem.Date, new { Class = "date-pick" })%>
|
|---|
| 65 | <%= Html.ValidationMessage("MagazineItem.Date", "*")%>
|
|---|
| 66 | </div>
|
|---|
| 67 |
|
|---|
| 68 | <div class="formitem">
|
|---|
| 69 | <label for="MagazineItem.Caption">Tytu³:</label>
|
|---|
| 70 | <%= Html.TextBox("MagazineItem.Caption", Model.MagazineItem.Caption, new { title = "Proszê wprowadziæ tytu³ artyku³u." })%>
|
|---|
| 71 | <%= Html.ValidationMessage("MagazineItem.Caption", "*")%>
|
|---|
| 72 | </div>
|
|---|
| 73 | <div class="formitem">
|
|---|
| 74 | <label for="MagazineItem.Description">Opis:</label>
|
|---|
| 75 | <%= Html.TextArea("MagazineItem.Description", Model.MagazineItem.Description, new { title = "Proszê wprowadziæ opis artyku³u." })%>
|
|---|
| 76 | </div>
|
|---|
| 77 | <div class="formitem">
|
|---|
| 78 | <label for="MagazineItem.Price">Wycena:</label>
|
|---|
| 79 | <%= Html.TextBox("MagazineItem.Price", Model.MagazineItem.Price.ToString("#0.00"), new { title = "Proszê wprowadziæ wycenê artyku³u." })%>
|
|---|
| 80 | <%= Html.ValidationMessage("MagazineItem.Price", "*")%>
|
|---|
| 81 | </div>
|
|---|
| 82 | <div class="formitem">
|
|---|
| 83 | <label for="MagazineItem.Bonus">Bonus:</label>
|
|---|
| 84 | <%= Html.TextBox("MagazineItem.Bonus", Model.MagazineItem.Bonus.ToString("#0.00"), new { title = "Proszê wprowadziæ bonus do wyceny artyku³u." })%>
|
|---|
| 85 | <%= Html.ValidationMessage("MagazineItem.Bonus", "*")%>
|
|---|
| 86 | </div>
|
|---|
| 87 | <div class="submit">
|
|---|
| 88 | <input type="submit" value="Aktualizuj" />
|
|---|
| 89 | </div>
|
|---|
| 90 | </fieldset>
|
|---|
| 91 | <% } %>
|
|---|
| 92 | </div>
|
|---|
| 93 | <div>
|
|---|
| 94 | <%=Html.ActionLink("Powrót", "Index", "Home") %>
|
|---|
| 95 | </div>
|
|---|
| 96 | </asp:Content> |
|---|