fixed blatant errors in jquery and php validation
This commit is contained in:
parent
311ecd393d
commit
67807bb4b3
3 changed files with 8 additions and 2 deletions
|
@ -363,7 +363,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
||||||
$criteriaDatetimeSelect = new Zend_Form_Element_Select("sp_criteria_datetime_select_".$i."_".$j);
|
$criteriaDatetimeSelect = new Zend_Form_Element_Select("sp_criteria_datetime_select_".$i."_".$j);
|
||||||
$criteriaDatetimeSelect->setAttrib('class','input_select sp_input_select')
|
$criteriaDatetimeSelect->setAttrib('class','input_select sp_input_select')
|
||||||
->setDecorators(array('viewHelper'));
|
->setDecorators(array('viewHelper'));
|
||||||
if ($i != 0 && !isset($criteriaKeys[$i])) {
|
if (!isset($criteriaKeys[$i])) {
|
||||||
$criteriaDatetimeSelect->setAttrib('disabled', 'disabled');
|
$criteriaDatetimeSelect->setAttrib('disabled', 'disabled');
|
||||||
}
|
}
|
||||||
// check if the value is stored and it is a relative datetime field
|
// check if the value is stored and it is a relative datetime field
|
||||||
|
|
|
@ -1202,7 +1202,7 @@ SQL;
|
||||||
$value = $d['sp_criteria_value'];
|
$value = $d['sp_criteria_value'];
|
||||||
$modifier = $d['sp_criteria_modifier'];
|
$modifier = $d['sp_criteria_modifier'];
|
||||||
if (isset($d['sp_criteria_extra'])) { $extra = $d['sp_criteria_extra']; }
|
if (isset($d['sp_criteria_extra'])) { $extra = $d['sp_criteria_extra']; }
|
||||||
$datetimeunit = $d['sp_criteria_datetime_select'];
|
if (isset($d['sp_criteria_datetime_select'])) { $datetimeunit = $d['sp_criteria_datetime_select']; }
|
||||||
if (isset($d['sp_criteria_extra_datetime_select'])) {$extradatetimeunit = $d['sp_criteria_extra_datetime_select'];}
|
if (isset($d['sp_criteria_extra_datetime_select'])) {$extradatetimeunit = $d['sp_criteria_extra_datetime_select'];}
|
||||||
|
|
||||||
if ($field == 'utime' || $field == 'mtime' || $field == 'lptime') {
|
if ($field == 'utime' || $field == 'mtime' || $field == 'lptime') {
|
||||||
|
|
|
@ -19,6 +19,8 @@ function setSmartBlockEvents() {
|
||||||
appendAddButton();
|
appendAddButton();
|
||||||
appendModAddButton();
|
appendModAddButton();
|
||||||
removeButtonCheck();
|
removeButtonCheck();
|
||||||
|
disableAndHideDateTimeDropdown(newRowVal);
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -34,6 +36,8 @@ function setSmartBlockEvents() {
|
||||||
appendAddButton();
|
appendAddButton();
|
||||||
appendModAddButton();
|
appendModAddButton();
|
||||||
removeButtonCheck();
|
removeButtonCheck();
|
||||||
|
disableAndHideDateTimeDropdown(newRowVal);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -67,6 +71,7 @@ function setSmartBlockEvents() {
|
||||||
newRowExtra.val('');
|
newRowExtra.val('');
|
||||||
disableAndHideExtraField(newRowVal);
|
disableAndHideExtraField(newRowVal);
|
||||||
disableAndHideDateTimeDropdown(newRowVal);
|
disableAndHideDateTimeDropdown(newRowVal);
|
||||||
|
disableAndHideExtraDateTimeDropdown(newRowVal);
|
||||||
sizeTextBoxes(newRowVal, 'sp_extra_input_text', 'sp_input_text');
|
sizeTextBoxes(newRowVal, 'sp_extra_input_text', 'sp_input_text');
|
||||||
|
|
||||||
//remove the 'criteria add' button from new modifier row
|
//remove the 'criteria add' button from new modifier row
|
||||||
|
@ -303,6 +308,7 @@ function setSmartBlockEvents() {
|
||||||
// disable extra field and hide the span
|
// disable extra field and hide the span
|
||||||
disableAndHideExtraField($(this), index);
|
disableAndHideExtraField($(this), index);
|
||||||
disableAndHideDateTimeDropdown($(this), index);
|
disableAndHideDateTimeDropdown($(this), index);
|
||||||
|
disableAndHideExtraDateTimeDropdown($(this),index);
|
||||||
populateModifierSelect(this, true);
|
populateModifierSelect(this, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue