Mercurial > hg > soundsoftware-site
diff app/views/projects/_form.html.erb @ 1298:4f746d8966dd redmine_2.3_integration
Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
author | Chris Cannam |
---|---|
date | Fri, 14 Jun 2013 09:28:30 +0100 |
parents | 045e5984313c 622f24f53b42 |
children |
line wrap: on
line diff
--- a/app/views/projects/_form.html.erb Fri Jun 14 09:07:32 2013 +0100 +++ b/app/views/projects/_form.html.erb Fri Jun 14 09:28:30 2013 +0100 @@ -7,12 +7,8 @@ <em class="info"> <%= l(:text_project_name_info).html_safe %></em> </p> -<% unless @project.allowed_parents.compact.empty? %> - <p><%= label(:project, :parent_id, l(:field_parent)) %><%= parent_project_select_tag(@project) %></p> -<% end %> - -<p><%= f.text_area :description, :rows => 5, :class => 'wiki-edit' %></p> -<p><%= f.text_field :identifier, :required => true, :size => 60, :disabled => @project.identifier_frozen? %> +<p><%= f.text_area :description, :rows => 8, :class => 'wiki-edit' %></p> +<p><%= f.text_field :identifier, :required => true, :size => 60, :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH %> <% unless @project.identifier_frozen? %> <br /> <em class="info"><%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %></em> @@ -36,6 +32,15 @@ <br> <em class="info"><%= l(:text_project_visibility_info) %></em> </p> + +<% unless @project.allowed_parents.compact.empty? %> + <p><%= label(:project, :parent_id, l(:field_parent)) %><%= parent_project_select_tag(@project) %></p> +<% end %> + +<% if @project.safe_attribute? 'inherit_members' %> +<p><%= f.check_box :inherit_members %></p> +<% end %> + <%= wikitoolbar_for 'project_description' %> <% @project.custom_field_values.each do |value| %> @@ -88,3 +93,23 @@ <% end %> <% end %> <!--[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 %>