Minor fixes to problem updating
This commit is contained in:
parent
fa56204d0e
commit
6e6c35a222
2 changed files with 4 additions and 3 deletions
|
@ -80,6 +80,7 @@ def problem_update():
|
|||
problem = Problems.query.filter_by(pid=pid).first()
|
||||
if problem:
|
||||
problem.name = name
|
||||
problem.category = category
|
||||
problem.description = description
|
||||
problem.hint = hint
|
||||
problem.flag = flag
|
||||
|
|
|
@ -27,15 +27,15 @@ function render_problems() {
|
|||
<br><br>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="flag" placeholder="Flag" autocomplete="off" class="form-control">
|
||||
<input type="text" name="flag" placeholder="Flag" autocomplete="off" class="form-control" value="` + data[i]["flag"] + `">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="hint" placeholder="Hint" autocomplete="off" class="form-control">
|
||||
<input type="text" name="hint" placeholder="Hint" autocomplete="off" class="form-control" value="` + data[i]["hint"] + `">
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<input type="number" name="value" placeholder="Value" autocomplete="off" class="form-control-number">
|
||||
<input type="number" name="value" placeholder="Value" autocomplete="off" class="form-control-number" value="` + data[i]["value"] + `">
|
||||
<label><input type="checkbox" name="disabled" value="1"` + checked + `>Disabled</label>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue