diff --git a/app/assets/javascripts/my_modules/protocols.js b/app/assets/javascripts/my_modules/protocols.js index bd04b990f..29a26bdad 100644 --- a/app/assets/javascripts/my_modules/protocols.js +++ b/app/assets/javascripts/my_modules/protocols.js @@ -99,18 +99,15 @@ function initLinkUpdate() { var updateBtn = modal.find(".modal-footer [data-action='submit']"); $("[data-action='unlink'], [data-action='revert'], [data-action='update-parent'], [data-action='update-self']") .on('ajax:success', function(e, data) { - const modalBodyTemplate = (message, warning) => `

${message}

-

${warning || ''}

`; const { title, message, - warning, btn_text: btnText, url } = data; modalTitle.html(title); - modalBody.html(modalBodyTemplate(message, warning)); + modalBody.html(message); updateBtn.text(btnText); modal.attr('data-url', url); modal.modal('show'); diff --git a/app/controllers/protocols_controller.rb b/app/controllers/protocols_controller.rb index c2c7f8074..c5d461dfd 100644 --- a/app/controllers/protocols_controller.rb +++ b/app/controllers/protocols_controller.rb @@ -895,7 +895,6 @@ class ProtocolsController < ApplicationController render json: { title: t('my_modules.protocols.confirm_link_update_modal.revert_title'), message: t('my_modules.protocols.confirm_link_update_modal.revert_message'), - warning: t('my_modules.protocols.confirm_link_update_modal.revert_warning'), btn_text: t('my_modules.protocols.confirm_link_update_modal.revert_btn_text'), url: revert_protocol_path(@protocol) } diff --git a/config/locales/en.yml b/config/locales/en.yml index 7e081b0de..4ae4aed27 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1078,8 +1078,7 @@ en: unlink_warning: "Are you sure?" unlink_btn_text: "Yes, unlink it" revert_title: "Revert protocol template" - revert_message: "This will override any changes you made. We can’t recover them once you revert." - revert_warning: "Are you sure?" + revert_message: "This will override any changes you made. We can’t recover them once you revert.

Are you sure?" revert_btn_text: "Yes, revert it" update_parent_title: "Update templates version" update_parent_message: "Are you sure you want to update the templates protocol with this version? This will override any other changes made in the templates version."