70 lines
2.9 KiB
Plaintext
70 lines
2.9 KiB
Plaintext
@model LocationEditViewModel
|
|
@{
|
|
ViewData["Title"] = Model.LocationID == 0 ? "New Location" : "Edit Location";
|
|
ViewData["ProjectSection"] = "Locations";
|
|
}
|
|
|
|
@if (Model.Project is not null)
|
|
{
|
|
<nav class="breadcrumb-trail" aria-label="Breadcrumb">
|
|
<a asp-controller="Projects" asp-action="Index">Projects</a>
|
|
<a asp-controller="Projects" asp-action="Details" asp-route-id="@Model.Project.ProjectID">@Model.Project.ProjectName</a>
|
|
<a asp-action="Index" asp-route-projectId="@Model.ProjectID">Locations</a>
|
|
<span>@ViewData["Title"]</span>
|
|
</nav>
|
|
|
|
<partial name="_ProjectSectionNav" model="Model.Project" />
|
|
}
|
|
|
|
<div class="page-heading compact">
|
|
<div>
|
|
<p class="eyebrow">Location</p>
|
|
<h1>@ViewData["Title"] <help-icon key="locations.edit" /></h1>
|
|
</div>
|
|
</div>
|
|
|
|
<form asp-action="Save" method="post" class="edit-panel">
|
|
<input asp-for="LocationID" type="hidden" />
|
|
<input asp-for="ProjectID" type="hidden" />
|
|
|
|
<div class="row g-3">
|
|
<div class="col-md-8">
|
|
<label asp-for="LocationName" class="form-label"></label>
|
|
<input asp-for="LocationName" class="form-control" />
|
|
<span asp-validation-for="LocationName" class="text-danger"></span>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<label asp-for="LocationTypeID" class="form-label">Location type <help-icon key="locations.fields.locationType" mode="inline" /></label>
|
|
<select asp-for="LocationTypeID" asp-items="Model.LocationTypeOptions" class="form-select">
|
|
<option value="">Not set</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-12">
|
|
<label asp-for="ParentLocationID" class="form-label">Parent location <help-icon key="locations.fields.parentLocation" mode="inline" /></label>
|
|
<select asp-for="ParentLocationID" asp-items="Model.ParentLocationOptions" class="form-select">
|
|
<option value="">Top level</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-12">
|
|
<div class="form-check">
|
|
<input asp-for="ShowInQuickAddBar" class="form-check-input" />
|
|
<label asp-for="ShowInQuickAddBar" class="form-check-label">Show in Quick Add Bar <help-icon key="locations.fields.quickAdd" mode="inline" /></label>
|
|
<div class="form-text">Makes this item available as a draggable shortcut on the Timeline page.</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-12">
|
|
<label asp-for="Description" class="form-label"></label>
|
|
<textarea asp-for="Description" class="form-control" rows="5"></textarea>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="button-row mt-3">
|
|
<button class="btn btn-primary" type="submit">Save location</button>
|
|
<a class="btn btn-outline-secondary" asp-action="Index" asp-route-projectId="@Model.ProjectID">Cancel</a>
|
|
</div>
|
|
</form>
|
|
|
|
@section Scripts {
|
|
<partial name="_ValidationScriptsPartial" />
|
|
}
|