Allows admins to manage grading report templates #14
@ -65,8 +65,9 @@
|
||||
</p>
|
||||
|
||||
<div class="mb-3 line-length-limit card" wicket:id="criteria">
|
||||
<div class="card-header text-bg-info text-white">
|
||||
<div class="card-header text-bg-info text-white hstack justify-content-between">
|
||||
<h3 class="text-white mb-0">Criterion</h3>
|
||||
<button class="btn btn-sm btn-outline-danger" wicket:id="remove">Remove</button>
|
||||
</div>
|
||||
<div wicket:id="criteria" class="card-body">
|
||||
<div class="row mb-3">
|
||||
|
@ -59,6 +59,13 @@ class EditingGradingTemplateComponentPanel extends GenericPanel<EditingGradingTe
|
||||
|
||||
@Override
|
||||
protected void populateItem(ListItem<EditingGradingTemplate.Criteria> item) {
|
||||
item.add(new AjaxLink<>("remove") {
|
||||
@Override
|
||||
public void onClick(AjaxRequestTarget target) {
|
||||
editingGradingTemplateModel.getObject().getCriteria().remove(item.getModelObject());
|
||||
target.add(EditingGradingTemplateComponentPanel.this);
|
||||
}
|
||||
});
|
||||
item.add(new CriteriaEditingPanel("criteria", item.getModel()));
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user