From: Coleman Watts Date: Sat, 1 Nov 2014 19:36:19 +0000 (-0400) Subject: crm.multilingual.js code comment cleanup X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f6516cfe153d4d460d4f96a18326dae1b05e6a5f;p=civicrm-core.git crm.multilingual.js code comment cleanup --- 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'); });