From 0464c4a15d18727f8d4c609361321a5755362e87 Mon Sep 17 00:00:00 2001 From: enricsinergia <57436616+enricsinergia@users.noreply.github.com> Date: Thu, 19 Dec 2024 09:18:49 +0100 Subject: [PATCH] =?UTF-8?q?Hotfix=20-=20Personas=20y=20Organizaciones=20-?= =?UTF-8?q?=20Condici=C3=B3n=20para=20aviso=20cuando=20email=20masivo=20(#?= =?UTF-8?q?504)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/javascript/EmailsComposeViewModal.js | 2 +- .../src_files/include/javascript/EmailsComposeViewModal.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/javascript/EmailsComposeViewModal.js b/include/javascript/EmailsComposeViewModal.js index e648fa98c1b..530ccbbd98c 100755 --- a/include/javascript/EmailsComposeViewModal.js +++ b/include/javascript/EmailsComposeViewModal.js @@ -36,7 +36,7 @@ * reasonably feasible for technical reasons, the Appropriate Legal Notices must * display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM". */(function($){$.fn.EmailsComposeViewModal=function(options){"use strict";var self=this;var opts=$.extend({},$.fn.EmailsComposeViewModal.defaults,options);self.handleClick=function(e){"use strict";var self=this;self.emailComposeView=null;var opts=$.extend({},$.fn.EmailsComposeViewModal.defaults);var composeBox=$('
').appendTo(opts.contentSelector);composeBox.messageBox({"showHeader":false,"showFooter":false,"size":'lg'});composeBox.setBody('
');composeBox.show();$.ajax({type:"GET",cache:false,url:'index.php?module=Emails&action=ComposeView&in_popup=1'}).done(function(data){if(data.length===0){console.error("Unable to display ComposeView");composeBox.setBody(SUGAR.language.translate('','ERR_AJAX_LOAD'));return;} -composeBox.setBody(data);self.emailComposeView=composeBox.controls.modal.body.find('.compose-view').EmailsComposeView();$(self.emailComposeView).on('sentEmail',function(event,composeView){composeBox.hide();composeBox.remove();});$(self.emailComposeView).on('disregardDraft',function(event,composeView){if(typeof messageBox!=="undefined"){var mb=messageBox({size:'lg'});mb.setTitle(SUGAR.language.translate('','LBL_CONFIRM_DISREGARD_DRAFT_TITLE'));mb.setBody(SUGAR.language.translate('','LBL_CONFIRM_DISREGARD_DRAFT_BODY'));mb.on('ok',function(){mb.remove();composeBox.hide();composeBox.remove();});mb.on('cancel',function(){mb.remove();});mb.show();}else{if(confirm(self.translatedErrorMessage)){composeBox.hide();composeBox.remove();}}});composeBox.on('cancel',function(){composeBox.remove();});composeBox.on('hide.bs.modal',function(){composeBox.remove();});$("#emails_email_templates_name").change(function(){$.fn.EmailsComposeView.onTemplateChange()});}).fail(function(data){composeBox.controls.modal.content.html(SUGAR.language.translate('','LBL_EMAIL_ERROR_GENERAL_TITLE'));});return $(self);};self.construct=function(){"use strict";$(opts.buttonSelector).click(self.handleClick)};self.destruct=function(){};self.construct();return $(self);};$.fn.openComposeViewModal=function(source){"use strict";window.event.preventDefault();window.event.stopImmediatePropagation();if($("[name='select_entire_list']").val()==1){alert(SUGAR.language.get('app_strings','LBL_EMAIL_SENDING_ALERT_CURRENT_PAGE'));} +composeBox.setBody(data);self.emailComposeView=composeBox.controls.modal.body.find('.compose-view').EmailsComposeView();$(self.emailComposeView).on('sentEmail',function(event,composeView){composeBox.hide();composeBox.remove();});$(self.emailComposeView).on('disregardDraft',function(event,composeView){if(typeof messageBox!=="undefined"){var mb=messageBox({size:'lg'});mb.setTitle(SUGAR.language.translate('','LBL_CONFIRM_DISREGARD_DRAFT_TITLE'));mb.setBody(SUGAR.language.translate('','LBL_CONFIRM_DISREGARD_DRAFT_BODY'));mb.on('ok',function(){mb.remove();composeBox.hide();composeBox.remove();});mb.on('cancel',function(){mb.remove();});mb.show();}else{if(confirm(self.translatedErrorMessage)){composeBox.hide();composeBox.remove();}}});composeBox.on('cancel',function(){composeBox.remove();});composeBox.on('hide.bs.modal',function(){composeBox.remove();});$("#emails_email_templates_name").change(function(){$.fn.EmailsComposeView.onTemplateChange()});}).fail(function(data){composeBox.controls.modal.content.html(SUGAR.language.translate('','LBL_EMAIL_ERROR_GENERAL_TITLE'));});return $(self);};self.construct=function(){"use strict";$(opts.buttonSelector).click(self.handleClick)};self.destruct=function(){};self.construct();return $(self);};$.fn.openComposeViewModal=function(source){"use strict";window.event.preventDefault();window.event.stopImmediatePropagation();if(document.MassUpdate.select_entire_list.value==1){alert(SUGAR.language.get('app_strings','LBL_EMAIL_SENDING_ALERT_CURRENT_PAGE'));} var self=this;self.emailComposeView=null;var opts=$.extend({},$.fn.EmailsComposeViewModal.defaults);var composeBox=$('
').appendTo(opts.contentSelector);composeBox.messageBox({"showHeader":false,"showFooter":false,"size":'lg'});composeBox.setBody('
');composeBox.show();var relatedId=$('[name="record"]').val();var ids='&ids=';if($(source).attr('data-record-id')!==''){ids=ids+$(source).attr('data-record-id');relatedId=$(source).attr('data-record-id');} else{var inputs=document.MassUpdate.elements;for(var i=0;i