Commit bc7b2ad6 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge branch 'master' into punktetool

parents bad9a575 bd213b63
......@@ -58,10 +58,10 @@ build-dist: t3sphinx make-dist-dir dist-copy-extension dist-move-doc git-revisio
echo "Distribution made in $(DIST)"
nightly: bootstrap build-dist
cd $(DISTDIR); zip -r ../qfq_$(NIGHTLY_DATE) $(EXTENSION_CONTENT) revision.git -x config.ini
cd $(DISTDIR); zip -r ../qfq_$(VERSION)_$(RELEASE_DATE).zip $(EXTENSION_CONTENT) revision.git -x config.ini
snapshot: bootstrap build-dist
cd $(DISTDIR) ; zip -r ../qfq_$(NIGHTLY_DATE)_$(GIT_REVISION_SHORT) $(EXTENSION_CONTENT) revision.git -x config.ini
cd $(DISTDIR) ; zip -r ../qfq_$(VERSION)_$(RELEASE_DATE).zip $(EXTENSION_CONTENT) revision.git -x config.ini
release: bootstrap build-dist
if [ -z "$(VERSION)" ] ; then echo "Set VERSION make variable to the release version (fmt: maj.min.micro)" ; exit 1 ; fi
......
......@@ -6,13 +6,13 @@ Version: see `extension/ext_emconf.php`
Download
--------
See: https://w3.math.uzh.ch/qfq/
Get from here: https://qfq.io/download
* release - Stable
* nightly - Development version(1)
* snapshot - Current, development version(1)
(1) To install the extension, the name of uploaded ZIP file has to follow some rule:
(1) To install the extension, the name of an uploaded ZIP file has to follow rules:
* \<ext\>.zip or
* \<ext\>_\<major\>.\<minor\>[.\<micro\>][_\<something\>].zip
......@@ -20,14 +20,14 @@ See: https://w3.math.uzh.ch/qfq/
Documentation
-------------
Latest stable version under https://docs.typo3.org/typo3cms/drafts/github/T3DocumentationStarter/Public-Info-053/Index.html
Latest stable version under https://qfq.io/doc
Local: See the documentation provided with the exentions inside Typo3
Local: See the documentation provided with the extension inside Typo3
<your Typo3 installation>/typo3conf/ext/qfq/Documentation/html/Index.html
If you get a 'Page forbidden / not found' there might be some Webserver restrictions. E.g. the Typo3 example of `.htaccess`
If you get a 'Page forbidden / not found' there might be restrictions imposed by the webserver. E.g. the Typo3 example of `.htaccess`
in the Typo3 installation folder will forbid access to any extension documentation (which is a good idea on a productive
server). For a development server instead, activate the documentation. `.htaccess`:
server). On a development server you can activate the documentation. `.htaccess`:
<pre>
production: RewriteRule (?:typo3conf/ext|typo3/sysext|typo3/ext)/[^/]+/(?:Configuration|Resources/Private|Tests?|Documentation|docs?)/ - [F]
......
......@@ -13,7 +13,7 @@ Neue Versionsnummer
2) Die aktuellen Commits anschauen und wichtige Topics uebernehmen (git log > ~/qfq.log, alles bis zum letzten TAG anschauen):
# complicated: * git log | grep -v -e '^commit ' -e '^Author: ' -e '^Date: ' -e '^Merge: ' > /tmp/out; pluma /tmp/out
# complicated: git log | grep -v -e '^commit ' -e '^Author: ' -e '^Date: ' -e '^Merge: ' > /tmp/out; pluma /tmp/out
# Zeigt alle Commits an, die seit dem aendern von NewVersion gemacht wurden! Das sollten alle Commits seit der letzten Version sein.
* git log --pretty=%s --after="`stat -c %y doc/NewVersion.md`"
......@@ -43,8 +43,8 @@ Neue Versionsnummer
6) New Tag:
git tag v0.23.1
git push -u origin v0.23.1
git tag v0.25.0
git push -u origin v0.25.0
7) PhpStorm: Sync all files to VM qfq.
......
This diff is collapsed.
......@@ -36,14 +36,73 @@ Features
Bug Fixes
^^^^^^^^^
Version 0.23.0
Version 0.25.0
--------------
Date: 17.09.2017
Date: 10.10.2017
Notes
^^^^^
* The config.qfq.ini directives DB_USER, DB_NAME, DB_HOST, DB_PASSWORD are replaced by DB_1_USER, DB_1_NAME, DB_1_HOST,
DB_1_PASSWORD. The old directives are still used, as long as the new directives does not exist.
* New config.qfq.ini directives: DB_INDEX_DATA, DB_INDEX_QFQ
Features
^^^^^^^^
* #4720 - Separate database handles for QFQ 'form' and QFQ 'data' - 'Form' might now load/save from forign database/host/user.
Version 0.24.0
--------------
Date: 09.10.2017
Notes
^^^^^
* Change Remove SYSTEM_SECURITY_ABSOLUTE_GET_MAX_LENGTH - makes no sense to hardcode an upper limit.
Features
^^^^^^^^
* Feature Manual.rst: Doc updated for latest subrecord column special names
* Feature AbstractBuildForm.php: new function subrecordHead(). Replaced several hard coded subrecord column names against constants.
* Feature #4456 / formModeGlobal=requiredOff - update Manual.rst
* Feature #4606 / _link: qualifier to render bootstrap button - fix unit tests for tooltip. Add tooltip to button/text, even if there is no link. Implement token 'b:...' for link class. Manual is updated. Open: `pageX` should be recoded to use the new 'b:' instead of hardcoed behaviour to render a button.
* Feature: Upload Button - wrapped with Bootstrap Button. New option 'fileButtonText' to specify a button text.
* Feature #3752 / Pills auf mode|modeSql=hidden|readonly setzen - implemented during 'form load' (not dynamic update)
* Feature: Neu wird nach dem Speichern das Formular nochmal komplett geladen. Das ist wichtig um die durch aftersave geaenderten Records in die Formularelemente zu bekommen.
* Feature #4511 / Form: URL Forward - mode dynamic computed - more generic implementation.
Bug Fixes
^^^^^^^^^
* Bug #4731 / Dynamic Update: load(post) triggers 'check required' - makes no sense during filling a form - fixed
* Bug #4730 / InvalidDate-00-00-2000 FE.type=date - detection of empty date was broken for '00.00.0000'.
* Bug Fixed problem in subrecord when no record is selected.
* Bug #4620 / Easy Fix: saveButtonText / closeButtonText Formatierung
Release
=======
Version 0.23.1
--------------
Date: 23.9.2017
Bug Fixes
^^^^^^^^^
* #4620 / Easy Fix: saveButtonText / closeButtonText Formatierung
Version 0.23.0
--------------
Date: 17.09.2017
Features
^^^^^^^^
......
......@@ -2,8 +2,8 @@
[general]
project = QFQ - Quick Form Query
version = 0.23
release = 0.23.1
version = 0.25
release = 0.25.0
t3author = Carsten Rose
copyright = since 2017 by the author
......
......@@ -57,9 +57,9 @@ copyright = u'2017, Carsten Rose'
# built documents.lease
#
# The short X.Y version.
version = '0.23'
version = '0.25'
# The full version, including alpha/beta/rc tags.
release = '0.23.1'
release = '0.25.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
......@@ -36,14 +36,73 @@ Features
Bug Fixes
^^^^^^^^^
Version 0.23.0
Version 0.25.0
--------------
Date: 17.09.2017
Date: 10.10.2017
Notes
^^^^^
* The config.qfq.ini directives DB_USER, DB_NAME, DB_HOST, DB_PASSWORD are replaced by DB_1_USER, DB_1_NAME, DB_1_HOST,
DB_1_PASSWORD. The old directives are still used, as long as the new directives does not exist.
* New config.qfq.ini directives: DB_INDEX_DATA, DB_INDEX_QFQ
Features
^^^^^^^^
* #4720 - Separate database handles for QFQ 'form' and QFQ 'data' - 'Form' might now load/save from forign database/host/user.
Version 0.24.0
--------------
Date: 09.10.2017
Notes
^^^^^
* Change Remove SYSTEM_SECURITY_ABSOLUTE_GET_MAX_LENGTH - makes no sense to hardcode an upper limit.
Features
^^^^^^^^
* Feature Manual.rst: Doc updated for latest subrecord column special names
* Feature AbstractBuildForm.php: new function subrecordHead(). Replaced several hard coded subrecord column names against constants.
* Feature #4456 / formModeGlobal=requiredOff - update Manual.rst
* Feature #4606 / _link: qualifier to render bootstrap button - fix unit tests for tooltip. Add tooltip to button/text, even if there is no link. Implement token 'b:...' for link class. Manual is updated. Open: `pageX` should be recoded to use the new 'b:' instead of hardcoed behaviour to render a button.
* Feature: Upload Button - wrapped with Bootstrap Button. New option 'fileButtonText' to specify a button text.
* Feature #3752 / Pills auf mode|modeSql=hidden|readonly setzen - implemented during 'form load' (not dynamic update)
* Feature: Neu wird nach dem Speichern das Formular nochmal komplett geladen. Das ist wichtig um die durch aftersave geaenderten Records in die Formularelemente zu bekommen.
* Feature #4511 / Form: URL Forward - mode dynamic computed - more generic implementation.
Bug Fixes
^^^^^^^^^
* Bug #4731 / Dynamic Update: load(post) triggers 'check required' - makes no sense during filling a form - fixed
* Bug #4730 / InvalidDate-00-00-2000 FE.type=date - detection of empty date was broken for '00.00.0000'.
* Bug Fixed problem in subrecord when no record is selected.
* Bug #4620 / Easy Fix: saveButtonText / closeButtonText Formatierung
Release
=======
Version 0.23.1
--------------
Date: 23.9.2017
Bug Fixes
^^^^^^^^^
* #4620 / Easy Fix: saveButtonText / closeButtonText Formatierung
Version 0.23.0
--------------
Date: 17.09.2017
Features
^^^^^^^^
......
......@@ -2,10 +2,18 @@
;
; Save this file as: <Documentroot>/typo3conf/config.qfq.ini
DB_USER = <DBUSER>
DB_SERVER = <DBSERVER>
DB_PASSWORD = <DBPW>
DB_NAME = <DB>
DB_1_USER = <DBUSER>
DB_1_SERVER = <DBSERVER>
DB_1_PASSWORD = <DBPW>
DB_1_NAME = <DB>
;DB_2_USER = <DBUSER>
;DB_2_SERVER = <DBSERVER>
;DB_2_PASSWORD = <DBPW>
;DB_2_NAME = <DB>
;DB_INDEX_DATA = 1
;DB_INDEX_QFQ = 1
DB_INIT = set names utf8
......
......@@ -10,6 +10,6 @@ $EM_CONF[$_EXTKEY] = array(
'dependencies' => 'fluid,extbase',
'clearcacheonload' => true,
'state' => 'alpha',
'version' => '0.23.1',
'version' => '0.25.0',
);
......@@ -70,6 +70,13 @@ abstract class AbstractBuildForm {
*/
private $bodytextParser = null;
/**
* @var Array of Database instantiated class
*/
protected $dbArray = array();
protected $dbIndexData = false;
protected $dbIndexQfq = false;
/**
* AbstractBuildForm constructor.
*
......@@ -77,13 +84,16 @@ abstract class AbstractBuildForm {
* @param array $feSpecAction
* @param array $feSpecNative
*/
public function __construct(array $formSpec, array $feSpecAction, array $feSpecNative) {
public function __construct(array $formSpec, array $feSpecAction, array $feSpecNative, array $db) {
$this->formSpec = $formSpec;
$this->feSpecAction = $feSpecAction;
$this->feSpecNative = $feSpecNative;
$this->store = Store::getInstance();
$this->db = new Database();
$this->evaluate = new Evaluate($this->store, $this->db);
$this->dbIndexData = $this->store->getVar(SYSTEM_DB_INDEX_DATA, STORE_SYSTEM);
$this->dbIndexQfq = $this->store->getVar(SYSTEM_DB_INDEX_QFQ, STORE_SYSTEM);
$this->dbArray = $db;
$this->evaluate = new Evaluate($this->store, $this->dbArray[$this->dbIndexData]);
$this->showDebugInfoFlag = Support::findInSet(SYSTEM_SHOW_DEBUG_INFO_YES, $this->store->getVar(SYSTEM_SHOW_DEBUG_INFO, STORE_SYSTEM));
$this->sip = $this->store->getSipInstance();
......@@ -194,7 +204,7 @@ abstract class AbstractBuildForm {
if ($this->formSpec['multiMode'] !== 'none') {
$parentRecords = $this->db->sql($this->formSpec['multiSql']);
$parentRecords = $this->dbArray[$this->dbIndexQfq]->sql($this->formSpec['multiSql']);
foreach ($parentRecords as $row) {
$this->store->setStore($row, STORE_PARENT_RECORD, true);
$jsonTmp = array();
......@@ -354,7 +364,7 @@ abstract class AbstractBuildForm {
$record = array();
if ($recordId != 0) {
$record = $this->db->sql("SELECT * FROM $tableName WHERE id=?", ROW_EXPECT_1, [$recordId], "Record to load not found.");
$record = $this->dbArray[$this->dbIndexData]->sql("SELECT * FROM $tableName WHERE id=?", ROW_EXPECT_1, [$recordId], "Record to load not found.");
}
return OnArray::getMd5($record);
......@@ -438,7 +448,7 @@ abstract class AbstractBuildForm {
*/
public function getEncType() {
$result = $this->db->sql("SELECT id FROM FormElement AS fe WHERE fe.formId=? AND fe.type='upload' LIMIT 1", ROW_REGULAR, [$this->formSpec['id']], 'Look for Formelement.type="upload"');
$result = $this->dbArray[$this->dbIndexQfq]->sql("SELECT id FROM FormElement AS fe WHERE fe.formId=? AND fe.type='upload' LIMIT 1", ROW_REGULAR, [$this->formSpec['id']], 'Look for Formelement.type="upload"');
return (count($result) === 1) ? 'multipart/form-data' : 'application/x-www-form-urlencoded';
......@@ -503,15 +513,13 @@ abstract class AbstractBuildForm {
$storeUseDefault = STORE_USE_DEFAULT, $mode = FORM_LOAD) {
$html = '';
// $html .= $this->buildRecordHashMd5();
// The following 'FormElement.parameter' will never be used during load (fe.type='upload'). FE_PARAMETER has been already expanded.
$skip = [FE_SQL_UPDATE, FE_SQL_INSERT, FE_SQL_DELETE, FE_SQL_AFTER, FE_SQL_BEFORE, FE_PARAMETER];
// get current data record
if ($recordId > 0 && $this->store->getVar('id', STORE_RECORD) === false) {
$tableName = $this->formSpec[F_TABLE_NAME];
$row = $this->db->sql("SELECT * FROM $tableName WHERE id = ?", ROW_EXPECT_1,
$row = $this->dbArray[$this->dbIndexData]->sql("SELECT * FROM $tableName WHERE id = ?", ROW_EXPECT_1,
array($recordId), "Form '" . $this->formSpec[F_NAME] . "' failed to load record '$recordId' from table '" .
$this->formSpec[F_TABLE_NAME] . "'.");
$this->store->setStore($row, STORE_RECORD);
......@@ -2326,6 +2334,33 @@ abstract class AbstractBuildForm {
return $html . $formElement[FE_INPUT_EXTRA_BUTTON_INFO];
}
/**
* @param string $linkNew Complete Button, incl. SIP href
* @param bool $flagDelete Flag to show if there is columns 'delete' rendered.
* @param array $firstRow First row of all subrecords to extract columntitles
* @param array $control Array with <th> column names / format.
*
* @return string
*/
private function subrecordHead($linkNew, $flagDelete, array $firstRow, array &$control) {
$columns = $linkNew;
if (!empty($firstRow)) {
// construct column attributes
$control = $this->getSubrecordColumnControl(array_keys($firstRow));
// Subrecord: Column titles
$columns .= '<th>' . implode('</th><th>', $control[SUBRECORD_COLUMN_TITLE]) . '</th>';
}
if ($flagDelete) {
$columns .= '<th></th>';
}
return Support::wrapTag('<thead><tr>', $columns);
}
/**
* Construct a HTML table of the subrecord data.
* Column syntax
......@@ -2353,7 +2388,7 @@ abstract class AbstractBuildForm {
$primaryRecord = $this->store->getStore(STORE_RECORD);
if (!$this->prepareSubrecod($formElement, $primaryRecord, $rcText, $nameColumnId)) {
if (!$this->prepareSubrecord($formElement, $primaryRecord, $rcText, $nameColumnId)) {
return $rcText;
}
......@@ -2371,23 +2406,9 @@ abstract class AbstractBuildForm {
$linkNew = $flagNew ? Support::wrapTag('<th>', $this->createFormLink($formElement, 0, $primaryRecord, $this->symbol[SYMBOL_NEW], 'New')) : '<th></th>';
}
$columns = $linkNew;
if (isset($formElement[FE_SQL1][0])) {
// construct column attributes
$control = $this->getSubrecordColumnControl(array_keys($formElement[FE_SQL1][0]));
// Subrecord: Column titles
$columns .= '<th>' . implode('</th><th>', $control['title']) . '</th>';
}
if ($flagDelete) {
$columns .= '<th></th>';
}
// Table head
$html = Support::wrapTag('<thead><tr>', $columns);
$firstRow = isset($formElement[FE_SQL1][0]) ? $formElement[FE_SQL1][0] : array();
$htmlHead = $this->subrecordHead($linkNew, $flagDelete, $firstRow, $control);
$htmlBody = '';
foreach ($formElement[FE_SQL1] as $row) {
$rowHtml = '';
......@@ -2401,8 +2422,8 @@ abstract class AbstractBuildForm {
// All columns
foreach ($row as $columnName => $value) {
if (isset($control['title'][$columnName])) {
$rowHtml .= Support::wrapTag('<td>', $this->renderCell($control, $columnName, $value));
if (isset($control[SUBRECORD_COLUMN_TITLE][$columnName])) {
$rowHtml .= Support::wrapTag("<td>", $this->renderCell($control, $columnName, $value));
}
}
......@@ -2417,21 +2438,25 @@ abstract class AbstractBuildForm {
$rowHtml .= Support::wrapTag('<td>', Support::wrapTag("<button type='button' class='record-delete btn btn-default' data-sip='$s' " . Support::doAttribute('title', $toolTip) . ">", '<span class="glyphicon ' . GLYPH_ICON_DELETE . '"></span>'));
}
Support::setIfNotSet($row, FE_SUBRECORD_ROW_CLASS);
$rowClass = 'record ';
$rowClass .= $row[FE_SUBRECORD_ROW_CLASS];
Support::setIfNotSet($row, FE_SUBRECORD_ROW_TITLE);
$rowTitle = $row[FE_SUBRECORD_ROW_TITLE];
Support::setIfNotSet($row, SUBRECORD_COLUMN_ROW_CLASS);
$rowClass = 'record ';
$rowClass .= $row[SUBRECORD_COLUMN_ROW_CLASS];
$rowTooltip = '';
if (isset($row[SUBRECORD_COLUMN_ROW_TOOLTIP])) {
$rowTooltip = $row[SUBRECORD_COLUMN_ROW_TOOLTIP];
} elseif (isset($row[SUBRECORD_COLUMN_ROW_TITLE])) { // backward compatibility
$rowTooltip = $row[SUBRECORD_COLUMN_ROW_TITLE];
}
$rowAttribute = Support::doAttribute('class', $rowClass);
$rowAttribute .= Support::doAttribute('title', $rowTitle);
$html .= Support::wrapTag("<tr $rowAttribute>", $rowHtml, true);
$rowAttribute .= Support::doAttribute('title', $rowTooltip);
$htmlBody .= Support::wrapTag("<tr $rowAttribute>", $rowHtml, true);
}
$attribute = Support::doAttribute('class', $formElement[FE_SUBRECORD_TABLE_CLASS]);
return Support::wrapTag("<table $attribute>", $html, true);
return Support::wrapTag("<table $attribute>", $htmlHead . Support::wrapTag('<tbody>', $htmlBody), true);
}
/**
......@@ -2448,7 +2473,7 @@ abstract class AbstractBuildForm {
* @return bool
* @throws \qfq\UserFormException
*/
private function prepareSubrecod(array $formElement, array $primaryRecord, &$rcText, &$nameColumnId) {
private function prepareSubrecord(array $formElement, array $primaryRecord, &$rcText, &$nameColumnId) {
if (!isset($primaryRecord['id'])) {
$rcText = 'Please save this record first.';
......@@ -2574,7 +2599,7 @@ abstract class AbstractBuildForm {
* @throws DbException
*/
private function getFormTable($formName) {
$row = $this->db->sql("SELECT " . F_TABLE_NAME . " FROM Form AS f WHERE f.name = ?", ROW_EXPECT_0_1, [$formName]);
$row = $this->dbArray[$this->dbIndexQfq]->sql("SELECT " . F_TABLE_NAME . " FROM Form AS f WHERE f.name = ?", ROW_EXPECT_0_1, [$formName]);
if (isset($row[F_TABLE_NAME])) {
return $row[F_TABLE_NAME];
}
......@@ -2610,53 +2635,53 @@ abstract class AbstractBuildForm {
foreach ($titleRaw AS $columnName) {
switch ($columnName) {
case FE_SUBRECORD_ROW_CLASS:
case FE_SUBRECORD_ROW_TITLE:
case SUBRECORD_COLUMN_ROW_CLASS:
case SUBRECORD_COLUMN_ROW_TOOLTIP:
case SUBRECORD_COLUMN_ROW_TITLE: // Backward compatibility
continue 2;
default:
break;
}
$flagWidthLimit = true;
$control['width'][$columnName] = SUBRECORD_COLUMN_WIDTH;
$control[SUBRECORD_COLUMN_MAX_LENGTH][$columnName] = SUBRECORD_COLUMN_DEFAULT_MAX_LENGTH;
// a) 'City@width=40', b) 'Status@icon', c) 'Mailto@width=80@nostrip'
// a) 'City@maxLength=40', b) 'Status@icon', c) 'Mailto@maxLength=80@nostrip'
$arr = KeyValueStringParser::parse($columnName, '=', '|', KVP_IF_VALUE_EMPTY_COPY_KEY);
foreach ($arr as $attribute => $value) {
switch ($attribute) {
case 'width':
case 'nostrip':
case 'title':
case 'link':
case SUBRECORD_COLUMN_MAX_LENGTH:
case SUBRECORD_COLUMN_NO_STRIP:
case SUBRECORD_COLUMN_TITLE:
case SUBRECORD_COLUMN_LINK:
break;
case 'icon':
case 'url':
case 'mailto':
case SUBRECORD_COLUMN_ICON:
case SUBRECORD_COLUMN_URL:
case SUBRECORD_COLUMN_MAILTO:
$flagWidthLimit = false;
break;
default:
$attribute = is_numeric($value) ? 'width' : 'title';
$attribute = is_numeric($value) ? SUBRECORD_COLUMN_MAX_LENGTH : SUBRECORD_COLUMN_TITLE;
break;
}
$control[$attribute][$columnName] = $value;
}
if (!isset($control['title'][$columnName]))
$control['title'][$columnName] = ''; // Fallback: Might be wrong, but better than nothing.
if (!isset($control[SUBRECORD_COLUMN_TITLE][$columnName]))
$control[SUBRECORD_COLUMN_TITLE][$columnName] = ''; // Fallback: Might be wrong, but better than nothing.
// Don't render Columns starting with '_...'.
if (substr($control['title'][$columnName], 0, 1) === '_') {
unset($control['title'][$columnName]); // Do not render column later.
if (substr($control[SUBRECORD_COLUMN_TITLE][$columnName], 0, 1) === '_') {
unset($control[SUBRECORD_COLUMN_TITLE][$columnName]); // Do not render column later.
continue;
}
// Limit title length
$control['title'][$columnName] = substr($control['title'][$columnName], 0, $control['width'][$columnName]);
$control[SUBRECORD_COLUMN_TITLE][$columnName] = mb_substr($control[SUBRECORD_COLUMN_TITLE][$columnName], 0, $control[SUBRECORD_COLUMN_MAX_LENGTH][$columnName]);
if (!$flagWidthLimit) {
$control['width'][$columnName] = false;
$control[SUBRECORD_COLUMN_MAX_LENGTH][$columnName] = false;
}
}
return $control;
......@@ -2684,8 +2709,8 @@ abstract class AbstractBuildForm {
$link = null;
switch ($columnName) {
case FE_SUBRECORD_ROW_CLASS:
case FE_SUBRECORD_ROW_TITLE:
case SUBRECORD_COLUMN_ROW_CLASS:
case SUBRECORD_COLUMN_ROW_TITLE:
return '';
default:
break;
......@@ -2695,32 +2720,31 @@ abstract class AbstractBuildForm {
if (count($arr) == 1) {
$arr[1] = $arr[0];
}
// $cell = isset($control['nostrip'][$columnName]) ? $columnValue : strip_tags($columnValue);
if (isset($control['nostrip'][$columnName])) {
if (isset($control[SUBRECORD_COLUMN_NO_STRIP][$columnName])) {
$cell = $columnValue;
$control['width'][$columnName] = false;
$control[SUBRECORD_COLUMN_MAX_LENGTH][$columnName] = false;
} else {
$cell = strip_tags($columnValue);
}
if ($control['width'][$columnName] !== false && $control['width'][$columnName] != 0) {
$cell = substr($cell, 0, $control['width'][$columnName]);
if ($control[SUBRECORD_COLUMN_MAX_LENGTH][$columnName] !== false && $control[SUBRECORD_COLUMN_MAX_LENGTH][$columnName] != 0) {
$cell = mb_substr($cell, 0, $control[SUBRECORD_COLUMN_MAX_LENGTH][$columnName]);
}
if (isset($control['icon'][$columnName])) {
if (isset($control[SUBRECORD_COLUMN_ICON][$columnName])) {
$cell = ($cell === '') ? '' : "<image src='" . PATH_ICONS . "/$cell'>";
}
if (isset($control['mailto'][$columnName])) {
if (isset($control[SUBRECORD_COLUMN_MAILTO][$columnName])) {
$cell = "<a " . Support::doAttribute('href', "mailto:$arr[0]") . ">$arr[1]</a>";
}
if (isset($control['url'][$columnName])) {
if (isset($control[SUBRECORD_COLUMN_URL][$columnName])) {
$cell = "<a " . Support::doAttribute('href', $arr[0]) . ">$arr[1]</a>";
}
if (isset($control['link'][$columnName])) {
if (isset($control[SUBRECORD_COLUMN_LINK][$columnName])) {
if (!isset($link)) {