46 lines
1.9 KiB
Plaintext
46 lines
1.9 KiB
Plaintext
|
<ul>
|
||
|
<li class="clear">
|
||
|
<label class="label"><span class="c_red f12">*</span> 序号 : </label>
|
||
|
<%= f.text_field :position, :no_label => true, :placeholder => "请输入序号(整数)" %>
|
||
|
</li>
|
||
|
<li class="clear">
|
||
|
<label class="label"><span class="c_red f12">*</span> 标题 : </label>
|
||
|
<%= f.text_field :subject, :class => "input-big", :no_label => true, :id => "training_task_id", :placeholder => "请输入标题" %>
|
||
|
<span style="display: none">标题不能为空</span>
|
||
|
</li>
|
||
|
<li class="clear">
|
||
|
<label class="label fl"> 描述 : </label>
|
||
|
<%= f.label_for_field :description, :no_label => true, :class => "fl" %>
|
||
|
<%= f.kindeditor :description,
|
||
|
:editor_id => "training_task_desc_editor",
|
||
|
:width=>'885px',
|
||
|
:height =>192,
|
||
|
:resizeType => 0,
|
||
|
:no_label => true,
|
||
|
:at_id => @shixun.id,
|
||
|
:at_type => @shixun.class.to_s %>
|
||
|
</li>
|
||
|
<li class="clear">
|
||
|
<% if params[:action] == "new" %>
|
||
|
<a href="<%= shixun_challenges_path(@shixun, :remote => true) %>" class="sy_btn_grey mr5 fr"> 取消</a>
|
||
|
<% else %>
|
||
|
<%= link_to "取消", challenge_path(@challenge), :class => "sy_btn_grey mr5 fr" %>
|
||
|
<% end %>
|
||
|
<input onclick="issue_create();" class="sy_btn_blue mr5 fr" onfocus="this.blur()" id="issue_confirm" style="width: 28px;color: #FFF" value="保存">
|
||
|
</li>
|
||
|
</ul>
|
||
|
<script type="text/javascript">
|
||
|
function issue_create(){
|
||
|
training_task_desc_editor.sync();
|
||
|
$('#new_challenge').submit();
|
||
|
}
|
||
|
$(function(){
|
||
|
$("#training_task_position").bind('keyup', function (){
|
||
|
this.value=this.value.replace(/\D/g,'')
|
||
|
});
|
||
|
$("#training_task_position").bind('afterpaste',function(){
|
||
|
this.value=this.value.replace(/\D/g,'')
|
||
|
});
|
||
|
});
|
||
|
</script>
|