Show More
Commit Description:
fix logins user_id from string to integer
Commit Description:
fix logins user_id from string to integer
References:
File last commit:
Show/Diff file:
Action:
app/views/problems/_form.html.erb
| 54 lines
| 1.7 KiB
| text/plain
| TextLexer
|
|
r320 | <%= error_messages_for 'problem' %> | ||
<!--[form:problem]--> | ||||
<p><label for="problem_name">Name</label><br/> | ||||
<%= text_field 'problem', 'name' %></p> | ||||
<p><label for="problem_full_name">Full name</label><br/> | ||||
<%= text_field 'problem', 'full_name' %></p> | ||||
<p><label for="problem_full_score">Full score</label><br/> | ||||
<%= text_field 'problem', 'full_score' %></p> | ||||
<p><label for="problem_date_added">Date added</label><br/> | ||||
<%= date_select 'problem', 'date_added' %></p> | ||||
<% | ||||
# TODO: these should be put in model Problem, but I can't think of | ||||
# nice default values for them. These values look fine only | ||||
# in this case (of lazily adding new problems). | ||||
@problem.available = true if @problem!=nil and @problem.available==nil | ||||
@problem.test_allowed = true if @problem!=nil and @problem.test_allowed==nil | ||||
@problem.output_only = false if @problem!=nil and @problem.output_only==nil | ||||
%> | ||||
<p> | ||||
<label for="problem_available">Available?</label> | ||||
<%= check_box :problem, :available %> | ||||
<label for="problem_test_allowed">Test allowed?</label> | ||||
<%= check_box :problem, :test_allowed %> | ||||
<label for="problem_output_only">Output only?</label> | ||||
<%= check_box :problem, :output_only %> | ||||
</p> | ||||
<%= error_messages_for 'description' %> | ||||
<p><label for="description_body">Description</label><br/> | ||||
<%= text_area :description, :body, :rows => 10, :cols => 80 %></p> | ||||
<p><label for="description_markdowned">Markdowned?</label> | ||||
<%= select "description", | ||||
"markdowned", | ||||
[['True',true],['False',false]], | ||||
{:selected => (@description) ? @description.markdowned : false } | ||||
%></p> | ||||
<p><label for="problem_url">URL</label><br/> | ||||
<%= text_field 'problem', 'url' %></p> | ||||
r364 | <p>Task PDF <%= file_field_tag 'file' %></p> | |||
|
r320 | |||
<!--[eoform:problem]--> | ||||