X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FI18n%2FForm.php;h=d3ec10b599c9e96b60c5ca68a941630600d5700a;hb=ca5cec6777523a6f37f356378a73f7ce65928eb2;hp=7c191c75f868d5c7e1e685631f3b408a4b3fae96;hpb=a48554e4573dccc22fe68c481db7ba85d1768c81;p=civicrm-core.git diff --git a/CRM/Core/I18n/Form.php b/CRM/Core/I18n/Form.php index 7c191c75f8..d3ec10b599 100644 --- a/CRM/Core/I18n/Form.php +++ b/CRM/Core/I18n/Form.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 5 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2019 | + | Copyright CiviCRM LLC (c) 2004-2020 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -28,11 +28,12 @@ /** * * @package CRM - * @copyright CiviCRM LLC (c) 2004-2019 + * @copyright CiviCRM LLC https://civicrm.org/licensing * $Id$ * */ class CRM_Core_I18n_Form extends CRM_Core_Form { + 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); - $cols = array(); + $cols = []; 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 - $attributes = array('class' => ''); + $attributes = ['class' => '']; 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'; - $attributes['class'] .= ' collapsed'; + $attributes['class'] = 'collapsed'; + } + elseif ($widget['type'] == 'Text') { + $attributes['class'] = 'huge'; } $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."); } - $cols = array(); - $params = array(array($values['id'], 'Int')); + $cols = []; + $params = [[$values['id'], 'Int']]; $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";