Add a warning about missing EndTime term on UpdateDiskSpace
This commit is contained in:
parent
e6d6ee1b67
commit
c837a17aea
|
@ -36,6 +36,17 @@ function validateForm( form ) {
|
||||||
if ( ! have_archivestatus_term ) {
|
if ( ! have_archivestatus_term ) {
|
||||||
return confirm('You have enabled deleting events but do not have a term referencing the archived status of the event. This filter may delete events that you want to save! Are you sure?');
|
return confirm('You have enabled deleting events but do not have a term referencing the archived status of the event. This filter may delete events that you want to save! Are you sure?');
|
||||||
}
|
}
|
||||||
|
} else if ( form.elements['filter[UpdateDiskSpace]'].checked ) {
|
||||||
|
var have_endtime_term = false;
|
||||||
|
for ( var i = 0; i < rows.length; i++ ) {
|
||||||
|
if ( form.elements['filter[Query][terms][' + i + '][attr]'].value == 'EndDateTime' ) {
|
||||||
|
have_endtime_term = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( ! have_endtime_term ) {
|
||||||
|
return confirm('You don\'t have an EndTime term in your filter. This will match recordings that are still in progress and so the UpdateDiskSpace action will be a waste of time and resources. Ideally you should have an EndTime IS NOT NULL term. Do you want to continue?');
|
||||||
|
}
|
||||||
|
|
||||||
} else if ( form.elements['filter[Background]'].checked ) {
|
} else if ( form.elements['filter[Background]'].checked ) {
|
||||||
if ( ! (
|
if ( ! (
|
||||||
form.elements['filter[AutoArchive]'].checked
|
form.elements['filter[AutoArchive]'].checked
|
||||||
|
|
Loading…
Reference in New Issue