Commit d65c7def authored by Carsten  Rose's avatar Carsten Rose
Browse files

#1930, #3980 / Client: Bei Form Submit den Status 'submit_reason=save|save,close' mitsenden

Implemented: New > Close (save) now closes correctly the current page. Addtional, #1930 has been solved implizit.
parent 47d799fe
......@@ -267,7 +267,7 @@ Request Method
: POST
URL Parameters
: none
: `submit_reason=save` | `submit_reason=save,close`
Server Response
: The response contains at least a [Minimal Response]. In addition, a
......
......@@ -589,6 +589,10 @@ const API_FORM_UPDATE = 'form-update';
const API_ELEMENT_UPDATE = 'element-update';
const API_ELEMENT_ATTRIBUTE = 'attr';
const API_ELEMENT_CONTENT = 'content';
const API_SUBMIT_REASON = 'submit_reason';
const API_SUBMIT_REASON_SAVE = 'save';
const API_SUBMIT_REASON_SAVE_CLOSE = 'save,close';
const API_LOCK_ACTION_LOCK = 'lock';
const API_LOCK_ACTION_EXTEND = 'extend';
......@@ -617,7 +621,6 @@ const DATA_REQUIRED = 'data-required';
const CLASS_TYPEAHEAD = 'qfq-typeahead';
const DATA_TYPEAHEAD_SIP = 'data-typeahead-sip'; // Used for typeAhead
const CLASS_NOTE = 'qfq-note';
const DATA_ENABLE_SAVE_BUTTON = 'data-enable-save-button';
......
......@@ -373,7 +373,8 @@ class QuickFormQuery {
$getJson = true;
// Retrieve current STORE_SIP.
$sipArray = $this->store->getStore(STORE_SIP);
if ($sipArray[SIP_RECORD_ID] == 0) {
if ($sipArray[SIP_RECORD_ID] == 0 && API_SUBMIT_REASON_SAVE == $this->store->getVar(API_SUBMIT_REASON . ':CE:alnumx')) {
// if ($sipArray[SIP_RECORD_ID] == 0 ) {
if ($this->formSpec[F_FORWARD_MODE] !== F_FORWARD_MODE_URL &&
$this->formSpec[F_FORWARD_MODE] !== F_FORWARD_MODE_URL_SKIP_HISTORY &&
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment