diff --git a/client/galaxy/scripts/mvc/tool/tool-form-composite.js b/client/galaxy/scripts/mvc/tool/tool-form-composite.js index 4db7cda1d8c..35207943334 100644 --- a/client/galaxy/scripts/mvc/tool/tool-form-composite.js +++ b/client/galaxy/scripts/mvc/tool/tool-form-composite.js @@ -314,24 +314,28 @@ var View = Backbone.View.extend({ /** Render job caching option */ _renderUseCachedJob: function() { - this.job_options_form = new Form({ - cls: "ui-portlet-narrow", - title: "Job re-use Options", - inputs: [ - { - type: "conditional", - name: "use_cached_job", - test_param: { - name: "check", - label: "BETA: Attempt to reuse jobs with identical parameters?", - type: "boolean", - value: "false", - help: "This may skip executing jobs that you have already run." - }, - } - ] - }); - this._append(this.$steps, this.job_options_form.$el); + var extra_user_preferences = JSON.parse(Galaxy.user.attributes.preferences.extra_user_preferences); + var use_cached_job = 'use_cached_job|use_cached_job_checkbox' in extra_user_preferences ? extra_user_preferences['use_cached_job|use_cached_job_checkbox'] : false ; + if (use_cached_job === 'true'){ + this.job_options_form = new Form({ + cls: "ui-portlet-narrow", + title: "Job re-use Options", + inputs: [ + { + type: "conditional", + name: "use_cached_job", + test_param: { + name: "check", + label: "BETA: Attempt to reuse jobs with identical parameters?", + type: "boolean", + value: "false", + help: "This may skip executing jobs that you have already run." + }, + } + ] + }); + this._append(this.$steps, this.job_options_form.$el); + } }, /** Render step */ diff --git a/client/galaxy/scripts/mvc/tool/tool-form.js b/client/galaxy/scripts/mvc/tool/tool-form.js index c035bebf270..ed42d5b2d7b 100644 --- a/client/galaxy/scripts/mvc/tool/tool-form.js +++ b/client/galaxy/scripts/mvc/tool/tool-form.js @@ -149,17 +149,21 @@ var View = Backbone.View.extend({ }); } - // Job Re-use Options - options.inputs.push({ - label: "BETA: Attempt to re-use jobs with identical parameters ?", - help: "This may skip executing jobs that you have already run", - name: "use_cached_job", - type: "select", - display: "radio", - ignore: "__ignore__", - value: "__ignore__", - options: [["No", false], ["Yes", true]], - }); + // Job Re-use Options + var extra_user_preferences = JSON.parse(Galaxy.user.attributes.preferences.extra_user_preferences); + var use_cached_job = 'use_cached_job|use_cached_job_checkbox' in extra_user_preferences ? extra_user_preferences['use_cached_job|use_cached_job_checkbox'] : false ; + if (use_cached_job === 'true'){ + options.inputs.push({ + label: "BETA: Attempt to re-use jobs with identical parameters ?", + help: "This may skip executing jobs that you have already run", + name: "use_cached_job", + type: "select", + display: "radio", + ignore: "__ignore__", + value: "__ignore__", + options: [["No", false], ["Yes", true]], + }); + } }, /** Submit a regular job.