[open-ils-commits] r17022 - trunk/Open-ILS/web/js/ui/default/actor/user (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jul 23 11:57:53 EDT 2010
Author: phasefx
Date: 2010-07-23 11:57:51 -0400 (Fri, 23 Jul 2010)
New Revision: 17022
Modified:
trunk/Open-ILS/web/js/ui/default/actor/user/register.js
Log:
support printing of stat cats and surveys from patron editor
Modified: trunk/Open-ILS/web/js/ui/default/actor/user/register.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/actor/user/register.js 2010-07-23 14:36:34 UTC (rev 17021)
+++ trunk/Open-ILS/web/js/ui/default/actor/user/register.js 2010-07-23 15:57:51 UTC (rev 17022)
@@ -1279,7 +1279,28 @@
for (var idx in widgetPile) {
var w = widgetPile[idx];
var val = uEditWidgetVal(w);
- var label = w.idlField.label;
+ var label;
+ if (typeof w.idlField == 'undefined') {
+ label = w._wtype;
+ if (w._wtype == 'statcat') {
+ var stat = statCats.filter(
+ function(m){
+ return (m.id() == w._statcat) })[0];
+ label = stat.name();
+ } else if (w._wtype == 'survey') {
+ var survey = surveys.filter(
+ function(m){
+ return (m.id() == w._survey) })[0];
+ var question = survey.questions().filter(
+ function(m){
+ return (m.id() == w._question) })[0];
+ label = survey.name() + ' : ' + question.question();
+ } else {
+ label = 'FIXME';
+ }
+ } else {
+ label = w.idlField.label;
+ }
if (temp != w._wtype) {
temp = w._wtype;
s += '-------\r\n';
More information about the open-ils-commits
mailing list