Verified Commit b80900b9 authored by Alexis Ragot's avatar Alexis Ragot
Browse files

Fix the modification of the retention rule

parent d3da5882
......@@ -325,7 +325,7 @@
var retentionRuleTable = $('#retentionRuleTable');
if (retentionRuleCode) {
var retentionRuleDurationUnit = retentionRuleCode.duration.substr(retentionRuleCode.duration.length - 1, 1);
var retentionRuleDuration = (retentionRuleCode.duration.split(retentionRuleDurationUnit))[0].split("P");
if (rule) {
......@@ -352,6 +352,27 @@
} else {
$('#retentionRule').css("display", 'none');
if (rule) {
$('#retentionRule').css("display", '');
if(rule.retentionDuration) {
var retentionRuleDurationUnit = rule.retentionDuration.substr(rule.retentionDuration.length - 1, 1);
var retentionRuleDuration = (rule.retentionDuration.split(retentionRuleDurationUnit))[0].split("P");
if(retentionRuleDuration[1] >= 9999){
$('#retentionRuleDuration').text($('#text_unlimited').text());
} else {
$('#retentionRuleDuration').text(retentionRuleDuration[1] + ' ' + $('#text_' + retentionRuleDurationUnit).html());
}
}
if(rule.finalDisposition) {
$('#retentionRuleFinalDisposition').val(rule.finalDisposition);
} else {
$('#retentionRuleFinalDisposition').val("");
}
}
}
if(retentionRules){
......
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