[PATCH conductor] BZ 786207 - selection validation on launch_new
Maros Zatko
mzatko at redhat.com
Tue Mar 6 21:56:59 UTC 2012
On 03/05/2012 02:24 PM, Tomáš Hrčka wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=786207
>
> added javascript to enable next button when name of deployement is filled
> ---
> src/app/views/deployments/_launch_new.html.haml | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/src/app/views/deployments/_launch_new.html.haml b/src/app/views/deployments/_launch_new.html.haml
> index ef18898..46f1499 100644
> --- a/src/app/views/deployments/_launch_new.html.haml
> +++ b/src/app/views/deployments/_launch_new.html.haml
> @@ -41,7 +41,7 @@
> %div#realm-description
>
> %fieldset.options
> - = submit_tag t('.next'), :class => 'button', :id => "next_button"
> + = submit_tag t('.next'), :class => 'button', :id => "next_button", :disabled => true
>
>
> :javascript
> @@ -61,6 +61,11 @@
> e.preventDefault();
> $.get('#{check_name_deployments_path}', {name: $('#deployment_name').val() }, function(data) {
> $('#name_avail_indicator').html(data == "false" ? "#{t'deployments.launch_new.already_in_use'}" : "#{t'deployments.launch_new.name_available'}");
> + if(data == "true"&& $('#next_button').is(':disabled')){
> + $('#next_button').removeAttr('disabled');
> + }else{
> + $('#next_button').attr("disabled", "disabled");
> + }
> });
> });
>
pushed, put BZ to MODIFIED
More information about the aeolus-devel
mailing list