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