Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b75f7687
authored
Feb 12, 2013
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webui: prevent submitting not unique template wizard
parent
b7bb958e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletions
+18
-1
one/templates/new-template-flow.html
+18
-1
No files found.
one/templates/new-template-flow.html
View file @
b75f7687
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
$
(
"#new-template-name"
).
keyup
(
function
(){
$
(
"#new-template-name"
).
keyup
(
function
(){
var
timer
;
var
timer
;
return
function
(
e
){
return
function
(
e
){
var
self
=
this
;
var
self
=
this
;
clearTimeout
(
timer
);
clearTimeout
(
timer
);
timer
=
setTimeout
(
function
(){
timer
=
setTimeout
(
function
(){
var
s
=
$
(
self
).
val
();
var
s
=
$
(
self
).
val
();
...
@@ -95,6 +95,23 @@
...
@@ -95,6 +95,23 @@
},
1000
)
},
1000
)
}
}
}());
}());
$
(
"#template-wizard"
).
submit
(
function
(
e
){
e
.
preventDefault
();
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/ajax/template_name_unique/'
+
$
(
"#new-template-name"
).
val
(),
'success'
:
function
(
data
,
b
,
c
)
{
if
(
data
==
"True"
)
{
$
(
"#template-wizard"
).
unbind
(
'submit'
).
submit
()
}
else
{
$
(
'#new-template-name'
).
addClass
(
"error"
);
$
(
'#new-template-step-2 nav .next'
).
attr
(
"disabled"
,
"disabled"
);
$
(
'#new-template-name'
).
prop
(
"title"
,
gettext
(
'Please choose a different name.'
));
}
}
});
});
})
})
</script>
</script>
</div>
</div>
...
...
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