1 /* $Id: admin.content_types.js,v 1.3 2008/11/06 10:20:48 dww Exp $ */
4 * Conditionally show or hide the signup date field setting.
6 * On a node type settings form, if the "Allow signups" radios set
7 * set to 0 ('Disabled'), or the node type is event-enabled, then
8 * hide the date field setting. Otherwise, show it.
10 Drupal.behaviors.signupShowDateField = function () {
11 $('div.signup-node-default-state-radios input[@type=radio], div.event-nodeapi-radios input[@type=radio]').click(function () {
12 var eventEnabled = false;
13 var signupDisabled = true;
14 $('div.event-nodeapi-radios input.form-radio').each(function() {
15 if (this.checked && this.value != 'never') {
19 $('div.signup-node-default-state-radios input.form-radio').each(function() {
20 if (this.checked && this.value != 'disabled') {
21 signupDisabled = false;
24 if (signupDisabled || eventEnabled) {
25 $('div.signup-date-field-setting').hide();
28 $('div.signup-date-field-setting').show();