From 405edcc5fa2bc91fafad7b5ec04532aa7f2d62cb Mon Sep 17 00:00:00 2001 From: James Date: Tue, 23 Aug 2011 16:46:29 -0400 Subject: [PATCH] CC-2718: Changes to the support page - "Help Airtime" button is enanbled solely depending on feedback checkbox when user already agreed to Terms and condition --- .../views/scripts/form/register-dialog.phtml | 2 +- .../views/scripts/form/support-setting.phtml | 2 +- airtime_mvc/public/js/airtime/nowplaying/register.js | 11 ++++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/airtime_mvc/application/views/scripts/form/register-dialog.phtml b/airtime_mvc/application/views/scripts/form/register-dialog.phtml index 94244ae30..f600b3352 100644 --- a/airtime_mvc/application/views/scripts/form/register-dialog.phtml +++ b/airtime_mvc/application/views/scripts/form/register-dialog.phtml @@ -172,7 +172,7 @@ element->getElement('Privacy')->getLabel() ?> - Terms and Conditions + Terms and Conditions diff --git a/airtime_mvc/application/views/scripts/form/support-setting.phtml b/airtime_mvc/application/views/scripts/form/support-setting.phtml index 7234a02ac..b670733e2 100644 --- a/airtime_mvc/application/views/scripts/form/support-setting.phtml +++ b/airtime_mvc/application/views/scripts/form/support-setting.phtml @@ -172,7 +172,7 @@ - Terms and Conditions + Terms and Conditions \ No newline at end of file diff --git a/airtime_mvc/public/js/airtime/nowplaying/register.js b/airtime_mvc/public/js/airtime/nowplaying/register.js index 534378a7f..084e933d0 100644 --- a/airtime_mvc/public/js/airtime/nowplaying/register.js +++ b/airtime_mvc/public/js/airtime/nowplaying/register.js @@ -36,7 +36,12 @@ $(document).ready(function(){ }); var button = $("#help_airtime"); - button.attr('disabled', 'disabled').addClass('ui-state-disabled'); + + if($("#link_to_terms_and_condition").length > 0 ){ + button.removeAttr('disabled').removeClass('ui-state-disabled'); + }else{ + button.attr('disabled', 'disabled' ).addClass('ui-state-disabled'); + } dialog.dialog('open'); @@ -57,7 +62,7 @@ $(document).ready(function(){ button.attr('disabled', 'disabled' ).addClass('ui-state-disabled'); }else{ pub.removeAttr("disabled"); - if(privacy.is(':checked')){ + if(privacy.length == 0 || privacy.is(':checked')){ button.removeAttr('disabled').removeClass('ui-state-disabled'); } } @@ -85,7 +90,7 @@ $(document).ready(function(){ } }); - if($("#SupportFeedback").is(':checked') && $("#Privacy").is(':checked')){ + if($("#SupportFeedback").is(':checked') && ($("#Privacy").length == 0 || $("#Privacy").is(':checked'))){ button.removeAttr('disabled').removeClass('ui-state-disabled'); }else{ button.attr('disabled', 'disabled' ).addClass('ui-state-disabled');