socialforge/app/views/repositories/new.html.erb

24 lines
804 B
Plaintext

<h3><%= l(:label_repository_new) %></h3>
<script type="text/javascript">
//var re=new RegExp(strRegex);
function createVersion(){
var re =new RegExp("^(https|http|file|svn)[?:]{1}/{1}/{1}.*$");
var strRegex = /^([https|http|file|svn]:){1}.*$/;
var name = $("#url_text_field").val();
if(name == "")
{
alert("URL不能为空");
return;
}
else if(!re.test(name))
{
alert("URL路径不正确");
return;
}
$("#repository-form").submit();
}
</script>
<%= labelled_form_for :repository, @repository, :url => project_repositories_path(@project), :html => {:id => 'repository-form'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<% end %>