gitlab-org--gitlab-foss/app/assets/javascripts/transfer_edit.js

12 lines
367 B
JavaScript
Raw Normal View History

import $ from 'jquery';
export default function setupTransferEdit(formSelector, targetSelector) {
const $transferForm = $(formSelector);
const $selectNamespace = $transferForm.find(targetSelector);
$selectNamespace.on('change', () => {
$transferForm.find(':submit').prop('disabled', !$selectNamespace.val());
});
$selectNamespace.trigger('change');
}