socialforge/app/views/projects/_course_form.html.erb

59 lines
2.6 KiB
Plaintext

<%= error_messages_for 'project' %>
<%= error_messages_for 'course' %>
<!--[form:project]-->
<% unless @project.new_record? %>
<p><%= render :partial=>"avatar/avatar_form",:locals=> {source:@project} %></p>
<% end %>
<p><%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;" %></p>
<p style="margin-left:-10px;padding-right: 20px;"><%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %></p><!--by young-->
<!-- <p><%= f.text_field :identifier, :required => true, :size => 60, :style => "width:488px;", :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH %>
<% unless @project.identifier_frozen? %>
<em class="info"><%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %></em>
<% end %></p> -->
<%= f.fields_for @course do |m| %>
<!-- added by huang -->
<p style="margin-left:-10px;"><%= m.text_field :state, :required => true, :size => 60, :style => "width:488px;margin-left: 10px;" %></p>
<em class="info" style="margin-left:95px;"><%= l(:text_command) %></em>
<p style="margin-left:-10px;"><%= m.text_field :term, :required => true, :size => 60, :style => "width:488px;margin-left: 10px;" %></p>
<!-- <p style="margin-left:-28px;"><em class="info"><%= l(:label_term) %> <%= select_tag 'term', "<option value = '0'>#{l(:label_spring)}</option><option value = '1'>#{l(:label_summer)}</option><option value = '2'>#{l(:label_autumn)}</option>".html_safe %></em></p> -->
<% end %>
<!-- <p style="margin-left:-10px;"><%= f.check_box :is_public, :style => "margin-left:10px;" %></p> -->
<p style="display:none;"><%= f.text_field :project_type, :value => 1 %></p>
<%= wikitoolbar_for 'project_description' %>
<% @project.custom_field_values.each do |value| %>
<p><%= custom_field_tag_with_label :project, value %></p>
<% end %>
<%= call_hook(:view_projects_form, :project => @project, :form => f) %>
<!--[eoform:project]-->
<% unless @project.identifier_frozen? %>
<% content_for :header_tags do %>
<%= javascript_include_tag 'project_identifier' %>
<% end %>
<% end %>
<% if !User.current.admin? && @project.inherit_members? && @project.parent && User.current.member_of?(@project.parent) %>
<%= javascript_tag do %>
$(document).ready(function() {
$("#project_inherit_members").change(function(){
if (!$(this).is(':checked')) {
if (!confirm("<%= escape_javascript(l(:text_own_membership_delete_confirmation)) %>")) {
$("#project_inherit_members").attr("checked", true);
}
}
});
});
<% end %>
<% end %>