Comment 9 for bug 1773417

Jason Boyer (jboyer) wrote :

I think I know why Jason and I are both having issues with adding empty volumes. Jason, do you have any required item stat cats on the server you're testing with? We require one here and I can't get that button to enable for anything. Stepping through the debugger shows that it's (eventually) tripping up on the "if ($scope.forms.myForm && $scope.forms.myForm.$invalid)" test in staff/cat/volcopy/app.js because myForm.$invalid is true. Digging around in the DOM shows that the auto-generated form looks like this: <form novalidate="" class="css-form ng-pristine ng-valid-step ng-invalid ng-invalid-required" name="forms.myForm">

Note the ng-invalid-required class. Digging *way* down into the hidden item form, the select for our required stat cat is in there with a matching set of ng-invalid and ng-invalid-required classes.

So, as far as fixing this, is it easier to somehow completely dump the item form rather than hiding it when only adding items, or add another if (only_add_vols) branch in check_saveable to ignore the form proper and only check the call number label(s)?