In reports, show old label name as the default in the Alter Display Header -prompt
authorPasi Kallinen <pasi.kallinen@pttk.fi>
Mon, 15 Jul 2013 08:01:28 +0000 (11:01 +0300)
committerBen Shum <bshum@biblio.org>
Thu, 26 Sep 2013 01:47:14 +0000 (21:47 -0400)
Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/web/reports/xul/template-config.js

index ddc81e8..e936880 100644 (file)
@@ -200,7 +200,8 @@ function alterColumnLabel () {
        var field = item.firstChild.firstChild;
        var colname = field.nextSibling.getAttribute('label');
 
-       var new_label = prompt( dojo.string.substitute(rpt_strings.TEMPLATE_CONF_PROMPT_CHANGE, [field.getAttribute("label")]) );
+       var old_label = field.getAttribute("label");
+       var new_label = prompt( dojo.string.substitute(rpt_strings.TEMPLATE_CONF_PROMPT_CHANGE, [old_label]), old_label );
 
        if (new_label) {
                rpt_rel_cache[relation_alias].fields[tabname][colname].alias = new_label;