Merge branch '4.3' into 4.4

This commit is contained in:
Robbie Averill 2017-08-22 10:39:05 +12:00
commit c5d8bcf5cf

View File

@ -2,35 +2,32 @@
* Email recipient behaviour. * Email recipient behaviour.
*/ */
(function ($) { (function($) {
$(document).ready(function () { $.entwine('ss', function($) {
var recipient = {
// Some fields are only visible when HTML email are being sent.
updateFormatSpecificFields: function () {
var sendPlainChecked = $('input[name="SendPlain"]').is(':checked');
var sendPlain = $('input[name="SendPlain"]'); $('.field.toggle-html-only')[sendPlainChecked ? 'hide' : 'show']();
var recipient = { $('.field.toggle-plain-only')[sendPlainChecked ? 'show' : 'hide']();
// Some fields are only visible when HTML email are being sent. }
updateFormatSpecificFields: function () { };
var sendPlainChecked = sendPlain.is(':checked');
$(".field.toggle-html-only")[sendPlainChecked ? 'hide' : 'show'](); $('#Form_ItemEditForm .EmailRecipientForm').entwine({
$(".field.toggle-plain-only")[sendPlainChecked ? 'show' : 'hide'](); onmatch: function () {
} recipient.updateFormatSpecificFields();
}; },
$.entwine('udf.recipient', function ($) { onunmatch: function () {
$('#Form_ItemEditForm').entwine({ this._super();
onmatch: function () { }
recipient.updateFormatSpecificFields(); });
},
onunmatch: function () {
this._super();
}
});
sendPlain.entwine({ $('#Form_ItemEditForm .EmailRecipientForm input[name="SendPlain"]').entwine({
onchange: function () { onchange: function () {
recipient.updateFormatSpecificFields(); recipient.updateFormatSpecificFields();
} }
}); });
}); });
});
}(jQuery)); }(jQuery));