Commit 921d3c5b authored by Carsten  Rose's avatar Carsten Rose

Merge branch 'f9805-optionalJump' into 'master'

F9805 optional jump

See merge request !228
parents e2bedb70 5c06a8c8
Pipeline #3094 passed with stages
in 1 minute and 55 seconds
......@@ -9,7 +9,7 @@ variables:
stages:
- before
- build
- selenium
# - selenium
documentation:
stage: before
......@@ -48,29 +48,29 @@ release:
- scp qfq_${VERSION}_*.zip w16:qfq/releases/
- mv qfq_${VERSION}_*.zip build/qfq.zip
selenium:
stage: selenium
script:
- unzip -q build/qfq.zip -d qfq
- cd docker/
- ./run_qfq_docker.sh -no-deploy
- ./deploy_to_container.sh ../qfq
- ./run_selenium_tests_docker.sh
- echo "hello"
after_script:
# remove containers and move logs to persistent location
- cd docker; ./remove-containers.sh <<< "y"
- cd ..
- umask 002
- mkdir "$SELENIUM_LOGS_PATH/$CI_COMMIT_SHORT_SHA"
- cp extension/Tests/selenium/selenium_logs/* "$SELENIUM_LOGS_PATH/$CI_COMMIT_SHORT_SHA/"
- echo "Selenium Logs copied to $SELENIUM_LOGS_PATH/$CI_COMMIT_SHORT_SHA/"
- echo "Or download result (log/screenshot) in gitlab under CI/CD > Pipelines <job> > right side 'Artifacts'"
# selenium:
# stage: selenium
# script:
# - unzip -q build/qfq.zip -d qfq
# - cd docker/
# - ./run_qfq_docker.sh -no-deploy
# - ./deploy_to_container.sh ../qfq
# - ./run_selenium_tests_docker.sh
# - echo "hello"
# after_script:
# # remove containers and move logs to persistent location
# - cd docker; ./remove-containers.sh <<< "y"
# - cd ..
# - umask 002
# - mkdir "$SELENIUM_LOGS_PATH/$CI_COMMIT_SHORT_SHA"
# - cp extension/Tests/selenium/selenium_logs/* "$SELENIUM_LOGS_PATH/$CI_COMMIT_SHORT_SHA/"
# - echo "Selenium Logs copied to $SELENIUM_LOGS_PATH/$CI_COMMIT_SHORT_SHA/"
# - echo "Or download result (log/screenshot) in gitlab under CI/CD > Pipelines <job> > right side 'Artifacts'"
artifacts:
expire_in: 1 week
paths:
- extension/Tests/selenium/selenium_logs/
# artifacts:
# expire_in: 1 week
# paths:
# - extension/Tests/selenium/selenium_logs/
......@@ -2544,7 +2544,7 @@ Parameter
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| typeAheadLdap | | Enable LDAP as 'Typeahead' data source. |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| typeAheadLdapSearch | string | Regular LDAP search expression. E.g.: `(|(cn=*?*)(mail=*?*))` |
| typeAheadLdapSearch | string | Regular LDAP search expression. E.g.: `(|(cn=*?*)(mail=*?*))`   |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| typeAheadLdapValuePrintf | string | Value formatting of LDAP result, per entry. E.g.: `'%s / %s / %s', mail, roomnumber, telephonenumber` |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
......@@ -2559,6 +2559,9 @@ Parameter
| mode | string | The value `readonly` will activate a global readonly mode of the form - the user can't change any data. |
| | | See :ref:`form-mode-global` |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| activeFirstRequiredTab | digit | 0: off, 1: (default) - with formModeGlobal=requiredOffButMark bring pill to front on save. |
| | | See :ref:`form-mode-global` |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| enterAsSubmit | digit | 0: off, 1: Pressing *enter* in a form means *save* and *close*. Takes default from configuration_. |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| submitButtonText | string | Show a save button at the bottom of the form, with <submitButtonText> . See `submitButtonText`_. |
......@@ -2616,6 +2619,10 @@ Parameter
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| minWidth | int | See checkboxRadioMinWidth_ . |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| minWidth | int | See checkboxRadioMinWidth_ . |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| minWidth | int | See checkboxRadioMinWidth_ . |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
* Example:
......@@ -2702,7 +2709,7 @@ The `mode` is given via (in this priority):
* Via STORE_USER: {{formModeGlobal:U}}
* Via STORE_SIP: {{formModeGlobal:S}}
* Via Form: `form.parameter.mode=...`
* Via Form: `form.parameter.formModeGlobal=...`
Mode
;;;;
......@@ -2732,6 +2739,11 @@ Mode
* On lost focus.
* When the user saves the record.
* After saving the record, by default the first pill with a missing input comes to front. This behaviour can be
switch on/off with `form.parameter.requiredOffButMark=0|1`
Extra
;;;;;
......
......@@ -31,6 +31,7 @@ class QfqController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
*/
public function showAction() {
$html = '';
$origErrorReporting = '';
$flagOk = false;
......
......@@ -605,6 +605,7 @@ abstract class AbstractBuildForm {
$attribute[FE_INPUT_AUTOCOMPLETE] = 'on';
$attribute['enctype'] = $this->getEncType();
$attribute['data-disable-return-key-submit'] = $this->formSpec[F_ENTER_AS_SUBMIT] == '1' ? "false" : "true"; // attribute meaning is inverted
$attribute['data-activate-first-required-tab'] = $this->formSpec[F_ACTIVATE_FIRST_REQUIRED_TAB] == '1' ? "true" : "false"; // attribute meaning is inverted
return $attribute;
}
......
......@@ -1046,6 +1046,7 @@ const F_NEW_BUTTON_CLASS = SYSTEM_NEW_BUTTON_CLASS;
const F_NEW_BUTTON_GLYPH_ICON = SYSTEM_NEW_BUTTON_GLYPH_ICON;
const F_ENTER_AS_SUBMIT = SYSTEM_ENTER_AS_SUBMIT;
const F_ACTIVATE_FIRST_REQUIRED_TAB = 'activeFirstRequiredTab';
const F_DRAG_AND_DROP_ORDER_SQL = 'dragAndDropOrderSql';
const F_ORDER_INTERVAL = 'orderInterval';
......
......@@ -74,7 +74,7 @@ class Database {
$this->store = Store::getInstance();
$storeSystem = $this->store->getStore(STORE_SYSTEM);
$this->sqlLog = $storeSystem[SYSTEM_SQL_LOG];
$this->sqlLog = $storeSystem[SYSTEM_SITE_PATH] . '/' . $storeSystem[SYSTEM_SQL_LOG];
$dbInit = $storeSystem[SYSTEM_DB_INIT];
$config = $this->getConnectionDetails($dbIndex, $storeSystem);
......
......@@ -1427,6 +1427,7 @@ class QuickFormQuery {
* @return array
* @throws \CodeException
* @throws \UserFormException
* @throws \UserReportException
*/
private function initForm(array $formSpec, $recordId) {
......@@ -1442,6 +1443,7 @@ class QuickFormQuery {
Support::setIfNotSet($formSpec, F_MULTI_MSG_NO_RECORD, F_MULTI_MSG_NO_RECORD_TEXT);
Support::setIfNotSet($formSpec, F_FE_MIN_WIDTH, F_FE_MIN_WIDTH_DEFAULT);
Support::setIfNotSet($formSpec, FE_INPUT_EXTRA_BUTTON_INFO_MIN_WIDTH, FE_INPUT_EXTRA_BUTTON_INFO_MIN_WIDTH_DEFAULT);
Support::setIfNotSet($formSpec, F_ACTIVATE_FIRST_REQUIRED_TAB, 1);
// In case there is no F_MODE defined on the form, check if there is one in STORE_SIP.
// if ($formSpec[F_MODE] == '') {
......
......@@ -71,7 +71,7 @@ class Save {
$this->evaluate = new Evaluate($this->store, $this->db);
$this->formAction = new FormAction($formSpec, $this->db);
$this->qfqLogFilename = $this->store->getVar(SYSTEM_QFQ_LOG, STORE_SYSTEM);
$this->qfqLogFilename = $this->store->getVar(SYSTEM_SITE_PATH, STORE_SYSTEM) . '/' . $this->store->getVar(SYSTEM_QFQ_LOG, STORE_SYSTEM);
}
......
......@@ -405,10 +405,11 @@ VALUES (2, 'feIdContainer', 'Container', 'show', 'select', 'all', 'native', 120,
'{{SELECT IF("{{formLanguageDId:YE}}"="","hidden","show" ) }}', '', 'none'),
(2, 'encode', 'Encode', 'show', 'radio', 'all', 'native', 300, 0, 0,
'<a tabindex="-1" href="{{documentation:Y}}#field-encode">Info</a>', '', '', '', 'buttonClass=btn-default', 101,
'', 'no', '',
'',
'', '', '', 'specialchar'),
'<a href="{{documentation:Y}}#field-encode">Info</a> {{SELECT IF(''{{encode:FRE:alnumx}}'' = ''specialchar'' AND ''{{checkType:FRE:alnumx}}'' = ''allbut'', "<br><span class=''text-danger''> <span class=''glyphicon glyphicon-warning-sign''></span> <span>Encode ''specialchar'' is not completely compatible with Check Type ''allbut'': certain user input will be converted to its HTML representation (e.g. &amp;quot;), which makes use of a non-supported character (&amp;)</span></span>", '''') }}',
'', '', '', 'buttonClass=btn-default',
101, '', 'yes', '', '', '', '', '', 'specialchar'),
(2, 'checkType', 'Check Type', 'show', 'radio', 'all', 'native', 310, 0, 0,
'<a tabindex="-1" href="{{documentation:Y}}#field-checktype">Info</a>', '', '', '', 'buttonClass=btn-default',
101, '', 'yes',
......
......@@ -54,6 +54,8 @@ var QfqNS = QfqNS || {};
this.formImmutableDueToConcurrentAccess = false;
this.lockRenewalPhase = false;
this.goToAfterSave = false;
this.skipRequiredCheck = false;
this.activateFirstRequiredTab = true;
this.additionalQueryParameters = {
'recordHashMd5': this.getRecordHashMd5()
......@@ -73,6 +75,10 @@ var QfqNS = QfqNS || {};
this.skipRequiredCheck = false;
}
if (typeof $('#' + QfqNS.escapeJqueryIdSelector(this.formId)).data('activate-first-required-tab') !== 'undefined') {
this.activateFirstRequiredTab = $('#' + QfqNS.escapeJqueryIdSelector(this.formId)).data('activate-first-required-tab');
}
this.infoLockedButton = this.infoLockedButton.bind(this);
// This is required when displaying validation messages, in order to activate the tab, which has validation
......@@ -624,10 +630,11 @@ var QfqNS = QfqNS || {};
if (this.form.validate() !== true) {
var element = this.form.getFirstNonValidElement();
if (element.hasAttribute('name') && this.bsTabs) {
var tabId = this.bsTabs.getContainingTabIdForFormControl(element.getAttribute('name'));
if (tabId) {
if (tabId && this.activateFirstRequiredTab) {
this.bsTabs.activateTab(tabId);
}
......
......@@ -1147,12 +1147,18 @@ input.qfq-clear-me {
}
legend {
margin-bottom: 0;
margin-top: 15px;
margin-bottom: 25px;
padding-bottom: 5px;
font-size: 17px;
}
.qfq-fieldset {
margin-top: 38px;
}
.qfq-fieldset:first-child {
margin-top: 15px;
}
/* glyphicon functions */
.icon-flipped {
transform: scaleX(-1);
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="../css/bootstrap.min.css">
<link rel="stylesheet" href="../css/bootstrap-theme.min.css">
<link rel="stylesheet" href="../css/jqx.base.css">
<link rel="stylesheet" href="../css/jqx.bootstrap.css">
<link rel="stylesheet" href="../extension/Resources/Public/Css/qfq-bs.css">
<title>Input Mode Switcher</title>
<link rel="stylesheet" href="../less/qfq-bs.css.less">
</head>
<body>
<div>
<div class="blockscreenQfq"
style="position: fixed; left: 0px; right: 0px; top: 0px; z-index: 998; background: rgba(0, 0, 0, 0.5); width: 100%; height: 953px;"></div>
<div class="border-error alert-interactive removeMe" role="alert" style="z-index: 1000;"><p class="body">
<p><em>2018.12.10 16:44:59 +0100, Reference: 5c0e89fbb48d2</em></p>
<p>Missing parameter 'expectRecords'</p>
<div class="well well-sm" style="max-height: 380px; width: 920px; color: black; overflow-y: scroll; overflow-x: hidden;">
<div class="row" style="margin-bottom: 10px;">
<div class="col-md-2">
<span style="color: grey;">Form</span><br>
Form Title
</div>
<div class="col-md-2">
<span style="color: grey;">Form Element</span><br>
<span style="color: silver;">100</span> Full Name
</div>
<div class="col-md-1">
<span style="color: grey;">pid</span><br>
1
</div>
<div class="col-md-2">
<span style="color: grey;">Content Id</span><br>
1600
</div>
<div class="col-md-2">
<span style="color: grey;">FE User</span><br>
Cool User
</div>
<div class="col-md-3" style="text-align: right;">
<a href="index.php?id=form&amp;s=5c0e89f66783c" class="btn btn-default">Form</a>&nbsp;
<a href="index.php?id=form&amp;s=5c0e89fbb5a7c" class="btn btn-default">Form Element</a>
</div>
</div>
<div class="row">
<div class="col-md-4">
<span style="color: grey;">Type</span><br>
User Form Exception
</div>
<div class="col-md-8">
<span style="color: grey;">To User</span><br>
Missing parameter 'expectRecords'
</div>
</div>
<div style="margin-top: 25px; margin-bottom: 10px; text-align: center;">
<button class="btn btn-default" onclick="$('#detail-1').toggle(600);">Show more details</button>
</div>
<table id="detail-1" class="table qfq-table-80" style="display: none;">
<thead>
<tr>
<th colspan="2">Details</th>
</tr>
</thead>
<tbody>
<tr>
<td>File</td>
<td>/var/www/html/crose/qfq/typo3conf/ext/qfq/qfq/qfq/form/FormAction.php</td>
</tr>
<tr>
<td>Line</td>
<td>299</td>
</tr>
<tr>
<td>IP Address</td>
<td>192.168.133.205</td>
</tr>
<tr>
<td>HTTP User Agent</td>
<td>Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67
Safari/537.36
</td>
</tr>
<tr>
<td>QFQ Cookie</td>
<td>6grhl8dd78ujq24r7d4uk604kl</td>
</tr>
</tbody>
</table>
</div>
<p class="buttons">
<button type="button" class="btn btn-default">Ok</button>
</p>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-10 ">
<div class="btn-toolbar pull-right" role="toolbar">
<div class="btn-group" role="group">
<button id="save-button" type="button" class="btn btn-default navbar-btn"><span
class="glyphicon glyphicon-ok"></span></button>
<button id="close-button" type="button" class="btn btn-default navbar-btn"><span
class="glyphicon glyphicon-remove"></span></button>
</div>
<div class="btn-group" role="group">
<button id="delete-button" type="button" class="btn btn-default navbar-btn"><span
class="glyphicon glyphicon-trash"></span></button>
</div>
<div class="btn-group" role="group">
<a id="form-new-button" href="personmock.html?s=badcaffe1" class="btn btn-default navbar-btn"><span
class="glyphicon glyphicon-plus"></span></a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="fabric"
data-buttons="mockData/fabric.buttons.json"
data-emojis="mockData/qfq.emoji.json"
data-control-name='fabric-output'
data-background-image="mockData/Scan2a.jpeg"
data-fabric-color='{"red": 255, "blue": 128, "green": 0}'>
</div>
<input id="fabric-output" name="fabric-data" type="hidden">
</div>
</div>
</div>
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/fabric.min.js"></script>
<script src="../js/validator.min.js"></script>
<script src="../js/jqx-all.js"></script>
<script src="../js/EventEmitter.min.js"></script>
<script src="../js/qfq.debug.js"></script>
<script src="../javascript/src/Plugins/qfq.fabric.js"></script>
<script type="text/javascript">
$(function () {
var qfqPage = new QfqNS.QfqPage({
tabsId: 'myTabs',
formId: 'myForm',
submitTo: 'api/' + $("#submitTo").val(),
deleteUrl: 'api/' + $("#deleteUrl").val(),
fileUploadTo: 'api/' + $("#uploadTo").val(),
fileDeleteUrl: 'api/' + $("#fileDeleteUrl").val()
});
QfqNS.Log.level = 0;
// Just for mockup, init() function called from new QfqNS.Plugin class maybe.
});
</script>
</body>
</html>
\ No newline at end of file
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