Jump to content

ips.ui.dialog setLoading unexpected behavior?


BomAle

Recommended Posts

When try to submit a dialog into plugins page the dialog hide with setLoading the form, and the values are not fetched because form is hidden.

// Otherwise, we've passed verification and we can submit the form as normal
form.attr( 'data-bypassValidation', true ).submit();

image.thumb.png.1dd4150966995b3458437c0dfc63b02b.png

if I replace code as follow, the values are passed into request

// Otherwise, we've passed verification and we can submit the form as normal
setLoading(false);
form.attr( 'data-bypassValidation', true ).submit();

image.thumb.png.f84d4b1e5d7f06cc9ecfd60c11415b5b.png

@bfarber @Daniel F

Link to comment
Share on other sites

it happen only for matrix table elements, I would suggest to edit ips.ui.matrix as follow

//change:
_submitForm = function (e) {
	// Remove names from the inputs in the blank row
	elem.find('[data-matrixrowid]:hidden')
		.find('input, select, textarea')
		.attr( 'name', '' )
		.prop( 'disabled', true );

//to

_submitForm = function (e) {
	// Remove names from the inputs in the blank row
	var contentDialog = elem.closest('.ipsDialog').length && elem.closest('.ipsDialog').find( '.ipsDialog_content' ),
	hiddenDialog = contentDialog && contentDialog.is(':hidden');
	hiddenDialog && contentDialog.show();
	elem.find('[data-matrixrowid]:hidden')
		.find('input, select, textarea')
		.attr( 'name', '' )
		.prop( 'disabled', true );
	hiddenDialog && contentDialog.hide();

 OR check if ips.ui.dialog.setLoading is called true while call _submitForm into ips.ui.matrix

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...