Commit 983ebee1 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge branch 'develop' into 'master'

Merge new version 22.05

See merge request !430
parents 6eaa555a 1f73b330
Pipeline #7097 passed with stage
in 1 minute and 43 seconds
......@@ -1048,6 +1048,7 @@ FormElement.parameter
| extraDeleteForm, | |
| detail, | |
| subrecordTableClass, | |
| subrecordTableAttribute | |
+---------------------------------+----------------------------------------------------------------------------------------------------------+
| min s/d/n | Minimum and/or maximum allowed values for input field. Can be used for numbers, dates, or strings. |
+---------------------------------+ |
......@@ -1289,7 +1290,9 @@ Type: date
* Range datetime: '1000-01-01' to '9999-12-31' or '0000-00-00'. (http://dev.mysql.com/doc/refman/5.5/en/datetime.html)
* Optional:
* *FormElement.parameter.dateFormat*: yyyy-mm-dd | dd.mm.yyyy
* *FormElement.parameter.dateFormat*: YYYY-MM-DD | DD.MM.YYYY
Actually datetimepicker is used as default. For more options see :ref:`Installation_datetimepicker`
Type: datetime
^^^^^^^^^^^^^^
......@@ -1299,10 +1302,11 @@ Type: datetime
* *FormElement.parameter*:
* *dateFormat* = yyyy-mm-dd | dd.mm.yyyy
* *dateFormat* = YYYY-MM-DD | DD.MM.YYYY
* *showSeconds* = 0|1 - shows the seconds. Independent if the user specifies seconds, they are displayed '1' or not '0'.
* *showZero* = 0|1 - For an empty timestamp, With '0' nothing is displayed. With '1' the string '0000-00-00 00:00:00' is displayed.
Actually datetimepicker is used as default. For more options see :ref:`Installation_datetimepicker`
Type: extra
^^^^^^^^^^^
......@@ -1893,6 +1897,12 @@ will be rendered inside the form as a HTML table.
subrecordTableClass = table table-hover qfq-subrecord-table tablesorter tablesorter-pager tablesorter-filter
* *subrecordTableAttribute*: Optional. Default: empty. Can be used to pass further html tags (attributes) to the subrecord table tag.
Typical use case is the :ref:`tablesorter-view-saver`::
subrecordTableClass = table table-hover qfq-subrecord-table tablesorter tablesorter-pager tablesorter-filter tablesorter-column-selector
subrecordTableAttribute = {{ 'allperson' AS _tablesorter-view-saver }}
* *subrecordColumnTitleEdit*: Optional. Will be rendered as the column title for the new/edit column.
* *subrecordColumnTitleDelete*: Optional. Will be rendered as the column title for the delete column.
......@@ -1944,6 +1954,7 @@ Type: time
* *showSeconds* = `0|1` - shows the seconds. Independent if the user specifies seconds, they are displayed '1' or not '0'.
* *showZero* = `0|1` - For an empty timestamp, With '0' nothing is displayed. With '1' the string '00:00[:00]' is displayed.
Actually datetimepicker is used as default. For more options see :ref:`Installation_datetimepicker`
.. _`input-upload`:
Type: upload
......
......@@ -46,6 +46,7 @@ The following features are only tested / supported on linux hosts:
* Convert of images to PDF files - command `img2pdf`.
* PDF decrypt (used for merge with pdfunite) - command `qpdf`.
* PDF decrypt (used for merge with pdfunite) - command `gs` - in case `qpdf` is not successful.
* PDF fix (used for merge with pdfunite) - command `pdf2ps` and `ps2pdf` - in case `qpdf` is not successful.
* Mime type detection for uploads - command `file`.
* Split PDF into JPG - command `convert`.
* Repair PDF - command `pdftocairo`.
......@@ -63,7 +64,8 @@ To normalize UTF8 input, *php-intl* package is needed by
* normalizer::normalize()
For the :ref:`download` function, the programs `img2pdf`, `pdfunite`, `qpdf`, `gs` and `file` are necessary to concatenate PDF files.
For the :ref:`download` function, the programs `img2pdf`, `pdfunite`, `qpdf`, `gs`, `pdf2ps`, `ps2pdf` and `file` are
necessary to concatenate PDF files.
Preparation for Ubuntu::
......@@ -266,14 +268,14 @@ Setup CSS & JS
file11 = typo3conf/ext/qfq/Resources/Public/JavaScript/jquery.tablesorter.pager.min.js
file12 = typo3conf/ext/qfq/Resources/Public/JavaScript/widget-columnSelector.min.js
file13 = typo3conf/ext/qfq/Resources/Public/JavaScript/widget-output.min.js
file14 = typo3conf/ext/qfq/Resources/Public/JavaScript/bootstrap-datetimepicker.min.js
file14 = typo3conf/ext/qfq/Resources/Public/JavaScript/moment.min.js
file15 = typo3conf/ext/qfq/Resources/Public/JavaScript/bootstrap-datetimepicker.min.js
# Only needed in case FormElement 'annotate' is used.
file15 = typo3conf/ext/qfq/Resources/Public/JavaScript/fabric.min.js
file16 = typo3conf/ext/qfq/Resources/Public/JavaScript/qfq.fabric.min.js
file16 = typo3conf/ext/qfq/Resources/Public/JavaScript/fabric.min.js
file17 = typo3conf/ext/qfq/Resources/Public/JavaScript/qfq.fabric.min.js
# Only needed in case FullCalendar is used.
file17 = typo3conf/ext/qfq/Resources/Public/JavaScript/moment.min.js
file18 = typo3conf/ext/qfq/Resources/Public/JavaScript/fullcalendar.min.js
}
......@@ -293,6 +295,19 @@ As first option both can be inserted to the setup of the main Template like the
Second option is to use the UZH CD template.
Following configurations can be set over FormElement.parameter:
dateFormat = *DD.MM.YYYY HH:mm:ss* | *MM-DD-YYYY HH:mm* | *dddd DD.MM.YYYY HH:mm* -> DD:day of month,MM:month value,YYYY:year value,HH:24h,hh:12h AM-PM,mm:minutes,ss:seconds,dddd:written day of week
dateDaysOfWeekEnabled = *0,1,6* -> 0:sunday,1:monday,2:tuesday,3:wednesday,4:thursday,5:friday,6:saturday
dateLocale = *en* | *de* -> Set language
min = *03.05.2022* -> minDate that can be selected
max = *23.07.2022* -> maxDate that can be selected
dateViewModeDefault = *days* | *months* | *years*
clearMe = *0* | *1* -> show clear button
dateShowCalendarWeeks = *false* | *true*
dateUseCurrentDatetime = *false* | *true*
datetimeSideBySide = *false* | *true* -> Show time right to date
.. _form-editor:
FormEditor
......@@ -307,6 +322,10 @@ Setup a *report* to manage all *forms*:
file=_formEditor
* Twig version of FormEditor is available too ::
file=_formEditorTwig
.. _install-checklist:
Installation: Check List
......
......@@ -2949,7 +2949,8 @@ The *tablesorter* options:
is shown.
* Class `tablesorter-column-selector` adds a column selector widget.
* Activate/Save/Delete `views`: Insert inside of a table html-tag the command::
.. _tablesorter-view-saver:
* Tablesorter view saver: Insert inside of a table html-tag the command::
{{ '<uniqueName>' AS _tablesorter-view-saver }}
......
......@@ -125,6 +125,10 @@ to edit `AutoCron` jobs::
}
Or you can use the following code in a separate QFQ record for the twig version of autoCron::
file=_autoCronTwig
Usage
^^^^^
......
......@@ -10,7 +10,6 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\QuickFormQuery;
use IMATHUZH\Qfq\Core\Store\Store;
......
......@@ -10,7 +10,6 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\QuickFormQuery;
use IMATHUZH\Qfq\Core\Store\Store;
......
......@@ -11,7 +11,6 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Form\Dirty;
use IMATHUZH\Qfq\Core\Helper\Path;
/**
* Return JSON encoded answer
......
......@@ -12,7 +12,6 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\Report\Download;
......
......@@ -10,7 +10,6 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\QuickFormQuery;
......
......@@ -11,7 +11,6 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\File;
use IMATHUZH\Qfq\Core\Helper\Path;
/**
* Process File Upload - immediately when the the user selects a file.
......
......@@ -10,9 +10,8 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\Store\Store;
use IMATHUZH\Qfq\Core\QuickFormQuery;
use IMATHUZH\Qfq\Core\Store\Store;
/**
......
......@@ -11,7 +11,6 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\Report\Html2Pdf;
use IMATHUZH\Qfq\Core\Store\Config;
......
......@@ -10,9 +10,8 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\QuickFormQuery;
use IMATHUZH\Qfq\Core\Helper\OnString;
use IMATHUZH\Qfq\Core\QuickFormQuery;
$restId = array();
$restForm = array();
......
......@@ -10,10 +10,9 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\Helper\Support;
use IMATHUZH\Qfq\Core\QuickFormQuery;
use IMATHUZH\Qfq\Core\Store\Store;
use IMATHUZH\Qfq\Core\Helper\Support;
/**
* Return JSON encoded answer
......
......@@ -10,7 +10,6 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\QuickFormQuery;
/**
......
......@@ -12,7 +12,6 @@ namespace IMATHUZH\Qfq\Api;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Form\TypeAhead;
use IMATHUZH\Qfq\Core\Helper\Path;
/**
* Return JSON encoded answer
......
......@@ -7,7 +7,6 @@ namespace IMATHUZH\Qfq\Controller;
require_once(__DIR__ . '/../../vendor/autoload.php');
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\QuickFormQuery;
......
......@@ -1488,11 +1488,21 @@ abstract class AbstractBuildForm {
$formElement[FE_TYPE] = 'hidden';
}
}
// If type password is selected then type text with own class will be taken to fake password over CSS
if ($formElement[FE_TYPE] === 'password') {
$formElement[FE_TYPE] = 'text';
$class .= ' qfq-password';
}
$attribute .= HelperFormElement::getAttributeList($formElement, [FE_TYPE, 'size']);
$attribute .= Support::doAttribute('value', htmlentities($value), false);
// $attribute .= Support::doAttribute('value', htmlentities($value, ENT_QUOTES, 'UTF-8'), false);
}
// Set for password to give choice of generated password for user and not autofill password field. Deprecated, we dont use type password anymore.
// if($formElement[FE_TYPE] === 'password') {
// $attribute .= Support::doAttribute('autocomplete', 'new-password');
// }
$attribute .= HelperFormElement::getAttributeList($formElement, [FE_INPUT_AUTOCOMPLETE, 'autofocus', 'placeholder']);
$formElement[FE_CHECK_PATTERN] = Sanitize::getInputCheckPattern($formElement[FE_CHECK_TYPE], $formElement[FE_CHECK_PATTERN]
......@@ -1542,6 +1552,11 @@ abstract class AbstractBuildForm {
$input .= $formElement[FE_INPUT_EXTRA_BUTTON_INFO];
}
//Generate an empty input type text to ignore autocomplete in other elements. deprecated because not using type password anymore.
// if($formElement[FE_TYPE] === 'password'){
// $input = '<input type="text" style="display:none;">'.$input;
// }
return $input;
}
......@@ -2284,6 +2299,9 @@ abstract class AbstractBuildForm {
$attribute = Support::doAttribute('class', $formElement[FE_SUBRECORD_TABLE_CLASS]);
$attribute .= Support::doAttribute('id', $tableSorterHtmlId);
if(isset($formElement[FE_SUBRECORD_TABLE_ATTRIBUTE])){
$attribute .= $this->evaluate->parse($formElement[FE_SUBRECORD_TABLE_ATTRIBUTE]);
}
return Support::wrapTag("<table $attribute>",
$htmlHead . Support::wrapTag("<tbody $dndAttributes>", $htmlBody), true);
......
......@@ -8,7 +8,7 @@
namespace IMATHUZH\Qfq\Core;
use IMATHUZH\Qfq\Core\Helper\Support;
const NESTING_TOKEN_OPEN = '#&nesting-open-&#';
......@@ -121,7 +121,7 @@ class BodytextParser {
if ($firstLine[0] === '#') {
$token = substr($firstLine, -1);
switch($token) {
switch ($token) {
case '<':
$nestingOpen = '<';
$nestingClose = '>';
......
......@@ -22,6 +22,7 @@ use IMATHUZH\Qfq\Core\Helper\Support;
class BuildFormBootstrap extends AbstractBuildForm {
private $isFirstPill;
/**
* @param array $formSpec
* @param array $feSpecAction
......@@ -155,7 +156,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
$class[] = 'qfq-form-no-title';
}
}
$html .= "<div " . Support::doAttribute('class', $class) .">";
$html .= "<div " . Support::doAttribute('class', $class) . ">";
return $html;
}
......@@ -245,6 +246,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
$form = false;
$url = '';
$status = '';
$requiredNew = '';
switch ($this->formSpec[F_NAME]) {
case 'form':
......@@ -253,6 +255,8 @@ class BuildFormBootstrap extends AbstractBuildForm {
case 'formElement':
if (false !== ($formId = $this->store->getVar(FE_FORM_ID, STORE_SIP . STORE_RECORD))) {
$row = $this->dbArray[$this->dbIndexQfq]->sql("SELECT `f`.`name` FROM `Form` AS f WHERE `id`=" . $formId, ROW_EXPECT_1);
$rowRequiredNew = $this->dbArray[$this->dbIndexQfq]->sql("SELECT `f`.`requiredParameterNew` FROM `Form` AS f WHERE `id`=" . $formId, ROW_EXPECT_1);
$requiredNew = current($rowRequiredNew);
$form = current($row);
}
break;
......@@ -264,7 +268,9 @@ class BuildFormBootstrap extends AbstractBuildForm {
$toolTip = "Form not 'form' or 'formElement'";
$status = 'disabled';
} else {
$requiredNew = $this->store->getVar(F_REQUIRED_PARAMETER_NEW, STORE_RECORD . STORE_EMPTY);
if ($requiredNew === '') {
$requiredNew = $this->store->getVar(F_REQUIRED_PARAMETER_NEW, STORE_RECORD . STORE_EMPTY);
}
if (trim($requiredNew) !== '') {
$toolTip = "Form has 'required new' parameters and therefore cannot be previewed.";
$status = 'disabled';
......@@ -643,8 +649,8 @@ class BuildFormBootstrap extends AbstractBuildForm {
$submitTo = Path::urlApi(API_SAVE_PHP);
$refreshUrl = Path::urlApi(API_LOAD_PHP);
$fileUploadTo = Path::urlApi(API_FILE_PHP) . '?' . $actionUpload;
$fileDeleteUrl = Path::urlApi(API_FILE_PHP) . '?' . $actionDelete;
$fileUploadTo = Path::urlApi(API_FILE_PHP) . '?' . $actionUpload;
$fileDeleteUrl = Path::urlApi(API_FILE_PHP) . '?' . $actionDelete;
$html .= '</form>'; // <form class="form-horizontal" ...
$html .= <<<EOF
......@@ -698,10 +704,6 @@ EOF;
}
$html .= '</div>'; // <div class="container-fluid"> === main <div class=...> around everything
return $html;
......
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