diff --git a/app/assets/javascripts/samples/sample_datatable.js.erb b/app/assets/javascripts/samples/sample_datatable.js.erb
index ba911e63e..857ef7367 100644
--- a/app/assets/javascripts/samples/sample_datatable.js.erb
+++ b/app/assets/javascripts/samples/sample_datatable.js.erb
@@ -751,17 +751,10 @@ function createTdElement(content) {
* @return {Object} select dropdown
*/
function createSampleTypeSelect(data, selected) {
- selected = _.isUndefined(selected) ? 1 : selected + 1;
var $selectType = $('')
.attr('name', 'sample_type_id').addClass('show-tick');
- var sampleTypesLink = $('#samples').attr('data-sample-types-link');
-
- var $option = $("")
- .attr('value', -2)
- .text(I18n.t('samples.table.add_sample_type'));
- $selectType.append($option);
$option = $('')
.attr('value', -1).text(I18n.t('samples.table.no_type'))
$selectType.append($option);
@@ -781,16 +774,10 @@ function createSampleTypeSelect(data, selected) {
* @param selected Selected sample group id
*/
function createSampleGroupSelect(data, selected) {
- selected = _.isUndefined(selected) ? 1 : selected + 1;
var $selectGroup = $('')
.attr('name', 'sample_group_id').addClass('show-tick');
- var sampleGroupsLink = $('#samples').attr('data-sample-groups-link');
-
- var $option = $("")
- .text(I18n.t('samples.table.add_sample_group'));
- $selectGroup.append($option);
$option = $('')
.attr('value', -1).text(I18n.t('samples.table.no_group'))
.attr('data-icon', 'glyphicon glyphicon-asterisk');
diff --git a/app/views/shared/_samples.html.erb b/app/views/shared/_samples.html.erb
index 9ebb0b329..095a34ed0 100644
--- a/app/views/shared/_samples.html.erb
+++ b/app/views/shared/_samples.html.erb
@@ -128,16 +128,7 @@
data-source="<%= @samples_index_link %>"
data-num-columns="<%= num_of_columns %>"
data-new-sample="<%= new_organization_sample_path(organization_id: @organization) %>"
- data-create-sample="<%= organization_samples_path(organization_id: @organization) %>"
- data-sample-types-link="<%= organization_sample_types_path(@organization,
- project_id: (@project.id if @project),
- my_module_id: (@my_module.id if @my_module),
- experiment_id: (@experiment.id if @experiment)) %>"
- data-sample-groups-link="<%= organization_sample_groups_path(current_organization,
- project_id: (@project.id if @project),
- my_module_id: (@my_module.id if @my_module),
- experiment_id: (@experiment.id if @experiment)) %>"
- >
+ data-create-sample="<%= organization_samples_path(organization_id: @organization) %>">
|