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(
|
$fields->addFieldsToTab("Root.ContentReview", array(
|
||||||
new HeaderField(_t('ContentReview.REVIEWHEADER', "Content review"), 2),
|
new HeaderField(_t('ContentReview.REVIEWHEADER', "Content review"), 2),
|
||||||
$viewersOptionsField,
|
$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(
|
CompositeField::create(
|
||||||
$userField,
|
$userField,
|
||||||
$groupField,
|
$groupField,
|
||||||
$reviewDate,
|
$reviewDate,
|
||||||
$reviewFrequency
|
$reviewFrequency
|
||||||
)->addExtraClass('custom-settings'),
|
)->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
|
$notesField
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ jQuery(function($) {
|
|||||||
// Constructor: onmatch
|
// Constructor: onmatch
|
||||||
onmatch: function() {
|
onmatch: function() {
|
||||||
var self = this;
|
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);
|
self.show_option(e.target.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -26,8 +26,7 @@ jQuery(function($) {
|
|||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
onunmatch: function() {
|
onunmatch: function() {
|
||||||
this.find('.optionset :input').off('change');
|
return this._super();
|
||||||
this._super();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
show_option: function(value) {
|
show_option: function(value) {
|
||||||
@ -42,15 +41,18 @@ jQuery(function($) {
|
|||||||
|
|
||||||
_custom: function() {
|
_custom: function() {
|
||||||
$('.custom-settings')['show']();
|
$('.custom-settings')['show']();
|
||||||
$('.inherited-settings')['hide']();
|
$('#ROContentOwners')['hide']();
|
||||||
|
$('#RONextReviewDate')['hide']();
|
||||||
},
|
},
|
||||||
_inherited: function() {
|
_inherited: function() {
|
||||||
$('.inherited-settings')['show']();
|
|
||||||
$('.custom-settings')['hide']();
|
$('.custom-settings')['hide']();
|
||||||
|
$('#ROContentOwners')['show']();
|
||||||
|
$('#RONextReviewDate')['show']();
|
||||||
},
|
},
|
||||||
_disabled: function() {
|
_disabled: function() {
|
||||||
$('.inherited-settings')['hide']();
|
|
||||||
$('.custom-settings')['hide']();
|
$('.custom-settings')['hide']();
|
||||||
|
$('#ROContentOwners')['hide']();
|
||||||
|
$('#RONextReviewDate')['hide']();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user