2018-03-09 15:18:59 -05:00
|
|
|
import $ from 'jquery';
|
|
|
|
|
2019-09-11 10:28:34 -04:00
|
|
|
export default function setupTransferEdit(formSelector, targetSelector) {
|
|
|
|
const $transferForm = $(formSelector);
|
|
|
|
const $selectNamespace = $transferForm.find(targetSelector);
|
2017-05-09 11:09:20 -04:00
|
|
|
|
2017-05-16 12:41:50 -04:00
|
|
|
$selectNamespace.on('change', () => {
|
|
|
|
$transferForm.find(':submit').prop('disabled', !$selectNamespace.val());
|
|
|
|
});
|
|
|
|
$selectNamespace.trigger('change');
|
2017-05-09 11:09:20 -04:00
|
|
|
}
|