mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2025-12-23 22:37:53 -05:00
Fix JavaScript validation and add Bootstrap table attributes
Co-authored-by: connortechnology <925519+connortechnology@users.noreply.github.com>
This commit is contained in:
@@ -15,7 +15,20 @@
|
|||||||
<div class="wrapper-scroll-table">
|
<div class="wrapper-scroll-table">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col overflow-auto">
|
<div class="col overflow-auto">
|
||||||
<table id="contentTable" class="table table-striped">
|
<table id="contentTable" class="table table-striped"
|
||||||
|
data-click-to-select="true"
|
||||||
|
data-check-on-init="true"
|
||||||
|
data-mobile-responsive="true"
|
||||||
|
data-min-width="562"
|
||||||
|
data-show-export="true"
|
||||||
|
data-show-columns="true"
|
||||||
|
data-uncheckAll="true"
|
||||||
|
data-cookie="true"
|
||||||
|
data-cookie-same-site="Strict"
|
||||||
|
data-cookie-id-table="zmAIClassesTable"
|
||||||
|
data-cookie-expire="2y"
|
||||||
|
data-remember-order="false"
|
||||||
|
>
|
||||||
<thead class="thead-highlight">
|
<thead class="thead-highlight">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="colId"><?php echo translate('Id') ?></th>
|
<th class="colId"><?php echo translate('Id') ?></th>
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ function validateForm(form) {
|
|||||||
if (!form.elements['newAIClass[ClassName]'].value) {
|
if (!form.elements['newAIClass[ClassName]'].value) {
|
||||||
errors[errors.length] = 'You must supply a class name';
|
errors[errors.length] = 'You must supply a class name';
|
||||||
}
|
}
|
||||||
if (!form.elements['newAIClass[ClassIndex]'].value && form.elements['newAIClass[ClassIndex]'].value !== '0') {
|
var classIndexValue = form.elements['newAIClass[ClassIndex]'].value;
|
||||||
|
if (!classIndexValue && classIndexValue !== '0') {
|
||||||
errors[errors.length] = 'You must supply a class index';
|
errors[errors.length] = 'You must supply a class index';
|
||||||
}
|
}
|
||||||
if (errors.length) {
|
if (errors.length) {
|
||||||
|
|||||||
Reference in New Issue
Block a user