From eac85b338fb891f6b103bd4e660ba4bae9cc8e83 Mon Sep 17 00:00:00 2001
From: zhanghaitao <562681745@qq.com>
Date: Thu, 7 Aug 2014 17:56:29 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E7=A4=BA=E9=94=99=E8=AF=AF=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/projects/_form.html.erb | 4 ++--
app/views/repositories/_form.html.erb | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/views/projects/_form.html.erb b/app/views/projects/_form.html.erb
index 7c84bf84b..512c2df82 100644
--- a/app/views/projects/_form.html.erb
+++ b/app/views/projects/_form.html.erb
@@ -9,8 +9,8 @@
<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %>
-<%= f.text_field :identifier, :required => true, :size => 60, :style => "width:488px;", :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH,
- value:"#{User.current.id.to_s + '_' +format_time(Time.now).to_s}" %>
+
<%= f.text_field :identifier, :required => true, :size => 60, :style => "width:488px;", :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH,
+ value:"#{User.current.id.to_s + '_' +Time.now.to_s.gsub(' ','_').gsub(':','').gsub('+','')}" %>
<% unless @project.identifier_frozen? %>
<%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %>
<% end %>
diff --git a/app/views/repositories/_form.html.erb b/app/views/repositories/_form.html.erb
index b9a3a6c83..1fabf47c8 100644
--- a/app/views/repositories/_form.html.erb
+++ b/app/views/repositories/_form.html.erb
@@ -12,7 +12,7 @@
<%= f.check_box :is_default, :label => :field_repository_is_default %>
<%= f.text_field :identifier, :required => true, :disabled => @repository.identifier_frozen?,
- value:"#{User.current.id.to_s + '_' +format_time(Time.now).to_s}"%>
+ value:"#{User.current.id.to_s + '_' +Time.now.to_s.gsub(' ','_').gsub(':','').gsub('+','')}"%>
<% unless @repository.identifier_frozen? %>
<%= l(:text_length_between, :min => 1, :max => Repository::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_repository_identifier_info).html_safe %>
<% end %>