Fix: leaftlet layer input shall not be validated

This commit is contained in:
baldo 2016-05-16 22:06:37 +02:00
parent c64f126254
commit 322a2c9dfb

View file

@ -128,7 +128,7 @@ angular.module('ffffng')
var doSubmit = function (node) { var doSubmit = function (node) {
if ($scope.nodeForm.$invalid) { if ($scope.nodeForm.$invalid) {
var firstInvalid = _.filter($element.find('form').find('input'), function (input) { var firstInvalid = _.filter($element.find('form').find('input'), function (input) {
return $scope.nodeForm[input.name].$invalid; return input.name !== 'leaflet-base-layers' && $scope.nodeForm[input.name].$invalid;
})[0]; })[0];
if (firstInvalid) { if (firstInvalid) {
$window.scrollTo(0, $window.pageYOffset + firstInvalid.getBoundingClientRect().top - 100); $window.scrollTo(0, $window.pageYOffset + firstInvalid.getBoundingClientRect().top - 100);