2018-05-09 12:01:36 +05:30
|
|
|
import $ from 'jquery';
|
|
|
|
|
2019-12-04 20:38:33 +05:30
|
|
|
export default function setupTransferEdit(formSelector, targetSelector) {
|
|
|
|
const $transferForm = $(formSelector);
|
|
|
|
const $selectNamespace = $transferForm.find(targetSelector);
|
2017-09-10 17:25:29 +05:30
|
|
|
|
|
|
|
$selectNamespace.on('change', () => {
|
|
|
|
$transferForm.find(':submit').prop('disabled', !$selectNamespace.val());
|
|
|
|
});
|
|
|
|
$selectNamespace.trigger('change');
|
|
|
|
}
|