diff --git a/templates/webapps/galaxy/workflow/build_from_current_history.mako b/templates/webapps/galaxy/workflow/build_from_current_history.mako
index 208c2715a3f..03d1731d4c8 100644
--- a/templates/webapps/galaxy/workflow/build_from_current_history.mako
+++ b/templates/webapps/galaxy/workflow/build_from_current_history.mako
@@ -33,10 +33,12 @@
$(function() {
$("#checkall").click( function() {
$("input[type=checkbox]").attr( 'checked', true );
+ $(".as-named-input").prop( 'disabled', false );
return false;
}).show();
$("#uncheckall").click( function() {
$("input[type=checkbox]").attr( 'checked', false );
+ $(".as-named-input").prop( 'disabled', true );
return false;
}).show();
});
@@ -62,7 +64,8 @@
%if disabled:
+ name="${data.history_content_type}_ids" value="${data.hid}" checked="true"
+ onclick="document.getElementById('as-named-input-${ encoded_id }').disabled = !document.getElementById('as-input-${ encoded_id }').checked" />