Commit 72c26830 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge branch 'develop' into F13679_subrecord_tablesorter_view_saver

# Conflicts:
#	javascript/src/Main.js
parents 167b3dc0 b6866fa0
......@@ -1289,7 +1289,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 +1301,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
^^^^^^^^^^^
......@@ -1944,6 +1947,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
......
......@@ -246,12 +246,10 @@ Setup CSS & JS
file05 = typo3conf/ext/qfq/Resources/Public/Css/qfq-bs.css
file06 = typo3conf/ext/qfq/Resources/Public/Css/tablesorter-bootstrap.css
file07 = typo3conf/ext/qfq/Resources/Public/Css/font-awesome.min.css
file08 = typo3conf/ext/qfq/Resources/Public/Css/bootstrap-datetimepicker.min.css
# Only needed in case FullCalendar is used
file08 = typo3conf/ext/qfq/Resources/Public/Css/fullcalendar.min.css
# Only needed in case FormElement 'datetime'/'date' is used
file09 = typo3conf/ext/qfq/Resources/Public/Css/bootstrap-datetimepicker.min.css
file09 = typo3conf/ext/qfq/Resources/Public/Css/fullcalendar.min.css
}
page.includeJS {
......@@ -268,17 +266,16 @@ 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/moment.min.js
file15 = typo3conf/ext/qfq/Resources/Public/JavaScript/bootstrap-datetimepicker.min.js
# Only needed in case FormElement 'annotate' is used.
file14 = typo3conf/ext/qfq/Resources/Public/JavaScript/fabric.min.js
file15 = 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
file16 = typo3conf/ext/qfq/Resources/Public/JavaScript/moment.min.js
file17 = typo3conf/ext/qfq/Resources/Public/JavaScript/fullcalendar.min.js
# Only needed in case FullCalendar is used.
file18 = typo3conf/ext/qfq/Resources/Public/JavaScript/fullcalendar.min.js
# Only needed in case FormElement 'datetime'/'date' is used
file18 = typo3conf/ext/qfq/Resources/Public/JavaScript/bootstrap-datetimepicker.min.js
}
......@@ -296,6 +293,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
......@@ -310,6 +320,10 @@ Setup a *report* to manage all *forms*:
file=_formEditor
* Twig version of FormEditor is available too ::
file=_formEditorTwig
.. _install-checklist:
Installation: Check List
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -9,8 +9,6 @@
namespace IMATHUZH\Qfq\Core;
/**
* Class BuildFormPlain
* @package qfq
......
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