data conversion work per locale.

This commit is contained in:
Keith Woodlock
2012-05-28 00:17:44 +01:00
parent 986cf32fc8
commit 3318e76150
9 changed files with 58 additions and 263 deletions
@@ -1,6 +1,7 @@
package org.mifosng.ui;
import org.mifosng.ui.infrastructure.BasicAuthUserDetails;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Controller;
@@ -63,6 +64,9 @@ public class ApplicationPagesRoutesController {
BasicAuthUserDetails userDetails = (BasicAuthUserDetails) authentication.getPrincipal();
model.addAttribute("basicAuthKey", userDetails.getBasicAuthenticationKey());
model.addAttribute("baseApiUrl", userDetails.getFullApiUrl());
model.addAttribute("currentLocale", LocaleContextHolder.getLocale().toString());
return "admin/orghome";
}
@@ -24,6 +24,7 @@
<form id="entityform">
<div id="formerrors"></div>
<fieldset>
<input type="hidden" id="locale" name="locale" value="${currentLocale}" />
<legend><spring:message code="form.legend.loan.product.information"/></legend>
<label for="name"><spring:message code="form.label.loan.product.name"/></label>