diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-01-02 10:12:15 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-01-02 10:12:15 +0000 |
commit | 4ee55dc45690654dbbb6827cb687445aa405e839 (patch) | |
tree | b8da2f26b8890f1c145d4aa3e8b5c3fb9f215a35 | |
parent | 470ef4d11ee7465c7cc2ca19fd4535fec061395b (diff) | |
download | redmine-4ee55dc45690654dbbb6827cb687445aa405e839.tar.gz redmine-4ee55dc45690654dbbb6827cb687445aa405e839.zip |
updated validation format of repository url to allow file:///
git-svn-id: http://redmine.rubyforge.org/svn/trunk@137 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/models/repository.rb | 2 | ||||
-rw-r--r-- | app/views/projects/_form.rhtml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 28f2c5a16..29e87584f 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -18,7 +18,7 @@ class Repository < ActiveRecord::Base belongs_to :project 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 diff --git a/app/views/projects/_form.rhtml b/app/views/projects/_form.rhtml index a6102e012..8c5b9f108 100644 --- a/app/views/projects/_form.rhtml +++ b/app/views/projects/_form.rhtml @@ -30,7 +30,7 @@ <%= hidden_field_tag "repository_enabled", 0 %> <div id="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 %> </div> <%= javascript_tag "Element.hide('repository');" if @project.repository.nil? %> |