{% extends "layout/basic.html" %} {% block content %}
{{ form.form_select({ columns:3, label:'Rule', name:'rule', options:rules, value:tdoc['rule']|default(''), row:false }) }} {{ form.form_text({ columns:4, label:'Title', name:'title', placeholder:_('title'), value:tdoc.title|default(''), autofocus:true, row:false }) }} {{ form.form_text({ columns:3, label:'Invitation Code', name:'code', placeholder:_('(leave blank if none)'), value:tdoc._code|default(''), row:false }) }} {{ form.form_checkbox({ columns:2, label:'Rated', name:'rated', placeholder:_('Is rated'), value:tdoc.rated|default(true), row:false }) }}
{{ form.form_text({ columns:3, label:'Begin Date', name:'beginAtDate', placeholder:'YYYY-mm-dd', value:beginAt.format('YYYY-M-D'), date:true, row:false }) }} {{ form.form_text({ columns:3, label:'Begin Time', name:'beginAtTime', placeholder:'HH:MM', value:beginAt.format('H:mm'), time:true, row:false }) }} {{ form.form_text({ columns:2, label:'Duration (hours)', name:'duration', value:duration|default('3'), row:false }) }} {{ form.form_text({ columns:4, label:'Assign', name:'assign', placeholder:_('Group / UID'), value:tdoc.assign|default(''), row:false }) }}
{{ form.form_text({ columns:9, label:'Problems', name:'pids', value:pids, placeholder:_("Seperated with ','"), row:false }) }} {{ form.form_checkbox({ columns:3, label:'Auto hide-and show', name:'autoHide', placeholder:'', value:handler.user.hasPerm(perm.PERM_EDIT_PROBLEM) and (tdoc.autoHide|default(true)), disabled:not handler.user.hasPerm(perm.PERM_EDIT_PROBLEM), row:false }) }} {% if tdoc.lockAt %} {% endif %}
{{ form.form_textarea({ columns:null, label:'Content', name:'content', value:tdoc['content']|default(''), markdown:true }) }}
{% if page_name == 'contest_edit' %} {% if handler.user.own(tdoc) or handler.user.hasPerm(perm.PERM_EDIT_CONTEST) %} {% endif %} {% else %} {% endif %}
{% include 'components/md_hint.html' %}
{% endblock %}