2016-12-22 16:03:58 +08:00
|
|
|
|
<%= content_for(:header_tags) do %>
|
|
|
|
|
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<div class="pro_new_setting_conbox fl " style="width:100%; border:none;">
|
|
|
|
|
<%= labelled_form_for @contest do |f| %>
|
|
|
|
|
<ul class="pro_newsetting_con mb15">
|
|
|
|
|
<li class="mb10">
|
|
|
|
|
<label class="label"><span class="c_red f12">*</span> 竞赛名称 : </label>
|
2016-12-24 16:29:10 +08:00
|
|
|
|
<input type="text" name="contest[name]" id="contest_name" class="w621 h28" onkeyup="regex_contest_name();" value="<%= @contest.name %>">
|
2016-12-22 16:03:58 +08:00
|
|
|
|
<span class="c_red ml5 w690" id="contest_name_notice" style="padding-left:100px;display: none;">竞赛名称不能为空!</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="clear mb10">
|
2016-12-22 17:10:40 +08:00
|
|
|
|
<label class="label fl mr3"> 竞赛介绍 : </label>
|
2016-12-22 16:03:58 +08:00
|
|
|
|
<%= f.kindeditor :description, :editor_id => 'contest_setting_editor',
|
2016-12-22 16:39:54 +08:00
|
|
|
|
:owner_id => @contest.nil? ? 0: @contest.id,
|
|
|
|
|
:owner_type => OwnerTypeHelper::CONTEST,
|
2016-12-22 17:10:40 +08:00
|
|
|
|
:width => '84%',
|
2016-12-22 16:03:58 +08:00
|
|
|
|
:height => 300,
|
|
|
|
|
:minHeight=> 300,
|
|
|
|
|
:class => 'fl ml5 w690',
|
|
|
|
|
:input_html => { :id => 'contest_description',
|
|
|
|
|
:class => 'courses_text fl',
|
|
|
|
|
:maxlength => 5000 }
|
|
|
|
|
%>
|
2016-12-23 14:41:21 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<div class="mt5 ml100">
|
|
|
|
|
<div class="fl" id="syllabus_attachments">
|
|
|
|
|
<%= render :partial => 'attachments/form_course', :locals => {:container => @contest, :isReply => false} %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2016-12-22 16:03:58 +08:00
|
|
|
|
<!--<textarea class=" fl ml5 w625" style="height:192px; padding-top:5px; background:#fff;" placeholder="参赛要求,参与方法,赛事日程(最多6000个字符)" ></textarea>-->
|
|
|
|
|
</li>
|
|
|
|
|
<li class="clear">
|
|
|
|
|
<label class="fl ">公开 :</label>
|
2016-12-24 18:48:50 +08:00
|
|
|
|
<input class="fl ml5 h28" id="contest_is_public" name="contest[is_public]" type="checkbox" <%= @contest.is_public ? "checked" : ""%>>
|
2016-12-22 16:03:58 +08:00
|
|
|
|
<span class="fl c_grey ">(选中后对所有用户可见,否则仅对成员可见。)</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="clear">
|
|
|
|
|
<!--<a href="javascript:void(0);" class="sy_btn_grey mr5 fl ml40 "> 删除</a>-->
|
|
|
|
|
<!--<p class="fl c_grey">(友情提示:删除该竞赛后如果您想恢复,请联系系统管理员!)</p>-->
|
|
|
|
|
<a href="javascript:void(0);" class="sy_btn_blue mr15 fr" onclick="submit_edit_contest(<%= @contest.id %>);"> 保存</a>
|
2016-12-23 14:41:21 +08:00
|
|
|
|
<a href="<%=contest_path(@contest) %>" class="sy_btn_grey mr15 fr" onclick="submit_edit_contest(<%= @contest.id %>);"> 取消</a>
|
2016-12-22 16:03:58 +08:00
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
//配置-验证项目名称
|
|
|
|
|
function regex_contest_name() {
|
|
|
|
|
var name = $.trim($("#contest_name").val());
|
|
|
|
|
if (name.length == 0) {
|
|
|
|
|
$("#contest_name_notice").show();
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
$("#contest_name_notice").hide();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//配置-信息提交
|
|
|
|
|
function submit_edit_contest(id) {
|
|
|
|
|
contest_setting_editor.sync();
|
|
|
|
|
if (regex_contest_name()) {
|
|
|
|
|
$("#edit_contest_" + id).submit();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|