Commit 7c68b30a authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge branch 'master' into b7974-tinyMCE

parents 0f620fa3 6e3e1c2e
.. ================================================== .. ==================================================
.. Header hierachy .. Header hierarchy
.. == .. ==
.. -- .. --
.. ^^ .. ^^
...@@ -49,14 +49,17 @@ Features ...@@ -49,14 +49,17 @@ Features
* #8886 / Check pattern: after focus lost. * #8886 / Check pattern: after focus lost.
* #9655 / Checkboxes and radios now defined with a min-width in horizontal plain mode. * #9655 / Checkboxes and radios now defined with a min-width in horizontal plain mode.
* #9617: * #9617 / formModeGlobal:
* Two modes now implemented 'requiredOff' and 'requiredOffButMark'. * Two modes of 'formModeGlobal' available: 'requiredOff' and 'requiredOffButMark'.
* formModeGlobal: renamed skipRequiredCheck to requiredOffButMark . * 'requiredOffButMark':
* Renamed temporary 'skipRequiredCheck' to 'requiredOffButMark'.
* Keep required marks after save. * Keep required marks after save.
* Stop hiding helpblocks per default, set with class qfq-only-active-error. * Stop hiding helpblocks per default, set with class qfq-only-active-error.
* Radio: new class 'qfq-disabled' if readonly is set. softer blue. mark disabled - changed hover. text in darker orange. simple-error renamed to qfq-notify - removed box around error. * Radio: new class 'qfq-disabled' if readonly is set. Softer blue. Mark disabled - changed hover. Text in darker orange.
Simple-error renamed to qfq-notify - removed box around error.
* New default class for 'form' tag: 'qfq-notify'. * New default class for 'form' tag: 'qfq-notify'.
* Manual.rst: Add info for 'letter-no-break'. * Manual.rst: Add info for 'letter-no-break'.
* Add validator.js to list of used packages. * Add validator.js to list of used packages.
...@@ -86,21 +89,17 @@ Date: 25.11.2019 ...@@ -86,21 +89,17 @@ Date: 25.11.2019
Notes Notes
^^^^^ ^^^^^
* Fantastic new formModeGlobal=skipRequiredCheck: fill's '{{allRequiredGiven:V}}' before save to 1 (all given) else 0. * Enhance formModeGlobal=requiredOff/-ButMark (temporarily skipRequiredCheck): fill's '{{allRequiredGiven:V}}' before
save to 1 (all given) else 0.
Offers user to save form, even if not all required data are given and offers application logic to check easily if all Offers user to save form, even if not all required data are given and offers application logic to check easily if all
required fields has been fillled. required fields has been filled.
* formModeGlobal=requiredOff is now deprecated but will still work.
Features Features
^^^^^^^^ ^^^^^^^^
* #9526 / Mark required fields more visible * #9526 / Mark required fields more visible.
* #9617 / Improve 'formModeGlobal=requiredOff'. * #9617 / Improve 'formModeGlobal=requiredOff'.
* New mode name 'skipRequiredCheck'.
* 'requiredOff' is replaced by 'skipRequiredCheck' and now deprecated.
* Add documentation for 'skipRequiredCheck:S' & 'allRequiredGiven:V'
* Feature `Form.formModeGlobal` implemented - STORE_SIP overwrites form definition. * Feature `Form.formModeGlobal` implemented - STORE_SIP overwrites form definition.
* New STORE_VAR variable 'allRequiredGiven'. Becomes '1' if all required fields are given, else 0. * New STORE_VAR variable 'allRequiredGiven'. Becomes '1' if all required fields are given, else 0.
...@@ -114,11 +113,11 @@ Bug Fixes ...@@ -114,11 +113,11 @@ Bug Fixes
* #7639 / subrecord drag n drop: * #7639 / subrecord drag n drop:
* `orderInterval` has not been respected. * `orderInterval` has not been respected.
* Update Manual.rst * Update Manual.rst.
* Fake STORE_SIP so it can be used during processing sql1. * Fake STORE_SIP so it can be used during processing sql1.
* The record, currently loaded into form, is available via STORE_RECORD. * The record, currently loaded into form, is available via STORE_RECORD.
* Check for id/_id and ord/_ord * Check for id/_id and ord/_ord.
* Throw meaningful exception if missing 'id' or 'ord' * Throw meaningful exception if missing 'id' or 'ord'.
* Fixes bug that no mime_type_content is called if there is on file. * Fixes bug that no mime_type_content is called if there is on file.
* Fix broken regex101 url. * Fix broken regex101 url.
......
...@@ -28,6 +28,7 @@ use IMATHUZH\Qfq\Core\Helper\KeyValueStringParser; ...@@ -28,6 +28,7 @@ use IMATHUZH\Qfq\Core\Helper\KeyValueStringParser;
use IMATHUZH\Qfq\Core\Helper\OnArray; use IMATHUZH\Qfq\Core\Helper\OnArray;
use IMATHUZH\Qfq\Core\Helper\Support; use IMATHUZH\Qfq\Core\Helper\Support;
use IMATHUZH\Qfq\Core\Helper\Token; use IMATHUZH\Qfq\Core\Helper\Token;
use IMATHUZH\Qfq\Core\Helper\Sanitize;
use IMATHUZH\Qfq\Core\Store\Sip; use IMATHUZH\Qfq\Core\Store\Sip;
use IMATHUZH\Qfq\Core\Store\Store; use IMATHUZH\Qfq\Core\Store\Store;
...@@ -1525,6 +1526,12 @@ EOF; ...@@ -1525,6 +1526,12 @@ EOF;
*/ */
private function buildDownload($vars, $value) { private function buildDownload($vars, $value) {
// By default, qfq saves everything HTML encoded. E.g. in form ''' - decode them back to regual UTF-8 text.
$filename = html_entity_decode($vars[DOWNLOAD_EXPORT_FILENAME], ENT_QUOTES | ENT_XML1, 'UTF-8');
// Remove unsafe characters.
$vars[DOWNLOAD_EXPORT_FILENAME] = Sanitize::safeFilename($filename);
return $vars; return $vars;
} }
......
...@@ -504,8 +504,9 @@ var QfqNS = QfqNS || {}; ...@@ -504,8 +504,9 @@ var QfqNS = QfqNS || {};
} }
}; };
/* Dynamic Update Trigger */
n.QfqForm.prototype.setupFormUpdateHandler = function () { n.QfqForm.prototype.setupFormUpdateHandler = function () {
$('input[data-load],select[data-load]').on('change', this.formUpdateHandler.bind(this)); $('textarea[data-load],input[data-load],select[data-load]').on('change', this.formUpdateHandler.bind(this));
}; };
n.QfqForm.prototype.formUpdateHandler = function () { n.QfqForm.prototype.formUpdateHandler = function () {
......
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