Sha256: 958606e064e36175942a46ff0378a57875115f5a76270910d1b102d1625dc854
Contents?: true
Size: 928 Bytes
Versions: 59
Compression:
Stored size: 928 Bytes
Contents
jQuery(function($) { $('.admin_users form.pageflow_invitation_form').each(function() { var quotaStateContainer = $('#quota_state_container', this); var accountSelect = $('#invitation_form_membership_entity_id', this); var fieldsets = $('#invitation_form_details', this).add('fieldset.actions', this); function updateQutaState() { var selectedAccountId = accountSelect.val(); $.get('/admin/users/quota_state?account_id=' + selectedAccountId) .success(function(html) { quotaStateContainer.html(html); updateForm(); }); } function updateForm() { if (quotaAvailable()) { fieldsets.show(); } else { fieldsets.hide(); } } function quotaAvailable() { return !!quotaStateContainer.find('[data-state=available]').length; } accountSelect.on('change', updateQutaState); updateForm(); }); });
Version data entries
59 entries across 59 versions & 1 rubygems