diff --git a/code/extensions/SiteTreeContentReview.php b/code/extensions/SiteTreeContentReview.php index c327879..25e2a68 100644 --- a/code/extensions/SiteTreeContentReview.php +++ b/code/extensions/SiteTreeContentReview.php @@ -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 )); } diff --git a/javascript/contentreview.js b/javascript/contentreview.js index a655c5d..a7eab90 100644 --- a/javascript/contentreview.js +++ b/javascript/contentreview.js @@ -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'](); } });