新建课程不能提交
This commit is contained in:
parent
5f5c59f516
commit
478a88c09f
|
@ -1007,7 +1007,6 @@ class CoursesController < ApplicationController
|
|||
@issue_custom_fields = IssueCustomField.sorted.all
|
||||
@trackers = Tracker.sorted.all
|
||||
@course = Course.new
|
||||
@course.safe_attributes = params[:course]
|
||||
@syllabus = Syllabus.where("id = #{params[:syllabus_id].to_i}").first if params[:syllabus_id]
|
||||
# month = Time.now.month
|
||||
render :layout => 'new_base'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
</div>
|
||||
<div class="hwork_new pr">
|
||||
<ul>
|
||||
<%= labelled_form_for @course do |f| %>
|
||||
<%= form_tag({:controller => 'courses', :action => 'create'}, :id => "new_course") do %>
|
||||
<li class="mt5 ml45 mb10">
|
||||
<label><span class="c_red">*</span> <%= l(:label_tags_syllabus_name)%> :</label>
|
||||
<% if @syllabus.nil? %>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
</div>
|
||||
<div class="hwork_new pr">
|
||||
<ul>
|
||||
<%= labelled_form_for @syllabus do |f| %>
|
||||
<%= form_tag({:controller => 'syllabuses', :action => 'create'}, :id => "new_syllabus") do %>
|
||||
<li class="ml45">
|
||||
<label><span class="c_red">*</span> 课程名称 :</label>
|
||||
<input type="text" name="title" id="new_syllabus_name" class="name_input" placeholder="例如:软件工程" maxlength="100" onkeyup="regex_syllabus_name();">
|
||||
|
|
|
@ -224,7 +224,7 @@ function submit_new_course()
|
|||
{
|
||||
if(regex_syllabus_option('new')&®ex_course_name('new')&®ex_course_class_period('new')&®ex_time_term('new'))
|
||||
{
|
||||
$(".new_course").submit();
|
||||
$("#new_course").submit();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue