core&ui: add auto organize input option to hack (#780)

Co-authored-by: undefined <i@undefined.moe>
This commit is contained in:
Milmonandundefined authored and GitHub committed 2024-05-14 22:35:34 +08:00
1 parent 42569783f9
commit ffe06804a7
7 files changed
+41 -5

No files matched your search

@@ -16,6 +16,16 @@
<br />
</div>
</div>
<div class="row"><div class="columns">
<label>
{{ _('Auto organize input') }}
<br />
<label class="checkbox">
<input type="checkbox" name="autoOrganizeInput" class="checkbox">
{{ _('Auto adjust the format of line breaks and remove unnecessary whitespace characters.') }}
</label>
</label>
</div></div>
<div class="row"><div class="columns">
<input type="submit" class="rounded primary button" value="{{ _('Submit') }}">
</div></div>
@@ -14,7 +14,10 @@
<div class="section__header">
<h1 class="section__title">{{ _('Code') }}</h1>
<div class="section__tools">
<a class="primary rounded button" href="?download=true"><span class="icon icon-download"></span> {{ _('Download') }}</a>
<a class="primary rounded button" href="?download=true">
<span class="icon icon-download"></span>
{% if rdoc.files.hack %}{{ _('Download Hack Input') }}{% else %}{{ _('Download') }}{% endif %}
</a>
</div>
</div>
<div class="section__body">
@@ -63,6 +66,10 @@
<dl class="large horizontal">
<dt>{{ _('Submit By') }}</dt>
<dd>{{ user.render_inline(udoc, modbadge=false) }}</dd>
{% if rdoc.hackTarget %}
<dt>{{ _('Hacked') }}</dt>
<dd><a href="{{ url('record_detail', rid=rdoc.hackTarget) }}">{{ rdoc.hackTarget }}</a></dd>
{% endif %}
{% if pdoc %}
<dt>{{ _('Problem') }}</dt>
<dd>