mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #648 from ajshort/cms-form-new-window
Don't capture form submits to new windows.
This commit is contained in:
commit
872e2a74c9
@ -163,9 +163,10 @@
|
|||||||
// which means the browser auto-selects the first available form button.
|
// which means the browser auto-selects the first available form button.
|
||||||
// This might be an unrelated button of the form field,
|
// This might be an unrelated button of the form field,
|
||||||
// or a destructive action (if "save" is not available, or not on first position).
|
// or a destructive action (if "save" is not available, or not on first position).
|
||||||
|
if(this.prop("target") != "_blank") {
|
||||||
if(button) this.closest('.cms-container').submitForm(this, button);
|
if(button) this.closest('.cms-container').submitForm(this, button);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user