Bug #18427 » 7829_required_check.diff
typo3/jsfunc.tbe_editor.js (working copy) | ||
---|---|---|
if (type) {
|
||
if (type == 'required') {
|
||
var value = document[TBE_EDITOR.formname][elementName].value;
|
||
if (!value || elementData.additional && elementData.additional.isPositiveNumber && (isNaN(value) || Number(value) <= 0)) {
|
||
result = 0;
|
||
if (autoNotify) {
|
||
TBE_EDITOR.setImage('req_'+elementData.requiredImg, TBE_EDITOR.images.req);
|
||
TBE_EDITOR.notifyNested(elementName, false);
|
||
if (Object.isUndefined(document[TBE_EDITOR.formname][elementName])) {
|
||
// TODO: search for the field in childs, it's may be an IRRE field
|
||
// for now return true
|
||
result = 1;
|
||
} else {
|
||
var value = document[TBE_EDITOR.formname][elementName].value;
|
||
if (!value || elementData.additional && elementData.additional.isPositiveNumber && (isNaN(value) || Number(value) <= 0)) {
|
||
result = 0;
|
||
if (autoNotify) {
|
||
TBE_EDITOR.setImage('req_'+elementData.requiredImg, TBE_EDITOR.images.req);
|
||
TBE_EDITOR.notifyNested(elementName, false);
|
||
}
|
||
}
|
||
}
|
||
} else if (type == 'range' && elementData.range) {
|