From e41e681354b7ae5837c20d9e6b2e38e5f6c4d96a Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 19 Jun 2012 20:27:27 +0000 Subject: [PATCH] Use read-only custom field widgets for history log --- etemplate/js/et2_widget_historylog.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/etemplate/js/et2_widget_historylog.js b/etemplate/js/et2_widget_historylog.js index de2b1fb902..2a4d4cea4e 100644 --- a/etemplate/js/et2_widget_historylog.js +++ b/etemplate/js/et2_widget_historylog.js @@ -182,14 +182,10 @@ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider],{ // Per-field widgets - new value & old value this.fields = {}; - // Custom fields - try to use an existing one - var cf_widget = null + // Custom fields - Need to create one that's all read-only for proper display var labels = {}; - this.getRoot().iterateOver(function(widget) { cf_widget = widget;}, this, et2_customfields_list); - if(cf_widget == null) - { - cf_widget = et2_createWidget('customfields', {}, this); - } + var cf_widget = et2_createWidget('customfields', {'readonly':true}, this); + cf_widget.loadFields(); for(var key in cf_widget.widgets) { // Add label