Commit 2d041db4 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Add text 'Created/Modified' to tooltop of save button.

parent d358d051
Pipeline #1245 passed with stage
in 1 minute and 36 seconds
......@@ -315,9 +315,20 @@ class BuildFormBootstrap extends AbstractBuildForm {
// Button: Save
if (Support::findInSet(FORM_BUTTON_SAVE, $this->formSpec[F_SHOW_BUTTON]) && $this->formSpec[F_SUBMIT_BUTTON_TEXT] === '') {
$toolTip = $this->formSpec[F_SAVE_BUTTON_TOOLTIP];
if ($toolTip == 'Save') {
if ($recordId == 0) {
$toolTip .= PHP_EOL . 'Create new record';
} else {
$toolTip .= PHP_EOL . 'Record id: ' . $recordId;
$toolTip .= PHP_EOL . 'Created: ' . $this->store->getVar('created', STORE_RECORD . STORE_EMPTY);;
$toolTip .= PHP_EOL . 'Modified: ' . $this->store->getVar('modified', STORE_RECORD . STORE_EMPTY);;
}
}
// In debugMode every button link should show the information behind the SIP.
if ($this->showDebugInfoFlag) {
$toolTip .= PHP_EOL . "table = '" . $this->formSpec[F_TABLE_NAME] . "'" . PHP_EOL . "r = '" . $recordId . "'";
$toolTip .= PHP_EOL . "Table: " . $this->formSpec[F_TABLE_NAME];
}
$buttonSave = $this->buildButtonCode('save-button', $this->formSpec[F_SAVE_BUTTON_TEXT], $toolTip,
......@@ -440,7 +451,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
* @throws UserFormException
* @throws UserReportException
*/
private function buildPillNavigation($mode = FORM_LOAD, array $pillArray, array &$json) {
private function buildPillNavigation($mode , array $pillArray, array &$json) {
$pillButton = '';
$pillDropdown = '';
$htmlDropdown = '';
......@@ -517,7 +528,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
}
$attributeLi .= Support::doAttribute(HTML_ATTR_ID, $htmlIdLi);
$attributeLi .= Support::doAttribute( 'title', $formElement[FE_TOOLTIP]);
$attributeLi .= Support::doAttribute('title', $formElement[FE_TOOLTIP]);
$attributeLiA .= Support::doAttribute(HTML_ATTR_ID, $htmlIdLiA);
$a = Support::wrapTag("<a $attributeLiA" . Support::doAttribute('href', $hrefTarget) . ">", $formElement[FE_LABEL]);
$json[$htmlFormElementName][API_ELEMENT_UPDATE][$htmlIdLiA][API_ELEMENT_CONTENT] = $formElement[FE_LABEL];
......
......@@ -307,7 +307,7 @@ class Config {
F_CLASS_BODY => 'qfq-color-grey-2',
F_SAVE_BUTTON_TEXT => '',
F_SAVE_BUTTON_TOOLTIP => 'Save',
F_SAVE_BUTTON_TOOLTIP => '',
F_SAVE_BUTTON_CLASS => 'btn btn-default navbar-btn',
F_SAVE_BUTTON_GLYPH_ICON => GLYPH_ICON_CHECK,
......
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