debian-mirror-gitlab/app/assets/javascripts/transfer_edit.js
2019-12-04 20:38:33 +05:30

11 lines
367 B
JavaScript

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');
}