Projet

Général

Profil

Paste
Télécharger (968 octets) Statistiques
| Branche: | Révision:

root / htmltest / misc / authorize.js @ 85ad3d82

1

    
2
/**
3
 * @file
4
 * Conditionally hide or show the appropriate settings and saved defaults
5
 * on the file transfer connection settings form used by authorize.php.
6
 */
7

    
8
(function ($) {
9

    
10
Drupal.behaviors.authorizeFileTransferForm = {
11
  attach: function(context) {
12
    $('#edit-connection-settings-authorize-filetransfer-default').change(function() {
13
      $('.filetransfer').hide().filter('.filetransfer-' + $(this).val()).show();
14
    });
15
    $('.filetransfer').hide().filter('.filetransfer-' + $('#edit-connection-settings-authorize-filetransfer-default').val()).show();
16

    
17
    // Removes the float on the select box (used for non-JS interface).
18
    if ($('.connection-settings-update-filetransfer-default-wrapper').length > 0) {
19
      $('.connection-settings-update-filetransfer-default-wrapper').css('float', 'none');
20
    }
21
    // Hides the submit button for non-js users.
22
    $('#edit-submit-connection').hide();
23
    $('#edit-submit-process').show();
24
  }
25
};
26

    
27
})(jQuery);