mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-04 14:44:26 +08:00
Use I18n [SCI-7910]
This commit is contained in:
parent
b99d9c485c
commit
66edffe53a
3 changed files with 2 additions and 7 deletions
|
@ -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) => `<p class="message">${message}</p>
|
||||
<p class="message">${warning || ''}</p>`;
|
||||
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');
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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.<br /><br /><strong>Are you sure?</strong>"
|
||||
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."
|
||||
|
|
Loading…
Reference in a new issue