mirror of
https://github.com/DMOJ/online-judge.git
synced 2024-11-25 16:32:37 +08:00
Fix up submit view; #635
This commit is contained in:
parent
bb34fdc800
commit
c1881b1187
@ -234,10 +234,9 @@
|
||||
<div id="language-select">
|
||||
<select id="id_language" name="language">
|
||||
{% for lang in form.fields.language.queryset %}
|
||||
{% set runtime_versions = lang.runtime_versions %}
|
||||
<option id="{{ lang.id }}" data-id="{{ lang.id }}" data-name="{{ lang.name }}"
|
||||
<option value="{{ lang.id }}" data-id="{{ lang.id }}" data-name="{{ lang.name }}"
|
||||
data-info="{{ lang.info }}" data-ace="{{ lang.ace }}"
|
||||
data-judge-info="{{ runtime_versions(lang.runtime_versions) }}"
|
||||
data-judge-info="{{ runtime_versions(lang.runtime_versions()) }}"
|
||||
{% if lang.id == default_lang.id %}selected{% endif %}>{{ lang.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
@ -1,12 +1,12 @@
|
||||
{% for name, versions in runtime_versions %}
|
||||
{% if versions %}
|
||||
{% if versions[0] != versions|last %}
|
||||
{% for name, versions in runtime_versions -%}
|
||||
{%- if versions -%}
|
||||
{%- if versions[0] != versions|last -%}
|
||||
{{ name }} {{ versions[0] }} - {{ versions|last }}
|
||||
{% else %}
|
||||
{%- else -%}
|
||||
{{ name }} {{ versions[0] }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{%- endif -%}
|
||||
{%- else -%}
|
||||
{{ name }}
|
||||
{% endif %}
|
||||
{% if not loop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
{%- endif -%}
|
||||
{%- if not loop.last %}, {% endif -%}
|
||||
{%- endfor -%}
|
||||
|
Loading…
Reference in New Issue
Block a user