mirror of
https://github.com/silverstripe/silverstripe-contentreview
synced 2024-10-22 17:05:47 +02:00
Seems like 3.1.1 doesnt like multiple togglefields in the same tab..
This commit is contained in:
parent
09586b4b12
commit
c904ec1a15
@ -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
|
||||
));
|
||||
}
|
||||
|
@ -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']();
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user