mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
updated how assignment form persists data
This commit is contained in:
@@ -30,8 +30,11 @@
|
||||
public Dictionary<string, string> VariableValues { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
if (Description == "")
|
||||
{
|
||||
Description = Assignment.Description;
|
||||
}
|
||||
TemplateId = Assignment.TemplateId;
|
||||
UseTemplate = Assignment.TemplateId != null && Assignment.TemplateId != "";
|
||||
}
|
||||
@@ -87,6 +90,7 @@
|
||||
role="switch"
|
||||
id="useTemplateForDescription"
|
||||
@bind="UseTemplate"
|
||||
/>
|
||||
<label class="form-check-label" for="useTemplateForDescription">
|
||||
use template for description
|
||||
</label>
|
||||
@@ -173,6 +177,7 @@ else
|
||||
id="description"
|
||||
class="form-control"
|
||||
rows=12
|
||||
value="@Description"
|
||||
@oninput="@((e) =>
|
||||
{
|
||||
var newDescription = e.Value?.ToString();
|
||||
|
||||
@@ -145,52 +145,31 @@
|
||||
<Title>
|
||||
@Assignment.Name
|
||||
</Title>
|
||||
|
||||
<Body>
|
||||
<form @onsubmit:preventDefault="true" @onsubmit="submitHandler">
|
||||
<div class="m-1">
|
||||
<label
|
||||
class="form-label"
|
||||
>
|
||||
<label class="form-label">
|
||||
Name
|
||||
</label>
|
||||
<input
|
||||
class="form-control"
|
||||
@bind="name"
|
||||
/>
|
||||
<input class="form-control" @bind="name" />
|
||||
</div>
|
||||
<div class="m-1">
|
||||
<AssignmentDescriptionEditor
|
||||
Assignment="Assignment"
|
||||
/>
|
||||
<AssignmentDescriptionEditor Assignment="Assignment" />
|
||||
</div>
|
||||
|
||||
<div class="form-check m-1">
|
||||
<input
|
||||
class="form-check-input"
|
||||
id="lockAtDueDate"
|
||||
type="checkbox"
|
||||
/>
|
||||
<label
|
||||
class="form-check-label"
|
||||
for="lockAtDueDate"
|
||||
@bind="lockAtDueDate"
|
||||
>
|
||||
<input class="form-check-input" id="lockAtDueDate" type="checkbox" />
|
||||
<label class="form-check-label" for="lockAtDueDate" @bind="lockAtDueDate">
|
||||
Lock At Due Date
|
||||
</label>
|
||||
</div>
|
||||
<RubricEditor Rubric="rubric" SetRubric="updateRubric" />
|
||||
<SubmissionTypeSelector
|
||||
Types="submissionTypes"
|
||||
SetTypes="SetTypes"
|
||||
/>
|
||||
<SubmissionTypeSelector Types="submissionTypes" SetTypes="SetTypes" />
|
||||
</form>
|
||||
</Body>
|
||||
<Footer>
|
||||
<ConfirmationModal
|
||||
Label="Delete"
|
||||
Class="btn btn-danger"
|
||||
OnConfirmAsync="HandleDelete"
|
||||
/>
|
||||
<ConfirmationModal Label="Delete" Class="btn btn-danger" OnConfirmAsync="HandleDelete" />
|
||||
<button class="btn btn-primary" @onclick="@(() => AssignmentModal?.Hide())">
|
||||
Save
|
||||
</button>
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
<div class="modal @modalClass">
|
||||
<div class="modal-dialog modal-xl" role="document">
|
||||
<div class="modal @modalClass" @onclick="Hide">
|
||||
<div class="modal-dialog modal-xl" role="document" @onclick:stopPropagation="true">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title text-center w-100">@Title</h4>
|
||||
@@ -46,5 +46,7 @@
|
||||
|
||||
@if (showBackdrop)
|
||||
{
|
||||
<div class="modal-backdrop fade show"></div>
|
||||
<div
|
||||
class="modal-backdrop fade show"
|
||||
></div>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user