projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #15510 from civicrm/5.19
[civicrm-core.git]
/
CRM
/
Core
/
I18n
/
Form.php
diff --git
a/CRM/Core/I18n/Form.php
b/CRM/Core/I18n/Form.php
index 7c191c75f868d5c7e1e685631f3b408a4b3fae96..dd7aa9bd31dccdc8147002b54a9d8cca10e28df5 100644
(file)
--- a/
CRM/Core/I18n/Form.php
+++ b/
CRM/Core/I18n/Form.php
@@
-33,6
+33,7
@@
*
*/
class CRM_Core_I18n_Form extends CRM_Core_Form {
*
*/
class CRM_Core_I18n_Form extends CRM_Core_Form {
+
public function buildQuickForm() {
$config = CRM_Core_Config::singleton();
$tsLocale = CRM_Core_I18n::getLocale();
public function buildQuickForm() {
$config = CRM_Core_Config::singleton();
$tsLocale = CRM_Core_I18n::getLocale();
@@
-51,7
+52,7
@@
class CRM_Core_I18n_Form extends CRM_Core_Form {
$this->addElement('hidden', 'field', $field);
$this->addElement('hidden', 'id', $id);
$this->addElement('hidden', 'field', $field);
$this->addElement('hidden', 'id', $id);
- $cols =
array()
;
+ $cols =
[]
;
foreach ($this->_locales as $locale) {
$cols[] = "{$field}_{$locale} {$locale}";
}
foreach ($this->_locales as $locale) {
$cols[] = "{$field}_{$locale} {$locale}";
}
@@
-66,7
+67,7
@@
class CRM_Core_I18n_Form extends CRM_Core_Form {
$widget = $widgets[$table][$field];
// attributes
$widget = $widgets[$table][$field];
// attributes
- $attributes =
array('class' => '')
;
+ $attributes =
['class' => '']
;
if (isset($widget['rows'])) {
$attributes['rows'] = $widget['rows'];
}
if (isset($widget['rows'])) {
$attributes['rows'] = $widget['rows'];
}
@@
-77,7
+78,10
@@
class CRM_Core_I18n_Form extends CRM_Core_Form {
if ($widget['type'] == 'RichTextEditor') {
$widget['type'] = 'wysiwyg';
if ($widget['type'] == 'RichTextEditor') {
$widget['type'] = 'wysiwyg';
- $attributes['class'] .= ' collapsed';
+ $attributes['class'] = 'collapsed';
+ }
+ elseif ($widget['type'] == 'Text') {
+ $attributes['class'] = 'huge';
}
$languages = CRM_Core_I18n::languages(TRUE);
}
$languages = CRM_Core_I18n::languages(TRUE);
@@
-123,12
+127,12
@@
class CRM_Core_I18n_Form extends CRM_Core_Form {
CRM_Core_Error::fatal("$table.$field is not internationalized.");
}
CRM_Core_Error::fatal("$table.$field is not internationalized.");
}
- $cols =
array()
;
- $params =
array(array($values['id'], 'Int'))
;
+ $cols =
[]
;
+ $params =
[[$values['id'], 'Int']]
;
$i = 1;
foreach ($this->_locales as $locale) {
$cols[] = "{$field}_{$locale} = %$i";
$i = 1;
foreach ($this->_locales as $locale) {
$cols[] = "{$field}_{$locale} = %$i";
- $params[$i] =
array($values["{$field}_{$locale}"], 'String')
;
+ $params[$i] =
[$values["{$field}_{$locale}"], 'String']
;
$i++;
}
$query = "UPDATE $table SET " . implode(', ', $cols) . " WHERE id = %0";
$i++;
}
$query = "UPDATE $table SET " . implode(', ', $cols) . " WHERE id = %0";