58 lines
2.5 KiB
Plaintext
58 lines
2.5 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>
|
||
<%= javascript_tag do %>
|
||
observeAutocompleteField('issue_subject',
|
||
'<%= escape_javascript auto_complete_issues_path(:project_id => @project, :scope => (Setting.cross_project_issue_relations? ? 'all' : nil)) %>',
|
||
{ select: function(event, ui) {
|
||
$('input#issue_subject').val(ui.item.value);
|
||
}
|
||
});
|
||
<% end %>
|
||
</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 => @project.id,
|
||
:at_type => @project.class.to_s %>
|
||
</li>
|
||
<li class="clear">
|
||
<label class="label"><%= l(:label_attachment_plural) %>:</label>
|
||
<%= render :partial => 'attachments/form', :locals => {:container => @training_task} %>
|
||
</li>
|
||
<li class="clear">
|
||
<% if params[:action] == "new" %>
|
||
<a href="<%= project_training_tasks_url(@project, :remote => true) %>" class="sy_btn_grey mr5 fr"> 取消</a>
|
||
<% else %>
|
||
<%= link_to "取消", training_task_path(@training_task), :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();
|
||
$('#project_training_form').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>
|