Merge branch 'master' into 3177-collection-choose-files
[arvados.git] / apps / workbench / app / assets / javascripts / select_modal.js
index 36c145fc02e48fa95d7b6ab3523a97f8ca956485..d84037763c77b8a33e0478511c0e92c4f8e84170 100644 (file)
@@ -35,8 +35,14 @@ $(document).on('click', '.selectable', function() {
             });
     }
 }).on('click', '.persistent-selection', function() {
+    var checked_status = this.checked;
     var $modal = $(this).closest('.modal');
     $checked_selections = $modal.find('.persistent-selection:checked');
+
+    if (checked_status && ($checked_selections.length > 1)) {
+      $(this).prop('checked', false);
+    }
+
     any = ($checked_selections.length > 0);
     $(this).
         closest('.modal').