easyctf-2017/web/pages/admin/problems.html
2016-01-06 18:23:43 -06:00

77 lines
3.3 KiB
HTML

<center class="fade_in ng-scope">
<h1>Problems</h1>
<div id="status"></div>
<input type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#add-modal" value="Add Problem">
<div id="problems"></div>
<div class="modal fade" id="add-modal" tabindex="-2" role="dialog" aria-labelledby="add-modal-label" data-backdrop="false">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="add-modal-label">Add Problem</h4>
</div>
<div class="modal-body">
<form id="add-form" method="POST" action="/api/problem/add" enctype="multipart/form-data">
<div class="panel-heading">
<div class="row">
<div class="col-md-6">
<input type="text" name="name" id="name" autocomplete="on" placeholder="Name" class="form-control">
</div>
<div class="col-md-6">
<input type="text" name="category" id="category" autocomplete="on" placeholder="Category" class="form-control">
</div>
</div>
</div>
<div class="panel-body">
<textarea type="text" name="description" id="description" autocomplete="on" placeholder="Description" class="form-control"></textarea>
<br><br>
<div class="row">
<div class="col-md-6">
<input type="text" name="flag" id="flag" autocomplete="off" placeholder="EasyCTF{insert_correct_flag_here}" class="form-control">
</div>
<div class="col-md-6">
<input type="text" name="problem-hint" id="problem-hint" autocomplete="off" placeholder="Hint" class="form-control">
</div>
</div>
<br>
<div class="row">
<input type="number" name="value" id="value" autocomplete="off" placeholder="Value" class="form-control-number center-block">
</div>
</div>
<div class="panel-footer">
<h4>These are important files!</h4>
<hr>
<div class="row">
<input type="file" name="files[]" id="files" multiple="true">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<input form="add-form" id="add-problem" type="submit" class="btn btn-primary" value="Add Problem">
</div>
</div>
</div>
</div>
<div class="modal fade" id="delete-modal" tabindex="-1" role="dialog" aria-labelledby="delete-modal-label" data-backdrop="false">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="delete-modal-label">Delete Problem</h4>
</div>
<div class="modal-body">
Are you sure you want to delete this problem? You cannot undo this.
<div id="delete_status"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
<button type="button" id="delete" class="btn btn-primary">Yes</button>
</div>
</div>
</div>
</div>
<script src="js/admin/problems.js"></script>
</center>