Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
a9786733
Commit
a9786733
authored
Dec 20, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8451 from skv-headless/transfer-error-handler
transfer error handler
parents
3f13a046
c4a56797
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
12 deletions
+4
-12
app/assets/javascripts/application.js.coffee
app/assets/javascripts/application.js.coffee
+0
-6
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+3
-0
app/views/projects/transfer.js.haml
app/views/projects/transfer.js.haml
+1
-6
No files found.
app/assets/javascripts/application.js.coffee
View file @
a9786733
...
...
@@ -51,12 +51,6 @@ window.ajaxGet = (url) ->
window
.
showAndHide
=
(
selector
)
->
window
.
errorMessage
=
(
message
)
->
ehtml
=
$
(
"<p>"
)
ehtml
.
addClass
(
"error_message"
)
ehtml
.
html
(
message
)
ehtml
window
.
split
=
(
val
)
->
return
val
.
split
(
/,\s*/
)
...
...
app/controllers/projects_controller.rb
View file @
a9786733
...
...
@@ -44,6 +44,9 @@ class ProjectsController < ApplicationController
def
transfer
::
Projects
::
TransferService
.
new
(
project
,
current_user
,
project_params
).
execute
if
@project
.
errors
[
:namespace_id
].
present?
flash
[
:alert
]
=
@project
.
errors
[
:namespace_id
].
first
end
end
def
show
...
...
app/views/projects/transfer.js.haml
View file @
a9786733
-
if
@project
.
errors
[
:namespace_id
].
present?
:plain
$("#tab-transfer .errors-holder").replaceWith(errorMessage('
#{
escape_javascript
(
@project
.
errors
[
:namespace_id
].
first
)
}
'));
$("#tab-transfer .form-actions input").removeAttr('disabled').removeClass('disabled');
-
else
:plain
:plain
location.href = "
#{
edit_project_path
(
@project
)
}
";
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment