46 lines
1.7 KiB
Plaintext
46 lines
1.7 KiB
Plaintext
@using EnVisage.Code.HtmlHelpers
|
||
@using Microsoft.AspNet.Identity
|
||
@using EnVisage.Code
|
||
@model EnVisage.Models.NoteModel
|
||
@if (Html.CheckSecurityObjectPermission(Areas.Scenarios, AccessLevel.Write))
|
||
{
|
||
ViewBag.AllowEdit = true;
|
||
|
||
}
|
||
@using (Html.BeginForm((Model.Id == null || Model.Id == new Guid()) ? "AddNote" : "EditNote", "Scenarios", FormMethod.Post, new { @class = "form-horizontal" }))
|
||
{
|
||
@Html.AntiForgeryToken()
|
||
@Html.HiddenFor(model => model.Id)
|
||
@Html.HiddenFor(model => model.ParentId)
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||
<h4 class="modal-title">@((Model.Id == null || Model.Id == new Guid())? "Add Note" : "Edit Note")</h4>
|
||
</div>
|
||
<div class="modal-body">
|
||
<div class="row">
|
||
<div class="col-sm-12">
|
||
<div class="form-group no-margin-hr">
|
||
@Html.LabelFor(model => model.Title, new { @class = "control-label" })
|
||
@Html.TextBoxFor(model => model.Title, new { @class = "form-control" })
|
||
@Html.ValidationMessageFor(model => model.Title)
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="row">
|
||
<div class="col-sm-12">
|
||
<div class="form-group no-margin-hr">
|
||
@Html.LabelFor(model => model.Details, new { @class = "control-label" })
|
||
@Html.TextAreaFor(model => model.Details, new { @class = "form-control", @rows = 6 })
|
||
@Html.ValidationMessageFor(model => model.Details)
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="submit" class="btn btn-primary" id="btnSaveNote">Save</button>
|
||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||
</div>
|
||
</div> <!-- / .modal-content -->
|
||
}
|