This commit is contained in:
alexziskind1 2019-04-17 08:32:52 -07:00
Родитель 6aceb57923
Коммит 283976c454
2 изменённых файлов: 24 добавлений и 38 удалений

Просмотреть файл

@ -1,26 +1,24 @@
@model RPS.Web.Pages.Backlog.PtItemCommentsVm
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<form method="post">
@Html.HiddenFor(model => model.ItemId)
<input type="hidden" asp-for="@Model.ItemId" />
<div class="form-row align-items-center">
<user-avatar user="Model.CurrentUser" class="mr-3 li-avatar rounded"></user-avatar>
<div class="col-sm-6">
@Html.EditorFor(model => model.NewCommentText, new { htmlAttributes = new { @class = "form-control", placeholder = "Enter new comment..." } })
<input type="text" asp-for="@Model.NewCommentText" class="form-control" placeholder="Enter new comment..." />
</div>
<button type="submit" class="btn btn-primary">Add</button>
</div>
}
</form>
<hr />
<ul id="listComments" class="list-unstyled">
@foreach (var comment in Model.Comments)

Просмотреть файл

@ -1,74 +1,62 @@
@model RPS.Web.Pages.Backlog.PtItemDetailsVm
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<form method="post">
<input type="hidden" asp-for="@Model.Id" />
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
@Html.HiddenFor(model => model.Id)
<div class="form-group row">
@Html.LabelFor(model => model.Title, htmlAttributes: new { @class = "col-sm-2 col-form-label" })
<label asp-for="@Model.Title" class="col-sm-2 col-form-label"></label>
<div class="col-sm-6">
@Html.EditorFor(model => model.Title, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.Title, "", new { @class = "text-danger" })
<input type="text" asp-for="@Model.Title" class="form-control" />
</div>
</div>
<div class="form-group row">
@Html.LabelFor(model => model.Description, htmlAttributes: new { @class = "col-sm-2 col-form-label" })
<label asp-for="@Model.Description" class="col-sm-2 col-form-label"></label>
<div class="col-sm-6">
@Html.TextAreaFor(model => model.Description, new { @class = "form-control", style = "width: 100%; height: 60px;" })
@Html.ValidationMessageFor(model => model.Description, "", new { @class = "text-danger" })
<textarea asp-for="@Model.Description" class="form-control"></textarea>
</div>
</div>
<div class="form-group row">
@Html.LabelFor(model => model.Estimate, htmlAttributes: new { @class = "col-sm-2 col-form-label" })
<label asp-for="@Model.Estimate" class="col-sm-2 col-form-label"></label>
<div class="col-sm-6">
@Html.EditorFor(model => model.Estimate, new { htmlAttributes = new { @class = "form-control", type = "range", step = "1", min = "0", max = "20" } })
@Html.ValidationMessageFor(model => model.Estimate, "", new { @class = "text-danger" })
<input type="range" asp-for="@Model.Estimate" min="0" max="20" step="1" class="form-control" />
</div>
</div>
<div class="form-group row">
@Html.LabelFor(model => model.SelectedItemType, htmlAttributes: new { @class = "col-sm-2 col-form-label" })
<label asp-for="@Model.SelectedItemType" class="col-sm-2 col-form-label"></label>
<div class="col-sm-6">
@Html.DropDownListFor(m => m.SelectedItemType, Model.ItemTypes, new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.SelectedItemType, "", new { @class = "text-danger" })
<select asp-for="@Model.SelectedItemType" asp-items="@Model.ItemTypes" class="form-control"></select>
</div>
</div>
<div class="form-group row">
@Html.LabelFor(model => model.SelectedStatus, htmlAttributes: new { @class = "col-sm-2 col-form-label" })
<label asp-for="@Model.SelectedStatus" class="col-sm-2 col-form-label"></label>
<div class="col-sm-6">
@Html.DropDownListFor(m => m.SelectedStatus, Model.Statuses, new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.SelectedStatus, "", new { @class = "text-danger" })
<select asp-for="@Model.SelectedStatus" asp-items="@Model.Statuses" class="form-control"></select>
</div>
</div>
<div class="form-group row">
@Html.LabelFor(model => model.SelectedPriority, htmlAttributes: new { @class = "col-sm-2 col-form-label" })
<label asp-for="@Model.SelectedPriority" class="col-sm-2 col-form-label"></label>
<div class="col-sm-6">
@Html.DropDownListFor(m => m.SelectedPriority, Model.Priorities, new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.SelectedPriority, "", new { @class = "text-danger" })
<select asp-for="@Model.SelectedPriority" asp-items="@Model.Priorities" class="form-control"></select>
</div>
</div>
<div class="form-group row">
@Html.LabelFor(model => model.SelectedAssigneeId, htmlAttributes: new { @class = "col-sm-2 col-form-label" })
<label asp-for="@Model.SelectedAssigneeId" class="col-sm-2 col-form-label"></label>
<div class="col-sm-6">
@Html.DropDownListFor(m => m.SelectedAssigneeId, Model.Users, new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.SelectedAssigneeId, "", new { @class = "text-danger" })
<select asp-for="@Model.SelectedAssigneeId" asp-items="@Model.Users" class="form-control"></select>
</div>
</div>
<div class="form-group row">
<div class="offset-sm-2 col-sm-10">
<input type="submit" value="Save" class="btn btn-primary" />
<button type="submit" class="btn btn-primary">Save</button>
</div>
</div>
}
</form>