From 5b8080ad04b0b6344b63a82e6a90b51fe7e9b69e Mon Sep 17 00:00:00 2001 From: Tim Mallezie Date: Thu, 9 Apr 2015 22:47:29 +0200 Subject: [PATCH] Add size to schema, add size support in addfield --- CRM/Contact/Form/Edit/Notes.php | 2 +- CRM/Core/Form.php | 1 + xml/schema/Core/Note.xml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CRM/Contact/Form/Edit/Notes.php b/CRM/Contact/Form/Edit/Notes.php index db31ca5dee..93c5733771 100644 --- a/CRM/Contact/Form/Edit/Notes.php +++ b/CRM/Contact/Form/Edit/Notes.php @@ -42,7 +42,7 @@ class CRM_Contact_Form_Edit_Notes { */ public static function buildQuickForm(&$form) { $form->applyFilter('__ALL__', 'trim'); - $form->addField('subject', array('entity' => 'note', 'size' => 60, 'maxlength' => 254)); + $form->addField('subject', array('entity' => 'note', 'size' => '60')); $form->addField('note', array('entity' => 'note', 'rows' => 3)); } diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index d6a0120412..fe18c2dbee 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -1243,6 +1243,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page { case 'Text': case 'Link': //TODO: Autodetect ranges + $props['size'] = isset($props['size']) ? $props['size'] : 60; $this->add('text', $name, $label, $props, $required); break; diff --git a/xml/schema/Core/Note.xml b/xml/schema/Core/Note.xml index 302aa4c9a0..c71cd3f8da 100644 --- a/xml/schema/Core/Note.xml +++ b/xml/schema/Core/Note.xml @@ -91,6 +91,7 @@ subject of note description Text + 60 1.5 -- 2.25.1