Verified Commit bcbacb61 authored by Prosper De Laure's avatar Prosper De Laure Committed by Alexis Ragot
Browse files

Access rule and retention rule start date modification ergonomy

parent 123da0dc
......@@ -102,8 +102,11 @@ trait archiveModificationTrait
}
// Update current object for caller
if ($retentionRule->retentionStartDate === '') {
if ($retentionRule->resetStartDate) {
$retentionRule->retentionStartDate = null;
} elseif (!$retentionRule->retentionStartDate) {
$retentionRule->retentionStartDate = $archive->retentionStartDate;
}
if ($retentionRule->retentionDuration === '') {
......@@ -171,6 +174,14 @@ trait archiveModificationTrait
} else {
$accessRule->archiveId = $archiveId;
if ($accessRule->resetStartDate) {
$accessRule->accessRuleStartDate = null;
} elseif (!$accessRule->accessRuleStartDate) {
$accessRule->accessRuleStartDate = $archive->accessRuleStartDate;
}
$accessRule->accessRuleComDate = null;
if ($accessRule->accessRuleDuration != null && $accessRule->accessRuleStartDate != null) {
$accessRule->accessRuleComDate = $this->calculateDate($accessRule->accessRuleStartDate, $accessRule->accessRuleDuration);
}
......
......@@ -70,4 +70,11 @@ class archiveAccessRule
*/
public $accessRuleComDate;
/**
* reset start date
*
* @var boolean
*/
public $resetStartDate;
}
\ No newline at end of file
......@@ -78,10 +78,10 @@ class archiveRetentionRule
public $disposalDate;
/**
* The retention rule status
* reset start date
*
* @var string
* @var boolean
*/
public $retentionRuleStatus;
public $resetStartDate;
}
\ No newline at end of file
......@@ -35,7 +35,7 @@
</div>
<div class="modal-footer" data-translate-catalog="recordsManagement/messages">
<button class="btn btn-warning" data-dismiss="modal" title="Cancel"><i class="fa fa-times">&nbsp;</i>Cancel</button>
<button id="save" class="btn btn-success" data-archiveIds="" data-dismiss="modal" title="Save"><i class="fa fa-check">&nbsp;</i>OK</button>
<button id="save" class="btn btn-success" data-archiveIds="" title="Save"><i class="fa fa-check">&nbsp;</i>OK</button>
</div>
</div>
</div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment