Commit 9a6f6b63 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Fixed: #2739 beforeDelete funktioniert nicht, #3001 Report: delete implementieren

Index.rst, Constants.php: reverted parameter '_table' in delete links back to 'table' - Reason: 'form' needs to be 'form' (instead of '_form') due to many used places already.
Sip.php: move SIP_TARGET_URL back to stored inside SIP - it's necessary for 'delete'-links.
parent a693f7c6
......@@ -1714,7 +1714,7 @@ Link Examples
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SELECT "p:form_person|c:e" AS _link |<a class="external" href="?form_person">Text</a> |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SELECT "p:form_person&note=Text|t:Person" AS _link |<a class="internal" href="?form_person&S_person=Text">Person</a> |
|SELECT "p:form_person&note=Text|t:Person" AS _link |<a class="internal" href="?form_person&note=Text">Person</a> |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
|SELECT "p:form_person|E" AS _link |<a class="internal" href="?form_person"><img alttext="Edit" src="typo3conf/ext/qfq/Resources/Public/icons/edit.gif"></a> |
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
......@@ -1778,16 +1778,21 @@ Delete
Records will be deleted via `typo3conf/ext/qfq/qfq/api/delete.php` and needs the parameter:
* _targetUrl=<url> , typically, this is the $_SERVER['REQUEST_URI'] available via {{REQUEST_URI:Y}}.
* _answerMode=html
* _table=<table name>
* r=<record id>
Mandatory:
* `table=<table name>` or `form=<form name>`
* `r=<record id>`
Optional:
* `_targetUrl=<url>` , typically, this is the $_SERVER['REQUEST_URI'] available via {{REQUEST_URI:Y}}.
* `_answerMode=html`
Example:
::
SELECT 'u:typo3conf/ext/qfq/qfq/api/delete.php|U:_table=Person&r=123&_targetUrl={{REQUEST_URI:Y}}&_answerMode=html|q:Do you want delete John Doe?|s|c:n' AS _link
SELECT 'u:typo3conf/ext/qfq/qfq/api/delete.php|U:table=Person&r=123&_targetUrl={{REQUEST_URI:Y}}&_answerMode=html|q:Do you want delete John Doe?|s|c:n' AS _link
It's easier to use the shortcut via special columnname `_paged`.
......@@ -1872,7 +1877,7 @@ Necessary parameter:
::
SELECT "p:delete?_table=<tablename>&r=<recordId>|q:<question>|..." AS _paged
SELECT "p:delete?table=<tablename>&r=<recordId>|q:<question>|..." AS _paged, "p:delete?form=<formname>&r=<recordId>|q:<question>|..." AS _paged
..
......
......@@ -333,7 +333,7 @@ const SIP_RECORD_ID = CLIENT_RECORD_ID; // r
const SIP_TARGET_URL= '_targetUrl'; // URL where to jump after delete()
const SIP_MODE_ANSWER = '_modeAnswer'; // Mode how delete() will answer to client: MODE_HTML, MODE_JSON
const SIP_FORM = CLIENT_FORM;
const SIP_TABLE = '_table'; // delete a record from 'table'
const SIP_TABLE = 'table'; // delete a record from 'table'
const SIP_URLPARAM = 'urlparam';
const SIP_MAKE_URLPARAM_UNIQ = '_makeUrlParamUniq'; // SIPs for 'new records' needs to be uniq per TAB! Therefore add a uniq parameter
// FURTHER: all extracted params from 'urlparam
......
......@@ -183,7 +183,7 @@ class Sip {
/**
* Takes the values form an array and creates a urlparamstring. Skip values which should not passed to the urlparamstring.
* - SIP_TARGET_URL is necessary for 'delete' links (via 'report') - may be unessary in other situations
* - SIP_TARGET_URL is necessary for 'delete' links (via 'report') - may be unecessary in other situations.
*
* @param array $sipArray
* @return string
......@@ -197,9 +197,9 @@ class Sip {
// case SIP_MODE_ANSWER:
// case SIP_TABLE:
case SIP_URLPARAM:
break;
case SIP_TARGET_URL: // Do not skip this param. Necessary for delete links (via 'report') - specifies the target where to jump after delete,php has been called via AJAX
break;
case SIP_TARGET_URL: // Do not skip this param. Necessary for delete links (via 'report') - specifies the target where to jump after delete,php has been called (plain HTML, not AJAX)
default:
$tmpArray[$key] = $value;
break;
......
Markdown is supported
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