| 1 | <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Wierszowki.Models.MagazineItemViewData>" %>
|
|---|
| 2 | <%@ Import namespace="Wierszowki.Core.Validation"%>
|
|---|
| 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 | <script src="../../Scripts/jquery.validate.js" type="text/javascript" ></script>
|
|---|
| 13 | <script src="../../Scripts/xVal.jquery.validate.js" type="text/javascript"></script>
|
|---|
| 14 | <script src="../../Scripts/jqueryvalid.js" type="text/javascript"></script>
|
|---|
| 15 | <script src="../../Scripts/xValEditMagazineItem.js" type="text/javascript"></script>
|
|---|
| 16 | </asp:Content>
|
|---|
| 17 |
|
|---|
| 18 | <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
|---|
| 19 | Edytuj wierszówkê
|
|---|
| 20 | </asp:Content>
|
|---|
| 21 |
|
|---|
| 22 | <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
|---|
| 23 | <script type="text/javascript">
|
|---|
| 24 | $(document).ready(function() {
|
|---|
| 25 | $("#Magazine_Id").change(function() {
|
|---|
| 26 |
|
|---|
| 27 | var magazineId = $("#Magazine_Id > option:selected").attr("value");
|
|---|
| 28 | var urlAction = "<%= Url.Action("FindIssuesById", "Magazine") %>";
|
|---|
| 29 | urlAction = urlAction + "/" + magazineId;
|
|---|
| 30 | $.getJSON(urlAction, function(data) {
|
|---|
| 31 | $("#MagazineItem_IssueId").addItems(data);
|
|---|
| 32 | });
|
|---|
| 33 | });
|
|---|
| 34 | });
|
|---|
| 35 | </script>
|
|---|
| 36 | <h2>Edytuj wierszówkê</h2>
|
|---|
| 37 | <%= Html.ValidationSummary("Proszê poprawiæ b³êdy i spróbowaæ ponownie.") %>
|
|---|
| 38 |
|
|---|
| 39 | <div>
|
|---|
| 40 | <div id="messages"></div>
|
|---|
| 41 | <%
|
|---|
| 42 | using (Html.BeginForm("Update", "MagazineItem", FormMethod.Post, new { id = "myform" }))
|
|---|
| 43 | { %>
|
|---|
| 44 | <fieldset>
|
|---|
| 45 | <%= Html.Hidden("Info.user_id", Model.Info.user_id)%>
|
|---|
| 46 | <%= Html.Hidden("Info.powrot", Model.Info.powrot)%>
|
|---|
| 47 | <%= Html.Hidden("Info.month", Model.Info.month)%>
|
|---|
| 48 | <%= Html.Hidden("Info.year", Model.Info.year)%>
|
|---|
| 49 | <legend>Dane wierszówki</legend>
|
|---|
| 50 | <%= Html.Hidden("MagazineItem.Id", Model.MagazineItem.Id)%>
|
|---|
| 51 | <div class="formitem">
|
|---|
| 52 | <label for="MagazineItem.AuthorId">Autor:</label>
|
|---|
| 53 | <%= Html.DropDownList("MagazineItem.AuthorId", Model.AuthorList, "-- proszê wybraæ --")%>
|
|---|
| 54 | <%= Html.ValidationMessage("MagazineItem.AuthorId", "*")%>
|
|---|
| 55 | <br />
|
|---|
| 56 | </div>
|
|---|
| 57 | <div class="formitem">
|
|---|
| 58 | <label for="Magazine">Gazeta:</label>
|
|---|
| 59 | <%= Html.DropDownList("Magazine.Id",Model.MagazineList, "-- proszê wybraæ --")%>
|
|---|
| 60 | <%= Html.ValidationMessage("Magazine.Id", "*")%>
|
|---|
| 61 | <br />
|
|---|
| 62 | </div>
|
|---|
| 63 | <div class="formitem">
|
|---|
| 64 | <label for="MagazineItem.IssueId">Wydanie</label>
|
|---|
| 65 | <%= Html.DropDownList("MagazineItem.IssueId", Model.IssueList, "-- proszê wybraæ --")%>
|
|---|
| 66 | <%= Html.ValidationMessage("MagazineItem.IssueId", "*")%>
|
|---|
| 67 | <br />
|
|---|
| 68 | </div>
|
|---|
| 69 | <div class="formitem">
|
|---|
| 70 | <label for="MagazineItem.ItemTypeId">Typ:</label>
|
|---|
| 71 | <%= Html.DropDownList("MagazineItem.ItemTypeId", Model.ItemTypeList, "-- proszê wybraæ --")%>
|
|---|
| 72 | <%= Html.ValidationMessage("MagazineItem.ItemTypeId", "*")%>
|
|---|
| 73 | <br />
|
|---|
| 74 | </div>
|
|---|
| 75 | <div class="formitem">
|
|---|
| 76 | <label for="MagazineItem.Date">Miesi¹c:</label>
|
|---|
| 77 | <%= Html.TextBox("MagazineItem.Date", Model.MagazineItem.Date, new { Class = "date-pick" })%>
|
|---|
| 78 | <%= Html.ValidationMessage("MagazineItem.Date", "*")%>
|
|---|
| 79 | <br />
|
|---|
| 80 | </div>
|
|---|
| 81 | <div class="formitem">
|
|---|
| 82 | <label for="MagazineItem.Caption">Tytu³:</label>
|
|---|
| 83 | <%= Html.TextBox("MagazineItem.Caption", Model.MagazineItem.Caption )%>
|
|---|
| 84 | <%= Html.ValidationMessage("MagazineItem.Caption", "*")%>
|
|---|
| 85 | <br />
|
|---|
| 86 | </div>
|
|---|
| 87 | <div class="formitem">
|
|---|
| 88 | <label for="MagazineItem.Description">Opis:</label>
|
|---|
| 89 | <%= Html.TextArea("MagazineItem.Description", Model.MagazineItem.Description )%>
|
|---|
| 90 | <%= Html.ValidationMessage("MagazineItem.Description", "*")%>
|
|---|
| 91 | <br />
|
|---|
| 92 | </div>
|
|---|
| 93 | <div class="formitem">
|
|---|
| 94 | <label for="MagazineItem.Price">Wycena:</label>
|
|---|
| 95 | <%= Html.TextBox("MagazineItem.Price", Model.MagazineItem.Price.ToString("#0.00"))%>
|
|---|
| 96 | <%= Html.ValidationMessage("MagazineItem.Price", "*")%>
|
|---|
| 97 | <br />
|
|---|
| 98 | </div>
|
|---|
| 99 | <div class="formitem">
|
|---|
| 100 | <label for="MagazineItem.Bonus">Bonus:</label>
|
|---|
| 101 | <%= Html.TextBox("MagazineItem.Bonus", Model.MagazineItem.Bonus.ToString("#0.00"))%>
|
|---|
| 102 | <%= Html.ValidationMessage("MagazineItem.Bonus", "*")%>
|
|---|
| 103 | <br />
|
|---|
| 104 | </div>
|
|---|
| 105 | <div>
|
|---|
| 106 | <input type="submit" name="edit" value="Aktualizuj" />
|
|---|
| 107 | </div>
|
|---|
| 108 | </fieldset>
|
|---|
| 109 | <% } %>
|
|---|
| 110 | </div>
|
|---|
| 111 | <div>
|
|---|
| 112 | <%=Html.ActionLink("Powrót", "Index", "Home") %>
|
|---|
| 113 | <%=Html.ClientSideValidation<MagazineItemValidation>("MagazineItem")%>
|
|---|
| 114 | </div>
|
|---|
| 115 | </asp:Content> |
|---|