From f3fe5d918e46b0876115e64ddb37f56aedf1c48f Mon Sep 17 00:00:00 2001 From: zhanghaitao <562681745@qq.com> Date: Thu, 7 Aug 2014 15:54:05 +0800 Subject: [PATCH 1/3] =?UTF-8?q?#832=20=E7=8A=B6=E6=80=81=E8=81=94=E5=8A=A8?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E7=9A=84=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/_attributes.html.erb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb index e44578243..b17283f3b 100644 --- a/app/views/issues/_attributes.html.erb +++ b/app/views/issues/_attributes.html.erb @@ -50,15 +50,18 @@ var _v= obj; if(_v==100) { - //alert(3); + //var select=$("select[id='issue_status_id']"); + $("select[id='issue_status_id']").find("option[value='3']").attr("selected","selected"); } else if(_v==0) { - //alert(1); + //alert(1); + $("select[id='issue_status_id']").find("option[value='1']").attr("selected","selected"); } else if(_v!=100&&_v!=0) { // alert(2); + $("select[id='issue_status_id']").find("option[value='2']").attr("selected","selected"); } } From 387d4820590cb4a97e93cfdaaed302663baa0b7f Mon Sep 17 00:00:00 2001 From: linhk <304431313@.com> Date: Thu, 7 Aug 2014 15:58:00 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E6=97=A0=E5=9C=B0=E5=8C=BA=E3=80=81=E8=BA=AB?= =?UTF-8?q?=E4=BB=BD=E5=8F=AF=E6=B3=A8=E5=86=8C=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/account_controller.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index c05d1172c..c1b38fa39 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -140,6 +140,15 @@ class AccountController < ApplicationController @user.password, @user.password_confirmation = user_params[:password], user_params[:password_confirmation] end + if(@cache_identityy == "") + flash.now[:error]= l(:label_identity)+l(:'activerecord.errors.messages.empty') + return + end + if(@cache_city == "") + flash.now[:error]= l(:label_location)+l(:'activerecord.errors.messages.empty') + return + end + case Setting.self_registration when '1' register_by_email_activation(@user) From af683f917dd11b87fe5ba5c43d2d78bf40ca150a Mon Sep 17 00:00:00 2001 From: linhk <304431313@.com> Date: Thu, 7 Aug 2014 16:09:50 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E5=90=8D=E9=9D=9E=E6=B3=95=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=88=90=E5=8A=9F=E6=96=B0=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/repository.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 57a818270..c2736dd30 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -42,7 +42,7 @@ class Repository < ActiveRecord::Base validates_uniqueness_of :identifier, :scope => :project_id, :allow_blank => true validates_exclusion_of :identifier, :in => %w(show entry raw changes annotate diff show stats graph) # donwcase letters, digits, dashes, underscores but not digits only - validates_format_of :identifier, :with => /^[a-zA-Z0-9_\-]+$/, :allow_blank => true + validates_format_of :identifier, :with => /^[a-z0-9_\-]+$/, :allow_blank => true # Checks if the SCM is enabled when creating a repository validate :repo_create_validation, :on => :create