diff --git a/UI/src/view/point_asset/massTransitStopForm.js b/UI/src/view/point_asset/massTransitStopForm.js index 163c7bc9d6..2b624f71ea 100644 --- a/UI/src/view/point_asset/massTransitStopForm.js +++ b/UI/src/view/point_asset/massTransitStopForm.js @@ -3,6 +3,7 @@ var poistaSelected = false; var authorizationPolicy; var pointAssetToSave = false; + var tramStopToSave = false; var rootElement = $("#feature-attributes"); @@ -130,6 +131,11 @@ selectedMassTransitStopModel.deleteMassTransitStop(poistaSelected); } }); + } else if(tramStopToSave) { + new GenericConfirmPopup('Oletko varma, että haluat luoda pysäkin kävelyn ja pyöräilyn väylälle?', { + successCallback: function () { + saveStop(); + }}); } else if (pointAssetToSave) { saveWithPossibleWalkingCyclingPopUp(); } else { @@ -1098,6 +1104,10 @@ pointAssetToSave = true; } + if (property.publicId === "pysakin_tyyppi" && _.some(property.values, function (value) {return value.propertyValue === 1;})) { + tramStopToSave = true; + } + }); eventbus.on('busStop:selected', function(value) {