HEX
Server: Apache
System: Linux dev.epsylon.net 3.10.0-1160.144.1.el7.tuxcare.els2.x86_64 #1 SMP Sun Feb 15 11:22:42 UTC 2026 x86_64
User: nexper (1054)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/nexper/public_html/sites/all/modules/media_gallery/js/media_gallery.edit.js
(function ($) {

  Drupal.behaviors.mediaGalleryEdit = Drupal.behaviors.mediaGalleryEdit || {};

  Drupal.behaviors.mediaGalleryEdit.attach = function (context, settings) {
    // Get the set of remove checkboxes
    $('.form-type-checkbox[class *= "remove"]').bind('change', function (event) {
      // Get the value of the checkbox
      var isChecked = event.target.checked;
      // Get the containing media item
      var mediaItem = $(this).closest('.media-edit-form');
      // Get the inputs and wrapping form items in the media item
      var mediaItemFields = mediaItem.find('.sidebar').nextAll().not('.form-actions');
      var inputs = mediaItemFields.find(':input');
      // If the checkbox is checked, disabled the form elements in the media item;
      if (isChecked) {
        mediaItemFields.addClass('disabled');
      }
      // else remove the disabled attribute and styling.
      else {
        mediaItemFields.removeClass('disabled');
      }
    });
  };
})(jQuery);