Commit 61d75fbb authored by Carsten  Rose's avatar Carsten Rose
Browse files

#3568 / Form: fuer alle Buttons (save, close, new, delete) eine optionale...

#3568 / Form: fuer alle Buttons (save, close, new, delete) eine optionale class & text konfigurierbar machen
Manual.rst: new configuration options listed at config.qfq.ini and Form.paramtert.
Config.php: Defaults configured for F_SAVE|CLOSE|DELETE|NEW_BUTTON_TEXT|TOOLTIP|CLASS|GLYPH_ICON.
BuildFormBootstrap.php: Changed code to take values from config.qfq.ini or (if given) from form.parameter definitions.
QuickFormQuery.php: Copy new setup values from config.qfq.ini to Form.
StoreTest.php: update unit test for new global configuration values
config.qfq.example.ini: fill with new commented key/value pairs.
parent f1786d0b
......@@ -301,7 +301,26 @@ config.qfq.ini
+-----------------------------+-------------------------------------------------+----------------------------------------------------------------------------+
|GFX_EXTRA_BUTTON_INFO_BELOW | <img src="info.png"> | Image for `extraButtonInfo`_ (below) |
+-----------------------------+-------------------------------------------------+----------------------------------------------------------------------------+
| SAVE_BUTTON_TEXT | SAVE_BUTTON_TEXT = | Default text on the form save button. Typically none. |
| SAVE_BUTTON_TOOLTIP | SAVE_BUTTON_TOOLTIP = save | Default tooltip on the form save button. |
| SAVE_BUTTON_CLASS | SAVE_BUTTON_CLASS = btn btn-default navbar-btn | Default Bootstrap CSS class for buttons on top of the form |
| SAVE_BUTTON_GLYPH_ICON | SAVE_BUTTON_GLYPH_ICON = glyphicon-ok | Default Icon for the form save button |
+-----------------------------+-------------------------------------------------+----------------------------------------------------------------------------+
| CLOSE_BUTTON_TEXT | CLOSE_BUTTON_TEXT = | Default text on the form close button. Typically none. |
| CLOSE_BUTTON_TOOLTIP | CLOSE_BUTTON_TOOLTIP = close | Default tooltip on the form close button. |
| CLOSE_BUTTON_CLASS | CLOSE_BUTTON_CLASS = btn btn-default navbar-btn | Default Bootstrap CSS class for buttons on top of the form |
| CLOSE_BUTTON_GLYPH_ICON | CLOSE_BUTTON_GLYPH_ICON = glyphicon-remove | Default Icon for the form close button |
+-----------------------------+-------------------------------------------------+----------------------------------------------------------------------------+
| DELETE_BUTTON_TEXT | DELETE_BUTTON_TEXT = | Default text on the form delete button. Typically none. |
| DELETE_BUTTON_TOOLTIP | DELETE_BUTTON_TOOLTIP = delete | Default tooltip on the form delete button. |
| DELETE_BUTTON_CLASS | DELETE_BUTTON_CLASS = btn btn-default navbar-btn| Default Bootstrap CSS class for buttons on top of the form |
| DELETE_BUTTON_GLYPH_ICON | DELETE_BUTTON_GLYPH_ICON = glyphicon-trash | Default Icon for the form delete button |
+-----------------------------+-------------------------------------------------+----------------------------------------------------------------------------+
| NEW_BUTTON_TEXT | NEW_BUTTON_TEXT = | Default text on the form new button. Typically none. |
| NEW_BUTTON_TOOLTIP | NEW_BUTTON_TOOLTIP = new | Default tooltip on the form new button. |
| NEW_BUTTON_CLASS | NEW_BUTTON_CLASS = btn btn-default navbar-btn | Default Bootstrap CSS class for buttons on top of the form |
| NEW_BUTTON_GLYPH_ICON | NEW_BUTTON_GLYPH_ICON = glyphicon-plus | Default Icon for the form new button |
+-----------------------------+-------------------------------------------------+----------------------------------------------------------------------------+
Example: *typo3conf/config.qfq.ini*
......@@ -344,6 +363,26 @@ Example: *typo3conf/config.qfq.ini*
; SECURITY_SHOW_MESSAGE=true
; SECURITY_GET_MAX_LENGTH=50
;SAVE_BUTTON_TEXT =
;SAVE_BUTTON_TOOLTIP = save
;SAVE_BUTTON_CLASS = btn btn-default navbar-btn
;SAVE_BUTTON_GLYPH_ICON = glyphicon-ok
;CLOSE_BUTTON_TEXT =
;CLOSE_BUTTON_TOOLTIP = close
;CLOSE_BUTTON_CLASS = btn btn-default navbar-btn
;CLOSE_BUTTON_GLYPH_ICON = glyphicon-remove
;DELETE_BUTTON_TEXT =
;DELETE_BUTTON_TOOLTIP = delete
;DELETE_BUTTON_CLASS = btn btn-default navbar-btn
;DELETE_BUTTON_GLYPH_ICON = glyphicon-trash
;NEW_BUTTON_TEXT =
;NEW_BUTTON_TOOLTIP = new
;NEW_BUTTON_CLASS = btn btn-default navbar-btn
;NEW_BUTTON_GLYPH_ICON = glyphicon-plus
..
It's also possible to setup custom variables in `config.qfq.ini`.
......@@ -1501,7 +1540,38 @@ parameter
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| saveButtonActive | - | Make the 'save'-button active on *Form* load (instead of waiting for the first user change) |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| saveButtonText | string | Overwrite default from config.qfq.ini: SAVE_BUTTON_TEXT |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| saveButtonTooltip | string | Overwrite default from config.qfq.ini: SAVE_BUTTON_TOOLTIP |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| saveButtonClass | string | Overwrite default from config.qfq.ini: SAVE_BUTTON_CLASS |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| saveButtonGlyphIcon | string | Overwrite default from config.qfq.ini: SAVE_BUTTON_GLYPH_ICON |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| closeButtonText | string | Overwrite default from config.qfq.ini: CLOSE_BUTTON_TEXT |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| closeButtonTooltip | string | Overwrite default from config.qfq.ini: CLOSE_BUTTON_TOOLTIP |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| closeButtonClass | string | Overwrite default from config.qfq.ini: CLOSE_BUTTON_CLASS |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| closeButtonGlyphIcon | string | Overwrite default from config.qfq.ini: CLOSE_BUTTON_GLYPH_ICON |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| deleteButtonText | string | Overwrite default from config.qfq.ini: DELETE_BUTTON_TEXT |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| deleteButtonTooltip | string | Overwrite default from config.qfq.ini: DELETE_BUTTON_TOOLTIP |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| deleteButtonClass | string | Overwrite default from config.qfq.ini: DELETE_BUTTON_CLASS |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| deleteButtonGlyphIcon | string | Overwrite default from config.qfq.ini: DELETE_BUTTON_GLYPH_ICON |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| newButtonText | string | Overwrite default from config.qfq.ini: NEW_BUTTON_TEXT |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| newButtonTooltip | string | Overwrite default from config.qfq.ini: NEW_BUTTON_TOOLTIP |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| newButtonClass | string | Overwrite default from config.qfq.ini: NEW_BUTTON_CLASS |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| newButtonGlyphIcon | string | Overwrite default from config.qfq.ini: NEW_BUTTON_GLYPH_ICON |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
* Example:
......
......@@ -67,3 +67,22 @@ WKHTMLTOPDF = /opt/wkhtmltox/bin/wkhtmltopdf
;SECURITY_SHOW_MESSAGE=true
;SECURITY_GET_MAX_LENGTH=50
;SAVE_BUTTON_TEXT =
;SAVE_BUTTON_TOOLTIP = save
;SAVE_BUTTON_CLASS = btn btn-default navbar-btn
;SAVE_BUTTON_GLYPH_ICON = glyphicon-ok
;CLOSE_BUTTON_TEXT =
;CLOSE_BUTTON_TOOLTIP = close
;CLOSE_BUTTON_CLASS = btn btn-default navbar-btn
;CLOSE_BUTTON_GLYPH_ICON = glyphicon-remove
;DELETE_BUTTON_TEXT =
;DELETE_BUTTON_TOOLTIP = delete
;DELETE_BUTTON_CLASS = btn btn-default navbar-btn
;DELETE_BUTTON_GLYPH_ICON = glyphicon-trash
;NEW_BUTTON_TEXT =
;NEW_BUTTON_TOOLTIP = new
;NEW_BUTTON_CLASS = btn btn-default navbar-btn
;NEW_BUTTON_GLYPH_ICON = glyphicon-plus
......@@ -183,8 +183,8 @@ class BuildFormBootstrap extends AbstractBuildForm {
$toolTip = "View current form with r=0" . PHP_EOL . PHP_EOL . OnArray::toString($queryStringArray, ' = ', PHP_EOL, "'");
}
return $this->buildButtonAnchor('form-view-' . $this->formSpec[F_ID], $url, $toolTip, GLYPH_ICON_VIEW, $status);
return $this->buildButtonAnchor($url, 'form-view-' . $this->formSpec[F_ID], '', $toolTip, GLYPH_ICON_VIEW, $status, 'btn btn-default navbar-btn');
}
// glyphicon glyphicon-eye-open
......@@ -203,7 +203,6 @@ class BuildFormBootstrap extends AbstractBuildForm {
$buttonEditForm = '';
$recordId = $this->store->getVar(SIP_RECORD_ID, STORE_SIP);
// Button: FormEdit
if ($this->showDebugInfoFlag) {
$toolTip = "Edit form" . PHP_EOL . PHP_EOL . OnArray::toString($this->store->getStore(STORE_SIP), ' = ', PHP_EOL, "'");
......@@ -211,45 +210,47 @@ class BuildFormBootstrap extends AbstractBuildForm {
$buttonEditForm = $this->buildViewForm() .
$this->buildShowEditFormElementCheckbox() .
$this->buildButtonAnchor('form-edit-button', $url, $toolTip, GLYPH_ICON_TOOL);
$this->buildButtonAnchor($url, 'form-edit-button', '', $toolTip, GLYPH_ICON_TOOL, '', 'btn btn-default navbar-btn');
}
// Button: Save
if (Support::findInSet(FORM_BUTTON_SAVE, $this->formSpec[F_SHOW_BUTTON]) && $this->formSpec[F_SUBMIT_BUTTON_TEXT] === '') {
$toolTip = 'Save';
$toolTip = $this->formSpec[F_SAVE_BUTTON_TOOLTIP];
// 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 . "'";
}
$buttonSave = $this->buildButtonCode('save-button', $toolTip, GLYPH_ICON_CHECK, '', $this->formSpec[F_BUTTON_ON_CHANGE_CLASS]);
$buttonSave = $this->buildButtonCode('save-button', $this->formSpec[F_SAVE_BUTTON_TEXT], $toolTip,
$this->formSpec[F_SAVE_BUTTON_GLYPH_ICON], '', $this->formSpec[F_BUTTON_ON_CHANGE_CLASS], $this->formSpec[F_SAVE_BUTTON_CLASS]);
}
// Button: Close
if (Support::findInSet(FORM_BUTTON_CLOSE, $this->formSpec[F_SHOW_BUTTON])) {
$toolTip = 'Close';
$buttonClose = $this->buildButtonCode('close-button', 'Close', GLYPH_ICON_CLOSE);
$buttonClose = $this->buildButtonCode('close-button', $this->formSpec[F_CLOSE_BUTTON_TEXT],
$this->formSpec[F_CLOSE_BUTTON_TOOLTIP],
$this->formSpec[F_CLOSE_BUTTON_GLYPH_ICON], '', '', $this->formSpec[F_CLOSE_BUTTON_CLASS]);
}
// Button: Delete
if (Support::findInSet(FORM_BUTTON_DELETE, $this->formSpec[F_SHOW_BUTTON])) {
$toolTip = 'Delete';
$toolTip = $this->formSpec[F_DELETE_BUTTON_TOOLTIP];
if ($this->showDebugInfoFlag && $recordId > 0) {
$toolTip .= PHP_EOL . "form = '" . $this->formSpec[F_FINAL_DELETE_FORM] . "'" . PHP_EOL . "r = '" . $recordId . "'";
}
$disabled = ($recordId > 0) ? '' : 'disabled';
$buttonDelete = $this->buildButtonCode('delete-button', $toolTip, GLYPH_ICON_DELETE, $disabled);
$buttonDelete = $this->buildButtonCode('delete-button', $this->formSpec[F_DELETE_BUTTON_TEXT], $toolTip,
$this->formSpec[F_DELETE_BUTTON_GLYPH_ICON], $disabled, '', $this->formSpec[F_DELETE_BUTTON_CLASS]);
}
// Button: New
if (Support::findInSet(FORM_BUTTON_NEW, $this->formSpec[F_SHOW_BUTTON])) {
$toolTip = 'New';
$url = $this->deriveNewRecordUrlFromExistingSip($toolTip);
$buttonNew = $this->buildButtonAnchor('form-new-button', $url, $toolTip, GLYPH_ICON_NEW);
$buttonNew = $this->buildButtonAnchor($url, 'form-new-button', $this->formSpec[F_NEW_BUTTON_TEXT],
$this->formSpec[F_NEW_BUTTON_TOOLTIP], $this->formSpec[F_NEW_BUTTON_GLYPH_ICON], '', $this->formSpec[F_NEW_BUTTON_CLASS]);
}
// Arrangement: Edit Form / Save / Close / Delete / New
......@@ -266,48 +267,56 @@ class BuildFormBootstrap extends AbstractBuildForm {
}
/**
* Generic function to create a button with a given id, $url, $title, $icon (=glyph), $disabled
* @param string $id
* Generic function to create a button with a given $buttonHtmlId, $url, $title, $icon (=glyph), $disabled
*
* @param string $url
* @param string $title
* @param string $buttonHtmlId
* @param string $text
* @param string $toolTip
* @param string $icon
* @param string $disabled
* @param string $class
* @return string
*/
private function buildButtonAnchor($id, $url, $title, $icon, $disabled = '') {
$icon = Support::wrapTag("<span " . Support::doAttribute('class', "glyphicon $icon") . ">", '');
private function buildButtonAnchor($url, $buttonHtmlId, $text, $toolTip, $icon, $disabled = '', $class = '') {
if ($icon === '') {
$element = $text;
} else {
$element = Support::wrapTag("<span " . Support::doAttribute('class', "glyphicon $icon") . ">", $text);
}
$attribute = Support::doAttribute('href', $url);
$attribute .= Support::doAttribute('id', $id);
$attribute .= Support::doAttribute('class', "btn btn-default navbar-btn $disabled");
$attribute .= Support::doAttribute('title', $title);
$attribute .= Support::doAttribute('id', $buttonHtmlId);
$attribute .= Support::doAttribute('class', "$class $disabled");
$attribute .= Support::doAttribute('title', $toolTip);
return Support::wrapTag("<a $attribute>", $icon);
return Support::wrapTag("<a $attribute>", $element);
}
/**
* Creates a button with the given attributes. If there is no $icon given, render the button without glyph.
*
* @param string $id
* @param string $title
* @param string $buttonHtmlId
* @param string $text
* @param string $tooltip
* @param string $icon
* @param string $disabled
* @return string
*/
private function buildButtonCode($id, $title, $icon, $disabled = '', $buttonOnChangeClass = '') {
$element = "<span class='glyphicon $icon'></span>";
$classAdd = "navbar-btn";
private function buildButtonCode($buttonHtmlId, $text, $tooltip, $icon, $disabled = '', $buttonOnChangeClass = '', $class = '') {
if ($icon === '') {
$element = $title;
$classAdd = '';
$element = $text;
} else {
$element = "<span class='glyphicon $icon'>$text</span>";
}
$class = Support::doAttribute('class', ["btn btn-default", $classAdd]);
$class = Support::doAttribute('class', $class);
$dataClassOnChange = Support::doAttribute('data-class-on-change', $buttonOnChangeClass);
$title = Support::doAttribute('title', $title);
return "<button id='$id' type='button' $class $dataClassOnChange $title $disabled>$element</button>";
$tooltip = Support::doAttribute('title', $tooltip);
return "<button id='$buttonHtmlId' type='button' $class $dataClassOnChange $tooltip $disabled>$element</button>";
}
/**
......@@ -417,7 +426,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
$buttonText = $this->formSpec[F_SUBMIT_BUTTON_TEXT];
$htmlElement = $this->buildButtonCode('save-button', $buttonText, '', '', $this->formSpec[F_BUTTON_ON_CHANGE_CLASS]);
$htmlElement = $this->buildButtonCode('save-button', '', $buttonText, '', '', $this->formSpec[F_BUTTON_ON_CHANGE_CLASS]);
$html .= $this->wrapItem(WRAP_SETUP_LABEL, '');
$html .= $this->wrapItem(WRAP_SETUP_INPUT, $htmlElement);
......
......@@ -382,6 +382,26 @@ const SYSTEM_SECURITY_GET_MAX_LENGTH = 'SECURITY_GET_MAX_LENGTH'; // Trim every
const SYSTEM_GFX_EXTRA_BUTTON_INFO_INLINE = 'GFX_EXTRA_BUTTON_INFO_INLINE';
const SYSTEM_GFX_EXTRA_BUTTON_INFO_BELOW = 'GFX_EXTRA_BUTTON_INFO_BELOW';
const SYSTEM_SAVE_BUTTON_TEXT = 'SAVE_BUTTON_TEXT';
const SYSTEM_SAVE_BUTTON_TOOLTIP = 'SAVE_BUTTON_TOOLTIP';
const SYSTEM_SAVE_BUTTON_CLASS = 'SAVE_BUTTON_CLASS';
const SYSTEM_SAVE_BUTTON_GLYPH_ICON = 'SAVE_BUTTON_GLYPH_ICON';
const SYSTEM_CLOSE_BUTTON_TEXT = 'CLOSE_BUTTON_TEXT';
const SYSTEM_CLOSE_BUTTON_TOOLTIP = 'CLOSE_BUTTON_TOOLTIP';
const SYSTEM_CLOSE_BUTTON_CLASS = 'CLOSE_BUTTON_CLASS';
const SYSTEM_CLOSE_BUTTON_GLYPH_ICON = 'CLOSE_BUTTON_GLYPH_ICON';
const SYSTEM_DELETE_BUTTON_TEXT = 'DELETE_BUTTON_TEXT';
const SYSTEM_DELETE_BUTTON_TOOLTIP = 'DELETE_BUTTON_TOOLTIP';
const SYSTEM_DELETE_BUTTON_CLASS = 'DELETE_BUTTON_CLASS';
const SYSTEM_DELETE_BUTTON_GLYPH_ICON = 'DELETE_BUTTON_GLYPH_ICON';
const SYSTEM_NEW_BUTTON_TEXT = 'NEW_BUTTON_TEXT';
const SYSTEM_NEW_BUTTON_TOOLTIP = 'NEW_BUTTON_TOOLTIP';
const SYSTEM_NEW_BUTTON_CLASS = 'NEW_BUTTON_CLASS';
const SYSTEM_NEW_BUTTON_GLYPH_ICON = 'NEW_BUTTON_GLYPH_ICON';
const GET_EXTRA_LENGTH_TOKEN = '_';
// Not stored in config.qfq.ini, but used in STORE_SYSTEM
......@@ -603,7 +623,7 @@ const GLYPH_ICON_TASKS = 'glyphicon-tasks';
const GLYPH_ICON_VIEW = 'glyphicon-eye-open';
const GLYPH_ICON_FILE = 'glyphicon-file';
// FORM
// FORM columns: real
const F_ID = 'id';
const F_NAME = 'name';
const F_TITLE = 'title';
......@@ -637,6 +657,7 @@ const F_FE_DATA_ERROR = 'data-error';
const F_PARAMETER = 'parameter'; // valid for F_ and FE_
// Form columns: via parameter field
const F_LDAP_SERVER = 'ldapServer';
const F_LDAP_BASE_DN = 'ldapBaseDn';
const F_LDAP_SEARCH = 'ldapSearch';
......@@ -657,6 +678,26 @@ const F_MODE_READONLY = 'readonly';
const F_SAVE_BUTTON_ACTIVE = 'saveButtonActive';
const F_SAVE_BUTTON_TEXT = 'saveButtonText';
const F_SAVE_BUTTON_TOOLTIP = 'saveButtonTooltip';
const F_SAVE_BUTTON_CLASS = 'saveButtonClass';
const F_SAVE_BUTTON_GLYPH_ICON = 'saveButtonGlyphIcon';
const F_CLOSE_BUTTON_TEXT = 'closeButtonText';
const F_CLOSE_BUTTON_TOOLTIP = 'closeButtonTooltip';
const F_CLOSE_BUTTON_CLASS = 'closeButtonClass';
const F_CLOSE_BUTTON_GLYPH_ICON = 'closeButtonGlyphIcon';
const F_DELETE_BUTTON_TEXT = 'deleteButtonText';
const F_DELETE_BUTTON_TOOLTIP = 'deleteButtonTooltip';
const F_DELETE_BUTTON_CLASS = 'deleteButtonClass';
const F_DELETE_BUTTON_GLYPH_ICON = 'deleteButtonGlyphIcon';
const F_NEW_BUTTON_TEXT = 'newButtonText';
const F_NEW_BUTTON_TOOLTIP = 'newButtonTooltip';
const F_NEW_BUTTON_CLASS = 'newButtonClass';
const F_NEW_BUTTON_GLYPH_ICON = 'newButtonGlyphIcon';
// FORM_ELEMENT_STATI
const FE_MODE_SHOW = 'show';
const FE_MODE_READONLY = 'readonly';
......
......@@ -661,6 +661,26 @@ class QuickFormQuery {
F_CLASS_BODY,
F_BUTTON_ON_CHANGE_CLASS,
F_ESCAPE_TYPE_DEFAULT,
F_SAVE_BUTTON_TEXT,
F_SAVE_BUTTON_TOOLTIP,
F_SAVE_BUTTON_CLASS,
F_SAVE_BUTTON_GLYPH_ICON,
F_CLOSE_BUTTON_TEXT,
F_CLOSE_BUTTON_TOOLTIP,
F_CLOSE_BUTTON_CLASS,
F_CLOSE_BUTTON_GLYPH_ICON,
F_DELETE_BUTTON_TEXT,
F_DELETE_BUTTON_TOOLTIP,
F_DELETE_BUTTON_CLASS,
F_DELETE_BUTTON_GLYPH_ICON,
F_NEW_BUTTON_TEXT,
F_NEW_BUTTON_TOOLTIP,
F_NEW_BUTTON_CLASS,
F_NEW_BUTTON_GLYPH_ICON,
];
// By definition: existing vars which are empty, means: EMPTY - do not use any default!
......
......@@ -129,6 +129,27 @@ class Config {
Support::setIfNotSet($config, F_BS_NOTE_COLUMNS, '3');
Support::setIfNotSet($config, F_CLASS_PILL, 'qfq-color-grey-1');
Support::setIfNotSet($config, F_CLASS_BODY, 'qfq-color-grey-2');
Support::setIfNotSet($config, F_SAVE_BUTTON_TEXT, '');
Support::setIfNotSet($config, F_SAVE_BUTTON_TOOLTIP, 'Save');
Support::setIfNotSet($config, F_SAVE_BUTTON_CLASS, 'btn btn-default navbar-btn');
Support::setIfNotSet($config, F_SAVE_BUTTON_GLYPH_ICON, GLYPH_ICON_CHECK);
Support::setIfNotSet($config, F_CLOSE_BUTTON_TEXT, '');
Support::setIfNotSet($config, F_CLOSE_BUTTON_TOOLTIP, 'Close');
Support::setIfNotSet($config, F_CLOSE_BUTTON_CLASS, 'btn btn-default navbar-btn');
Support::setIfNotSet($config, F_CLOSE_BUTTON_GLYPH_ICON, GLYPH_ICON_CLOSE);
Support::setIfNotSet($config, F_DELETE_BUTTON_TEXT, '');
Support::setIfNotSet($config, F_DELETE_BUTTON_TOOLTIP, 'Delete');
Support::setIfNotSet($config, F_DELETE_BUTTON_CLASS, 'btn btn-default navbar-btn');
Support::setIfNotSet($config, F_DELETE_BUTTON_GLYPH_ICON, GLYPH_ICON_DELETE);
Support::setIfNotSet($config, F_NEW_BUTTON_TEXT, '');
Support::setIfNotSet($config, F_NEW_BUTTON_TOOLTIP, 'New');
Support::setIfNotSet($config, F_NEW_BUTTON_CLASS, 'btn btn-default navbar-btn');
Support::setIfNotSet($config, F_NEW_BUTTON_GLYPH_ICON, GLYPH_ICON_NEW);
Support::setIfNotSet($config, F_BUTTON_ON_CHANGE_CLASS, 'btn-info alert-info');
Support::setIfNotSet($config, SYSTEM_EDIT_FORM_PAGE, 'form');
Support::setIfNotSet($config, SYSTEM_SECURITY_VARS_HONEYPOT, 'email,username,password');
......@@ -165,6 +186,27 @@ class Config {
[SYSTEM_CSS_CLASS_QFQ_FORM_BODY, F_CLASS_BODY],
[SYSTEM_FORM_BUTTON_ON_CHANGE_CLASS, F_BUTTON_ON_CHANGE_CLASS],
[SYSTEM_ESCAPE_TYPE_DEFAULT, F_ESCAPE_TYPE_DEFAULT],
[SYSTEM_SAVE_BUTTON_TEXT, F_SAVE_BUTTON_TEXT],
[SYSTEM_SAVE_BUTTON_TOOLTIP, F_SAVE_BUTTON_TOOLTIP],
[SYSTEM_SAVE_BUTTON_CLASS, F_SAVE_BUTTON_CLASS],
[SYSTEM_SAVE_BUTTON_GLYPH_ICON, F_SAVE_BUTTON_GLYPH_ICON],
[SYSTEM_CLOSE_BUTTON_TEXT, F_CLOSE_BUTTON_TEXT],
[SYSTEM_CLOSE_BUTTON_TOOLTIP, F_CLOSE_BUTTON_TOOLTIP],
[SYSTEM_CLOSE_BUTTON_CLASS, F_CLOSE_BUTTON_CLASS],
[SYSTEM_CLOSE_BUTTON_GLYPH_ICON, F_CLOSE_BUTTON_GLYPH_ICON],
[SYSTEM_DELETE_BUTTON_TEXT, F_DELETE_BUTTON_TEXT],
[SYSTEM_DELETE_BUTTON_TOOLTIP, F_DELETE_BUTTON_TOOLTIP],
[SYSTEM_DELETE_BUTTON_CLASS, F_DELETE_BUTTON_CLASS],
[SYSTEM_DELETE_BUTTON_GLYPH_ICON, F_DELETE_BUTTON_GLYPH_ICON],
[SYSTEM_NEW_BUTTON_TEXT, F_NEW_BUTTON_TEXT],
[SYSTEM_NEW_BUTTON_TOOLTIP, F_NEW_BUTTON_TOOLTIP],
[SYSTEM_NEW_BUTTON_CLASS, F_NEW_BUTTON_CLASS],
[SYSTEM_NEW_BUTTON_GLYPH_ICON, F_NEW_BUTTON_GLYPH_ICON],
];
foreach ($setting as $row) {
......
......@@ -237,6 +237,27 @@ EOT;
F_BS_NOTE_COLUMNS => '3',
F_CLASS_PILL => 'qfq-color-grey-1',
F_CLASS_BODY => 'qfq-color-grey-2',
F_SAVE_BUTTON_TEXT => '',
F_SAVE_BUTTON_TOOLTIP => 'Save',
F_SAVE_BUTTON_CLASS => 'btn btn-default navbar-btn',
F_SAVE_BUTTON_GLYPH_ICON => 'glyphicon-ok',
F_CLOSE_BUTTON_TEXT => '',
F_CLOSE_BUTTON_TOOLTIP => 'Close',
F_CLOSE_BUTTON_CLASS => 'btn btn-default navbar-btn',
F_CLOSE_BUTTON_GLYPH_ICON => 'glyphicon-remove',
F_DELETE_BUTTON_TEXT => '',
F_DELETE_BUTTON_TOOLTIP => 'Delete',
F_DELETE_BUTTON_CLASS => 'btn btn-default navbar-btn',
F_DELETE_BUTTON_GLYPH_ICON => 'glyphicon-trash',
F_NEW_BUTTON_TEXT => '',
F_NEW_BUTTON_TOOLTIP => 'New',
F_NEW_BUTTON_CLASS => 'btn btn-default navbar-btn',
F_NEW_BUTTON_GLYPH_ICON => 'glyphicon-plus',
F_BUTTON_ON_CHANGE_CLASS => 'btn-info alert-info',
SYSTEM_EDIT_FORM_PAGE => 'form',
SYSTEM_SECURITY_VARS_HONEYPOT => 'email,username,password',
......
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