Commit 6d285219dc4b02f79e53ab2cac58d4361bf21353

Authored by Lucas Schmoeller da Silva
1 parent 80cc8e14
Exists in 2.9 and in 9 other branches 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8

Corrigido validação de campos simpleSearch

Refs #3515
ieducar/modules/Portabilis/Assets/Javascripts/Validator.js
... ... @@ -125,7 +125,7 @@ function validatesPresenseOfValueInRequiredFields(additionalFields, exceptFields
125 125 if ($emptyFields.length == 0)
126 126 return true;
127 127  
128   - let label = $emptyFields[0].closest('tr').find('td:first span.form:first').text() || "";
  128 + let label = ($emptyFields[0].hasClass('simple-search-id') ? $j('#'+$emptyFields[0].attr('data-for')) : $emptyFields[0]).closest('tr').find('td:first span.form:first').text() || "";
129 129 if (label.length) {
130 130 alert(`Preencha o campo '${label}' corretamente`);
131 131 } else {
... ...