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
This commit is contained in:
James 2011-08-23 16:46:29 -04:00
parent 4c4b57fd31
commit 405edcc5fa
3 changed files with 10 additions and 5 deletions

View File

@ -172,7 +172,7 @@
<?php echo $this->element->getElement('Privacy')->getLabel() ?>
</label>
<?php }else{?>
<a id="link_to_privacy" href="http://www.sourcefabric.org/en/about/policy/" onclick="window.open(this.href); return false;">Terms and Conditions</a>
<a id="link_to_terms_and_condition" href="http://www.sourcefabric.org/en/about/policy/" onclick="window.open(this.href); return false;">Terms and Conditions</a>
<?php }?>
</div>
</form>

View File

@ -172,7 +172,7 @@
</ul>
<?php endif; ?>
<?php }else{?>
<a id="link_to_privacy" href="http://www.sourcefabric.org/en/about/policy/" onclick="window.open(this.href); return false;">Terms and Conditions</a>
<a id="link_to_terms_and_condition" href="http://www.sourcefabric.org/en/about/policy/" onclick="window.open(this.href); return false;">Terms and Conditions</a>
<?php }?>
</div>
</fieldset>

View File

@ -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');