Skip to content
Snippets Groups Projects
Commit ef74ffdf authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Bugfix enabling organization admin to add new weather station

parent a9a71484
No related branches found
No related tags found
2 merge requests!17Develop,!12Ny server 2019
This commit is part of merge request !17. Comments created here will be created in the context of that merge request.
......@@ -361,6 +361,7 @@ public class PointOfInterestController extends HttpServlet {
request.setAttribute("weatherStation", weatherStation);
request.setAttribute("defaultMapCenter",user.getOrganizationId().getDefaultMapCenter());
request.setAttribute("defaultMapZoom", user.getOrganizationId().getDefaultMapZoom());
request.setAttribute("returnURL","weatherStation?organizationId=" + user.getOrganizationId().getOrganizationId());
request.getSession().setAttribute("dataSources", SessionControllerGetter.getPointOfInterestBean().getWeatherStationDataSources());
request.getSession().setAttribute("availableTimeZones", Globals.availableTimeZones);
request.getSession().setAttribute("defaultTimeZoneId", user.getOrganizationId().getDefaultTimeZone());
......
This diff is collapsed.
......@@ -252,6 +252,12 @@ var loadScript = function(url, callback)
document.head.appendChild(script);
};
/**
* Loads elements (e.g. script elements) into the parent page
* @param {type} type the type of element
* @param {type} attributes the attributes (like src) of the element
* @param {type} callback What do do after the loading is done
*/
var loadHeadElement = function(type, attributes, callback)
{
var elm = document.createElement(type);
......
......@@ -164,6 +164,8 @@
</select>
<span class="help-block" id="${formId}_userId_validation"></span>
</div>
<#else>
<input type="hidden" name="userId" value="<#if weatherStation.userId?has_content>${weatherStation.userId.userId}<#else>${user.userId}</#if>"/>
</#if>
<button type="submit" class="btn btn-default">${i18nBundle.submit}</button>
<#if weatherStation.pointOfInterestId?has_content>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment