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
Jérome Perrin
gitlab-ce
Commits
576ffef6
Commit
576ffef6
authored
Mar 14, 2017
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix project title validation, prevent clicking on disabled button
parent
d4c99f64
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
app/views/projects/new.html.haml
app/views/projects/new.html.haml
+2
-9
No files found.
app/views/projects/new.html.haml
View file @
576ffef6
...
...
@@ -123,23 +123,16 @@
$
(
"
.btn_import_gitlab_project
"
).
attr
(
"
href
"
,
_href
+
'
?namespace_id=
'
+
$
(
"
#project_namespace_id
"
).
val
()
+
'
&path=
'
+
$
(
"
#project_path
"
).
val
());
});
$
(
'
.btn_import_gitlab_project
'
).
attr
(
'
disabled
'
,
true
)
$
(
'
.btn_import_gitlab_project
'
).
attr
(
'
disabled
'
,
$
(
'
#project_path
'
).
val
().
trim
().
length
===
0
);
$
(
'
.import_gitlab_project
'
).
attr
(
'
title
'
,
'
Project path and name required.
'
);
$
(
'
.import_gitlab_project
'
).
click
(
function
(
event
)
{
if
(
$
(
'
.btn_import_gitlab_project
'
).
attr
(
'
disabled
'
))
{
event
.
preventDefault
();
new
Flash
(
"
Please enter path and name for the project to be imported to.
"
);
}
});
$
(
'
#new_project
'
).
submit
(
function
(){
var
$path
=
$
(
'
#project_path
'
);
$path
.
val
(
$path
.
val
().
trim
());
});
$
(
'
#project_path
'
).
keyup
(
function
(){
if
(
$
(
this
).
val
().
length
!=
0
)
{
if
(
$
(
this
).
val
().
trim
().
length
!==
0
)
{
$
(
'
.btn_import_gitlab_project
'
).
attr
(
'
disabled
'
,
false
);
$
(
'
.import_gitlab_project
'
).
attr
(
'
title
'
,
''
);
$
(
"
.flash-container
"
).
html
(
""
)
...
...
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