PlotDirector/PlotLine/Views/Writing/_ContextCharacterEdit.cshtml

15 lines
1.2 KiB
Plaintext

@model PlotLine.Services.Context.ContextCharacterEditForm
<form action="/Writing/Context/EditCharacter" method="post" data-context-edit-form>
@Html.AntiForgeryToken()
<input asp-for="BookID" type="hidden" /><input asp-for="SceneID" type="hidden" /><input asp-for="CharacterID" type="hidden" /><input asp-for="Field" type="hidden" /><input asp-for="Fingerprint" type="hidden" />
<p><strong>@Model.CharacterName</strong> · @Model.Label</p>
<div asp-validation-summary="All" class="text-danger" role="alert"></div>
<label>@Model.Label
@if(Model.Options.Count>0){<select asp-for="Value" asp-items="Model.Options" class="form-select"></select>}
else{<textarea asp-for="Value" class="form-control" maxlength="4000" rows="4"></textarea>}
</label>
@if(Model.Field=="location"&&Model.Options.Count==1){<p class="small text-muted" role="status">No locations are available in this project's Locations Library.</p>}
<p class="small text-muted">Only this correction is saved. Other character and scene fields are retained.</p>
<button type="submit" class="btn btn-primary">Save correction</button><button type="button" class="btn btn-outline-secondary" data-context-edit-cancel>Cancel</button>
</form>