webstaff: improve truthiness test of bre.deleted in marc editor
authorMike Rylander <mrylander@gmail.com>
Mon, 16 Jan 2017 21:21:31 +0000 (16:21 -0500)
committerKathy Lussier <klussier@masslnc.org>
Sat, 18 Feb 2017 18:31:31 +0000 (13:31 -0500)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/staff/cat/share/t_marcedit.tt2

index fd2e133..d7ed391 100644 (file)
@@ -42,8 +42,8 @@
           <button class="btn btn-primary" ng-click="saveRecord()">{{ saveLabel || "[% l('Save') %]"}}</button>
         </span>
         <span class="btn-group">
-          <button ng-hide="brandNewRecord || embedded || Record().deleted()" class="btn btn-default" ng-click="deleteRecord()">[% l('Delete') %]</button>
-          <button ng-if="!brandNewRecord && Record().deleted()" class="btn btn-default" ng-click="undeleteRecord()">[% l('Undelete') %]</button>
+          <button ng-hide="brandNewRecord || embedded || Record().deleted() == 't'" class="btn btn-default" ng-click="deleteRecord()">[% l('Delete') %]</button>
+          <button ng-hide="brandNewRecord || Record().deleted() != 't'" class="btn btn-default" ng-click="undeleteRecord()">[% l('Undelete') %]</button>
         </span>
         <span class="btn-group">
           <button class="btn btn-default" ng-click="showHelp = !showHelp">[% l('Help') %]</button>