+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015 |
+ | Copyright CiviCRM LLC (c) 2004-2016 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2015
+ * @copyright CiviCRM LLC (c) 2004-2016
* $Id$
*
*/
$date .= ($element->getAttribute('timeformat')) ? " $time" : '';
$el['html'] = $date . '<input type="hidden" value="' . $element->getValue() . '" name="' . $element->getAttribute('name') . '">';
}
-
- $el['html'] = '<span class="crm-frozen-field">' . $el['html'] . '</span>';
+ if ($el['name'] == 'details') {
+ $el['html'] = str_replace('<br />', '', $el['html']);
+ $el['html'] = '<span class="crm-frozen-field">' . html_entity_decode($el['html']) . '</span>';
+ }
+ else {
+ $el['html'] = '<span class="crm-frozen-field">' . $el['html'] . '</span>';
+ }
}
// Active form elements
else {
elseif (strpos($class, 'crm-form-contact-reference') !== FALSE) {
self::preprocessContactReference($element);
}
+ // Hack to support html5 fields (number, url, etc)
+ else {
+ foreach (CRM_Core_Form::$html5Types as $type) {
+ if (strpos($class, "crm-form-$type") !== FALSE) {
+ $element->setAttribute('type', $type);
+ // Also add the "base" class for consistent styling
+ $class .= ' crm-form-text';
+ break;
+ }
+ }
+ }
if ($required) {
$class .= ' required';
* @param HTML_QuickForm_element $field
*/
public function renderFrozenEntityRef(&$el, $field) {
- $entity = $field->getAttribute('data-api-entity');
+ $entity = strtolower($field->getAttribute('data-api-entity'));
$vals = json_decode($field->getAttribute('data-entity-value'), TRUE);
$display = array();