[open-ils-commits] r20383 - branches/rel_2_1/Open-ILS/web/js/ui/default/actor/user (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue May 3 11:06:40 EDT 2011
Author: miker
Date: 2011-05-03 11:06:37 -0400 (Tue, 03 May 2011)
New Revision: 20383
Modified:
branches/rel_2_1/Open-ILS/web/js/ui/default/actor/user/register.js
Log:
Followup patch to the first listed in https://bugs.launchpad.net/evergreen/+bug/745123
Modified: branches/rel_2_1/Open-ILS/web/js/ui/default/actor/user/register.js
===================================================================
--- branches/rel_2_1/Open-ILS/web/js/ui/default/actor/user/register.js 2011-05-03 15:03:59 UTC (rev 20382)
+++ branches/rel_2_1/Open-ILS/web/js/ui/default/actor/user/register.js 2011-05-03 15:06:37 UTC (rev 20383)
@@ -652,13 +652,16 @@
// draw surveys
for(var idx in surveys) {
var survey = surveys[idx];
+ var required = openils.Util.isTrue(survey.required());
var srow = surveyTemplate.cloneNode(true);
+ if(required) srow.setAttribute('required','required');
tbody.appendChild(srow);
getByName(srow, 'name').innerHTML = survey.name();
for(var q in survey.questions()) {
var quest = survey.questions()[q];
var qrow = surveyQuestionTemplate.cloneNode(true);
+ if(required) qrow.setAttribute('required','required');
tbody.appendChild(qrow);
getByName(qrow, 'question').innerHTML = quest.question();
@@ -666,7 +669,7 @@
var store = new dojo.data.ItemFileReadStore(
{data:fieldmapper.asva.toStoreData(quest.answers())});
var select = new dijit.form.FilteringSelect({store:store,scrollOnFocus:false}, span);
- if (! openils.Util.isTrue(survey.required())) {
+ if (! required ) {
select.isValid = function() { return true; };
}
select.labelAttr = 'answer';
More information about the open-ils-commits
mailing list