updated validation format of repository url to allow file:///
git-svn-id: http://redmine.rubyforge.org/svn/trunk@137 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
470ef4d11e
commit
4ee55dc456
|
@ -18,7 +18,7 @@
|
||||||
class Repository < ActiveRecord::Base
|
class Repository < ActiveRecord::Base
|
||||||
belongs_to :project
|
belongs_to :project
|
||||||
validates_presence_of :url
|
validates_presence_of :url
|
||||||
validates_format_of :url, :with => /^(http|https|svn):\/\/.+/i
|
validates_format_of :url, :with => /^(http|https|svn|file):\/\/.+/i
|
||||||
|
|
||||||
@scm = nil
|
@scm = nil
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<%= hidden_field_tag "repository_enabled", 0 %>
|
<%= hidden_field_tag "repository_enabled", 0 %>
|
||||||
<div id="repository">
|
<div id="repository">
|
||||||
<% fields_for :repository, @project.repository, { :builder => TabularFormBuilder, :lang => current_language} do |repository| %>
|
<% fields_for :repository, @project.repository, { :builder => TabularFormBuilder, :lang => current_language} do |repository| %>
|
||||||
<p><%= repository.text_field :url, :size => 60, :required => true %><br />(http://, https://, svn://)</p>
|
<p><%= repository.text_field :url, :size => 60, :required => true %><br />(http://, https://, svn://, file:///)</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<%= javascript_tag "Element.hide('repository');" if @project.repository.nil? %>
|
<%= javascript_tag "Element.hide('repository');" if @project.repository.nil? %>
|
||||||
|
|
Loading…
Reference in New Issue