Form: Do not encode actions twice
This commit is contained in:
parent
8448f4ade4
commit
ebe144c16a
|
@ -1086,6 +1086,24 @@ class Form extends Zend_Form
|
|||
return $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the action to submit this form against
|
||||
*
|
||||
* Note that if you'll pass a instance of URL, Url::getAbsoluteUrl('&') is called to set the action.
|
||||
*
|
||||
* @param Url|string $action
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAction($action)
|
||||
{
|
||||
if ($action instanceof Url) {
|
||||
$action = $action->getAbsoluteUrl('&');
|
||||
}
|
||||
|
||||
return parent::setAction($action);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set form description
|
||||
*
|
||||
|
|
|
@ -200,8 +200,7 @@
|
|||
var icinga = self.icinga;
|
||||
// .closest is not required unless subelements to trigger this
|
||||
var $form = $(event.currentTarget).closest('form');
|
||||
var regex = new RegExp('&', 'g');
|
||||
var url = $form.attr('action').replace(regex, '&'); // WHY??
|
||||
var url = $form.attr('action');
|
||||
var method = $form.attr('method');
|
||||
var $button = $('input[type=submit]:focus', $form).add('button[type=submit]:focus', $form);
|
||||
var $target;
|
||||
|
|
Loading…
Reference in New Issue