c27f619c2a
Refactor project_edit.js to be reusable for this purpose Closes #64799
11 lines
367 B
JavaScript
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');
|
|
}
|