From fbc717c1431759a98f3d72f3fa383923a309cb60 Mon Sep 17 00:00:00 2001 From: Pedro Teixido Rovira Date: Mon, 27 Nov 2017 14:22:39 +0100 Subject: [PATCH] Fixes the behavior of the version radio button of the form to upload new versions of a file --- app/views/dmsf_files/_file_new_revision.html.erb | 2 +- app/views/dmsf_files/show.html.erb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/dmsf_files/_file_new_revision.html.erb b/app/views/dmsf_files/_file_new_revision.html.erb index b1a44be8..2e1da8e1 100644 --- a/app/views/dmsf_files/_file_new_revision.html.erb +++ b/app/views/dmsf_files/_file_new_revision.html.erb @@ -75,7 +75,7 @@

-
+

<%= label_tag('file_upload', l(:label_new_content)) %> <%= render :partial => 'dmsf_upload/form', diff --git a/app/views/dmsf_files/show.html.erb b/app/views/dmsf_files/show.html.erb index 9dd32195..72868ed1 100644 --- a/app/views/dmsf_files/show.html.erb +++ b/app/views/dmsf_files/show.html.erb @@ -192,11 +192,11 @@ } }); - $('#file_upload').change(function() { + $('#file_upload_box').change(function() { if($("input[name='version']:checked").val() == '0') { - $('#fileMinorVersionRadio').prop('checked', true); + $('#version_1').prop('checked', true); } - $('#fileSameVersionRadio').prop('disabled', true); + $('#version_0').prop('disabled', true); }); $('#newRevisionFormContentToggle').click(function() {