##// END OF EJS Templates
updated validation format of repository url to allow file:///...
Jean-Philippe Lang -
r134:4ee55dc45690
parent child
Show More
@@ -18,7 +18,7
18 class Repository < ActiveRecord::Base
18 class Repository < ActiveRecord::Base
19 belongs_to :project
19 belongs_to :project
20 validates_presence_of :url
20 validates_presence_of :url
21 validates_format_of :url, :with => /^(http|https|svn):\/\/.+/i
21 validates_format_of :url, :with => /^(http|https|svn|file):\/\/.+/i
22
22
23 @scm = nil
23 @scm = nil
24
24
@@ -30,7 +30,7
30 <%= hidden_field_tag "repository_enabled", 0 %>
30 <%= hidden_field_tag "repository_enabled", 0 %>
31 <div id="repository">
31 <div id="repository">
32 <% fields_for :repository, @project.repository, { :builder => TabularFormBuilder, :lang => current_language} do |repository| %>
32 <% fields_for :repository, @project.repository, { :builder => TabularFormBuilder, :lang => current_language} do |repository| %>
33 <p><%= repository.text_field :url, :size => 60, :required => true %><br />(http://, https://, svn://)</p>
33 <p><%= repository.text_field :url, :size => 60, :required => true %><br />(http://, https://, svn://, file:///)</p>
34 <% end %>
34 <% end %>
35 </div>
35 </div>
36 <%= javascript_tag "Element.hide('repository');" if @project.repository.nil? %>
36 <%= javascript_tag "Element.hide('repository');" if @project.repository.nil? %>
General Comments 0
You need to be logged in to leave comments. Login now