Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 16918 | Rev 16933 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 16918 Rev 16929
Línea 39... Línea 39...
39
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/js/locales/es.js'));
39
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/js/locales/es.js'));
40
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/themes/fas/theme.js'));
40
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/themes/fas/theme.js'));
41
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/themes/explorer-fas/theme.js'));
41
$this->inlineScript()->appendFile($this->basePath('assets/vendors/bootstrap-fileinput/themes/explorer-fas/theme.js'));
Línea 42... Línea -...
42
 
-
 
43
 
-
 
44
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/jquery.validate.js'));
-
 
-
 
42
 
-
 
43
 
-
 
44
 
Línea 45... Línea 45...
45
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/additional-methods.js'));
45
 
46
$this->inlineScript()->appendFile($this->basePath('assets/vendors/jquery-validation/localization/messages_es.js'));
46
 
Línea 174... Línea 174...
174
        }
174
        }
175
    }
175
    }
Línea 176... Línea -...
176
 
-
 
177
       
-
 
178
    
-
 
179
            $.validator.setDefaults({
-
 
180
            debug: true,
-
 
181
            highlight: function(element) {
-
 
182
                $(element).addClass('is-invalid');
-
 
183
            },
-
 
184
            unhighlight: function(element) {
-
 
185
                $(element).removeClass('is-invalid');
-
 
186
            },
-
 
187
            errorElement: 'span',
-
 
188
            errorClass: 'error invalid-feedback',
-
 
189
            errorPlacement: function(error, element) {
-
 
190
                if(element.parent('.form-group').length) {
-
 
191
                    error.insertAfter(element);
-
 
192
                } else if(element.parent('.toggle').length) {
-
 
193
                    error.insertAfter(element.parent().parent());
-
 
194
                } else {
-
 
195
                    error.insertAfter(element.parent());
-
 
196
                }
-
 
197
            }
-
 
198
        });
-
 
199
    
-
 
200
    
-
 
201
        $.fn.showFormErrorValidator = function(fieldname, errors) {
-
 
202
            var field = $(fieldname);
-
 
203
            if(field) {
-
 
204
                $(field).addClass('is-invalid');
-
 
205
    
-
 
206
 
-
 
207
                var error = $('<span id="' + fieldname +'-error" class="error invalid-feedback">' + errors + '</div>');
-
 
208
                if(field.parent('.form-group').length) {
-
 
209
                    error.insertAfter(field);
-
 
210
                } else  if(field.parent('.toggle').length) {
-
 
211
                    error.insertAfter(field.parent().parent());
-
 
212
                } else {
-
 
213
                    error.insertAfter(field.parent());
-
 
214
                }
-
 
Línea 215... Línea 176...
215
            }
176
 
216
        };
177