Skip to content

Instantly share code, notes, and snippets.

@michaeltwofish
Created April 19, 2010 05:58
Show Gist options
  • Save michaeltwofish/370785 to your computer and use it in GitHub Desktop.
Save michaeltwofish/370785 to your computer and use it in GitHub Desktop.
public function action_admin_header($theme)
{
if ( $theme->page == 'themes' ) {
$js = <<<JS
$(document).ready(function() {
$('#twitter input:checkbox').bind('change', function() {
var disable_twitter_username = $('#twitter input:checked').length == 0;
$('#twitter_username input').attr('disabled', disable_twitter_username);
});
$('#twitter input:checkbox').change();
});
JS;
Stack::add('admin_header_javascript', $js, 'theme_options');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment