From 7debe9864188d5efb6b6bff1138a66cf07be29a2 Mon Sep 17 00:00:00 2001 From: Julian Seidenberg Date: Tue, 14 Aug 2012 11:44:12 +1200 Subject: [PATCH] BUGFIX: fixing small problem with not setting the expiry off again --- code/DMSDocument.php | 4 ++-- javascript/DMSDocumentCMSFields.js | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/code/DMSDocument.php b/code/DMSDocument.php index 304832f..b9ce618 100644 --- a/code/DMSDocument.php +++ b/code/DMSDocument.php @@ -566,8 +566,8 @@ class DMSDocument extends DataObject implements DMSDocumentInterface { if ($this->Embargo == 3) $this->embargoUntilDate($this->EmbargoedUntilDate, false); } - if (isset($this->Expire)) { - if ($this->Expire == 1) $this->expireAtDate($this->ExpireAtDate, false); + if (isset($this->Expiry)) { + if ($this->Expiry == 1) $this->expireAtDate($this->ExpireAtDate, false); else $this->clearExpiry(false); //clear all previous settings } } diff --git a/javascript/DMSDocumentCMSFields.js b/javascript/DMSDocumentCMSFields.js index 56c9b3c..ce00f75 100644 --- a/javascript/DMSDocumentCMSFields.js +++ b/javascript/DMSDocumentCMSFields.js @@ -82,6 +82,10 @@ //show the replace panel when the page loads $('li[data-panel="embargo"]').click(); + + //set the initial state of the radio button and the associated dropdown hiding + $('#Form_ItemEditForm_Embargo input').change(); + $('#Form_ItemEditForm_Expiry input').change(); } });