From f6516cfe153d4d460d4f96a18326dae1b05e6a5f Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 1 Nov 2014 15:36:19 -0400 Subject: [PATCH] crm.multilingual.js code comment cleanup --- js/crm.multilingual.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/crm.multilingual.js b/js/crm.multilingual.js index 4de9929f0e..ced31483b7 100644 --- a/js/crm.multilingual.js +++ b/js/crm.multilingual.js @@ -1,8 +1,9 @@ // http://civicrm.org/licensing // JS needed for multilingual installations CRM.$(function($) { - // This is largely redundant with what the CRM.popup function would do, - // with the difference that this loads unconditionally regardless of ajaxPopupsEnabled setting + // This is partially redundant with what the CRM.popup function would do, + // with a small amount of added functionality, + // and the difference that this loads unconditionally regardless of ajaxPopupsEnabled setting $('body').on('click', 'a.crm-multilingual-edit-button', function(e) { var $el = $(this), $form = $el.closest('form'), @@ -11,10 +12,12 @@ CRM.$(function($) { CRM.loadForm($el.attr('href'), { dialog: {width: '50%', height: '50%'} }) + // Sync the primary language field with what the user has entered on the main form .on('crmFormLoad', function() { $('.default-lang', this).val($field.val()); }) .on('crmFormSubmit', function() { + // Sync the primary language field with what the user has entered in the popup $field.val($('.default-lang', this).val()); $el.trigger('crmPopupFormSuccess'); }); -- 2.25.1