var awardAutomatically = elBySel('input[name=awardAutomatically]').checked;
elBySelAll('.conditionSection', null, window[(awardAutomatically ? 'elShow' : 'elHide')]);
+ var revokeCheckbox = elBySel('#revokeAutomaticallyDL input');
if (awardAutomatically) {
- elShow(elById('revokeAutomaticallyDL'));
+ elById('revokeAutomaticallyDL').classList.remove('disabled');
+ revokeCheckbox.disabled = false;
}
else {
- elHide(elById('revokeAutomaticallyDL'));
+ elById('revokeAutomaticallyDL').classList.add('disabled');
+ revokeCheckbox.disabled = true;
+ revokeCheckbox.checked = false;
}
});
</dd>
</dl>
- <dl id="revokeAutomaticallyDL"{if !$awardAutomatically} style="display: none;"{/if}>
+ <dl id="revokeAutomaticallyDL"{if !$awardAutomatically} class="disabled"{/if}>
<dt></dt>
<dd>
- <label><input type="checkbox" name="revokeAutomatically" value="1"{if $revokeAutomatically} checked{/if}> {lang}wcf.acp.trophy.revokeAutomatically{/lang}</label>
+ <label><input type="checkbox" name="revokeAutomatically" value="1"{if $revokeAutomatically && $awardAutomatically} checked{/if}{if !$awardAutomatically} disabled{/if}> {lang}wcf.acp.trophy.revokeAutomatically{/lang}</label>
</dd>
</dl>