Seems like 3.1.1 doesnt like multiple togglefields in the same tab..

This commit is contained in:
Stig Lindqvist 2014-02-27 13:51:13 +13:00
parent 09586b4b12
commit c904ec1a15
2 changed files with 10 additions and 10 deletions

View File

@ -312,16 +312,14 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
$fields->addFieldsToTab("Root.ContentReview", array(
new HeaderField(_t('ContentReview.REVIEWHEADER', "Content review"), 2),
$viewersOptionsField,
CompositeField::create(
ReadonlyField::create('ROContentOwners', _t('ContentReview.CONTENTOWNERS', 'Content Owners'), $this->getOwnerNames()),
ReadonlyField::create('RONextReviewDate', _t("ContentReview.NEXTREVIEWDATE", "Next review date"), $this->owner->NextReviewDate)
)->addExtraClass('inherited-settings'),
CompositeField::create(
$userField,
$groupField,
$reviewDate,
$reviewFrequency
)->addExtraClass('custom-settings'),
ReadonlyField::create('ROContentOwners', _t('ContentReview.CONTENTOWNERS', 'Content Owners'), $this->getOwnerNames()),
ReadonlyField::create('RONextReviewDate', _t("ContentReview.NEXTREVIEWDATE", "Next review date"), $this->owner->NextReviewDate),
$notesField
));
}

View File

@ -16,7 +16,7 @@ jQuery(function($) {
// Constructor: onmatch
onmatch: function() {
var self = this;
this.find('.optionset :input').on('change', function(e) {
this.find('.optionset :input').bind('change', function(e) {
self.show_option(e.target.value);
});
@ -26,8 +26,7 @@ jQuery(function($) {
this._super();
},
onunmatch: function() {
this.find('.optionset :input').off('change');
this._super();
return this._super();
},
show_option: function(value) {
@ -42,15 +41,18 @@ jQuery(function($) {
_custom: function() {
$('.custom-settings')['show']();
$('.inherited-settings')['hide']();
$('#ROContentOwners')['hide']();
$('#RONextReviewDate')['hide']();
},
_inherited: function() {
$('.inherited-settings')['show']();
$('.custom-settings')['hide']();
$('#ROContentOwners')['show']();
$('#RONextReviewDate')['show']();
},
_disabled: function() {
$('.inherited-settings')['hide']();
$('.custom-settings')['hide']();
$('#ROContentOwners')['hide']();
$('#RONextReviewDate')['hide']();
}
});