dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #24590
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12089: Impl support for setting UI and DB locale when creating and updating users. Useful for multi-coun...
------------------------------------------------------------
revno: 12089
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2013-09-14 21:05:29 +0200
message:
Impl support for setting UI and DB locale when creating and updating users. Useful for multi-country deployments.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserSetting.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java
dhis-2/dhis-services/dhis-service-i18n/src/main/java/org/hisp/dhis/i18n/locale/UserSettingLocaleManager.java
dhis-2/dhis-services/dhis-service-i18n/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/LocaleUtils.java
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/settings/user/action/SetGeneralSettingsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/SetupTreeAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateUserAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addUserForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/updateUserForm.vm
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserService.java 2013-09-13 13:00:37 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserService.java 2013-09-14 19:05:29 +0000
@@ -252,7 +252,6 @@
void updateUserAuthorityGroup( UserAuthorityGroup userAuthorityGroup );
/**
- * 2
* Retrieves the UserAuthorityGroup with the given identifier.
*
* @param id the identifier of the UserAuthorityGroup to retrieve.
@@ -261,7 +260,6 @@
UserAuthorityGroup getUserAuthorityGroup( int id );
/**
- * 2
* Retrieves the UserAuthorityGroup with the given identifier.
*
* @param id the identifier of the UserAuthorityGroup to retrieve.
@@ -323,6 +321,14 @@
void addUserSetting( UserSetting userSetting );
/**
+ * If a matching UserSetting exists, based on its user and name, it will be
+ * updated, if not, the given UserSetting will be added.
+ *
+ * @param userSetting the UserSetting.
+ */
+ void addOrUpdateUserSetting( UserSetting userSetting );
+
+ /**
* Updates a UserSetting.
*
* @param userSetting the UserSetting to update.
@@ -340,6 +346,18 @@
UserSetting getUserSetting( User user, String name );
/**
+ * Retrieves a user setting value for the given user and setting name. Returns
+ * the given default value if the setting does not exist or the setting value
+ * is null.
+ *
+ * @param user the user.
+ * @param name the setting name.
+ * @param defaultValue the default value.
+ * @return a setting value.
+ */
+ Serializable getUserSettingValue( User user, String name, Serializable defaultValue );
+
+ /**
* Retrieves all UserSettings for the given User.
*
* @param user the User.
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserSetting.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserSetting.java 2013-09-14 18:27:14 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserSetting.java 2013-09-14 19:05:29 +0000
@@ -104,6 +104,13 @@
return result;
}
+ public void mergeWith( UserSetting other )
+ {
+ user = other.getUser() != null ? other.getUser() : user;
+ name = other.getName() != null ? other.getName() : name;
+ value = other.getValue() != null ? other.getValue() : value;
+ }
+
// -------------------------------------------------------------------------
// Getters and setters
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java 2013-09-13 13:00:37 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java 2013-09-14 19:05:29 +0000
@@ -480,6 +480,21 @@
{
userCredentialsStore.addUserSetting( userSetting );
}
+
+ public void addOrUpdateUserSetting( UserSetting userSetting )
+ {
+ UserSetting setting = getUserSetting( userSetting.getUser(), userSetting.getName() );
+
+ if ( setting != null )
+ {
+ setting.mergeWith( userSetting );
+ updateUserSetting( setting );
+ }
+ else
+ {
+ addUserSetting( userSetting );
+ }
+ }
public void updateUserSetting( UserSetting userSetting )
{
@@ -505,6 +520,13 @@
{
return userCredentialsStore.getUserSetting( user, name );
}
+
+ public Serializable getUserSettingValue( User user, String name, Serializable defaultValue )
+ {
+ UserSetting setting = getUserSetting( user, name );
+
+ return setting != null && setting.getValue() != null ? setting.getValue() : defaultValue;
+ }
public Map<User, Serializable> getUserSettings( String name, Serializable defaultValue )
{
=== modified file 'dhis-2/dhis-services/dhis-service-i18n/src/main/java/org/hisp/dhis/i18n/locale/UserSettingLocaleManager.java'
--- dhis-2/dhis-services/dhis-service-i18n/src/main/java/org/hisp/dhis/i18n/locale/UserSettingLocaleManager.java 2013-09-14 18:27:14 +0000
+++ dhis-2/dhis-services/dhis-service-i18n/src/main/java/org/hisp/dhis/i18n/locale/UserSettingLocaleManager.java 2013-09-14 19:05:29 +0000
@@ -44,13 +44,6 @@
public class UserSettingLocaleManager
implements LocaleManager
{
- private Locale defaultLocale;
-
- public void setDefaultLocale( Locale defaultLocale )
- {
- this.defaultLocale = defaultLocale;
- }
-
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
@@ -82,11 +75,6 @@
return locale;
}
- if ( defaultLocale != null )
- {
- return defaultLocale;
- }
-
return DHIS_STANDARD_LOCALE;
}
=== modified file 'dhis-2/dhis-services/dhis-service-i18n/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-i18n/src/main/resources/META-INF/dhis/beans.xml 2013-09-14 18:27:14 +0000
+++ dhis-2/dhis-services/dhis-service-i18n/src/main/resources/META-INF/dhis/beans.xml 2013-09-14 19:05:29 +0000
@@ -5,7 +5,6 @@
<bean id="org.hisp.dhis.i18n.locale.LocaleManager" class="org.hisp.dhis.i18n.locale.UserSettingLocaleManager">
<property name="userSettingService" ref="org.hisp.dhis.user.UserSettingService" />
<property name="resourceBundleManager" ref="org.hisp.dhis.i18n.resourcebundle.ResourceBundleManager" />
- <property name="defaultLocale" value="en" />
</bean>
<bean id="org.hisp.dhis.i18n.resourcebundle.ResourceBundleManager" class="org.hisp.dhis.i18n.resourcebundle.DefaultResourceBundleManager">
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/LocaleUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/LocaleUtils.java 2013-09-14 18:27:14 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/LocaleUtils.java 2013-09-14 19:05:29 +0000
@@ -43,11 +43,11 @@
*/
public static Locale getLocale( String localeStr )
{
- if ( localeStr == null )
+ if ( localeStr == null || localeStr.trim().isEmpty() )
{
return null;
}
-
+
String[] parts = localeStr.split( "_" );
Locale thisLocale;
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/settings/user/action/SetGeneralSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/settings/user/action/SetGeneralSettingsAction.java 2013-09-14 18:27:14 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/settings/user/action/SetGeneralSettingsAction.java 2013-09-14 19:05:29 +0000
@@ -34,7 +34,6 @@
import static org.hisp.dhis.user.UserSettingService.KEY_MESSAGE_EMAIL_NOTIFICATION;
import static org.hisp.dhis.user.UserSettingService.KEY_MESSAGE_SMS_NOTIFICATION;
-import org.apache.commons.lang.StringUtils;
import org.hisp.dhis.i18n.I18n;
import org.hisp.dhis.i18n.locale.LocaleManager;
import org.hisp.dhis.setting.StyleManager;
@@ -149,9 +148,9 @@
public String execute()
throws Exception
{
- localeManager.setCurrentLocale( LocaleUtils.getLocale( StringUtils.trimToNull( currentLocale ) ) );
+ localeManager.setCurrentLocale( LocaleUtils.getLocale( currentLocale ) );
- userSettingService.saveUserSetting( KEY_DB_LOCALE, LocaleUtils.getLocale( StringUtils.trimToNull( currentLocaleDb ) ) );
+ userSettingService.saveUserSetting( KEY_DB_LOCALE, LocaleUtils.getLocale( currentLocaleDb ) );
styleManager.setUserStyle( currentStyle );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserAction.java 2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/AddUserAction.java 2013-09-14 19:05:29 +0000
@@ -39,11 +39,14 @@
import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
import org.hisp.dhis.security.PasswordManager;
import org.hisp.dhis.system.util.AttributeUtils;
+import org.hisp.dhis.system.util.LocaleUtils;
import org.hisp.dhis.user.CurrentUserService;
import org.hisp.dhis.user.User;
import org.hisp.dhis.user.UserAuthorityGroup;
import org.hisp.dhis.user.UserCredentials;
import org.hisp.dhis.user.UserService;
+import org.hisp.dhis.user.UserSetting;
+import org.hisp.dhis.user.UserSettingService;
import com.opensymphony.xwork2.Action;
@@ -157,6 +160,20 @@
this.passwordUnMatched = passwordUnMatched;
}
+ private String localeUi;
+
+ public void setLocaleUi( String localeUi )
+ {
+ this.localeUi = localeUi;
+ }
+
+ private String localeDb;
+
+ public void setLocaleDb( String localeDb )
+ {
+ this.localeDb = localeDb;
+ }
+
private Collection<String> selectedList = new ArrayList<String>();
public void setSelectedList( Collection<String> selectedList )
@@ -170,7 +187,7 @@
{
this.jsonAttributeValues = jsonAttributeValues;
}
-
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -235,7 +252,10 @@
{
selectionManager.setSelectedOrganisationUnits( orgUnits );
}
-
+
+ userService.addUserSetting( new UserSetting( user, UserSettingService.KEY_UI_LOCALE, LocaleUtils.getLocale( localeUi ) ) );
+ userService.addUserSetting( new UserSetting( user, UserSettingService.KEY_DB_LOCALE, LocaleUtils.getLocale( localeDb ) ) );
+
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/SetupTreeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/SetupTreeAction.java 2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/SetupTreeAction.java 2013-09-14 19:05:29 +0000
@@ -28,19 +28,35 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import com.opensymphony.xwork2.Action;
+import static org.hisp.dhis.user.UserSettingService.KEY_DB_LOCALE;
+import static org.hisp.dhis.user.UserSettingService.KEY_UI_LOCALE;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
import org.hisp.dhis.attribute.Attribute;
import org.hisp.dhis.attribute.AttributeService;
import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
+import org.hisp.dhis.i18n.I18nService;
+import org.hisp.dhis.i18n.locale.LocaleManager;
import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
import org.hisp.dhis.oust.manager.SelectionTreeManager;
import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
import org.hisp.dhis.system.filter.UserAuthorityGroupCanIssueFilter;
import org.hisp.dhis.system.util.AttributeUtils;
import org.hisp.dhis.system.util.FilterUtils;
-import org.hisp.dhis.user.*;
+import org.hisp.dhis.user.CurrentUserService;
+import org.hisp.dhis.user.User;
+import org.hisp.dhis.user.UserAuthorityGroup;
+import org.hisp.dhis.user.UserCredentials;
+import org.hisp.dhis.user.UserService;
-import java.util.*;
+import com.opensymphony.xwork2.Action;
/**
* @author Nguyen Hong Duc
@@ -88,6 +104,20 @@
this.attributeService = attributeService;
}
+ private I18nService i18nService;
+
+ public void setI18nService( I18nService i18nService )
+ {
+ this.i18nService = i18nService;
+ }
+
+ private LocaleManager localeManager;
+
+ public void setLocaleManager( LocaleManager localeManager )
+ {
+ this.localeManager = localeManager;
+ }
+
// -------------------------------------------------------------------------
// Input & Output
// -------------------------------------------------------------------------
@@ -120,6 +150,34 @@
return organisationUnitGroups;
}
+ private List<Locale> availableLocales;
+
+ public List<Locale> getAvailableLocales()
+ {
+ return availableLocales;
+ }
+
+ private Locale currentLocale;
+
+ public Locale getCurrentLocale()
+ {
+ return currentLocale;
+ }
+
+ private List<Locale> availableLocalesDb;
+
+ public List<Locale> getAvailableLocalesDb()
+ {
+ return availableLocalesDb;
+ }
+
+ private Locale currentLocaleDb;
+
+ public Locale getCurrentLocaleDb()
+ {
+ return currentLocaleDb;
+ }
+
private List<Attribute> attributes;
public List<Attribute> getAttributes()
@@ -143,9 +201,12 @@
{
userAuthorityGroups = new ArrayList<UserAuthorityGroup>( userService.getAllUserAuthorityGroups() );
- FilterUtils.filter( userAuthorityGroups,
- new UserAuthorityGroupCanIssueFilter( currentUserService.getCurrentUser() ) );
+ FilterUtils.filter( userAuthorityGroups, new UserAuthorityGroupCanIssueFilter( currentUserService.getCurrentUser() ) );
+ availableLocales = localeManager.getAvailableLocales();
+
+ availableLocalesDb = i18nService.getAvailableLocales();
+
if ( id != null )
{
User user = userService.getUser( id );
@@ -160,6 +221,10 @@
userAuthorityGroups.removeAll( userCredentials.getUserAuthorityGroups() );
attributeValues = AttributeUtils.getAttributeValueMap( user.getAttributeValues() );
+
+ currentLocale = (Locale) userService.getUserSettingValue( user, KEY_UI_LOCALE, LocaleManager.DHIS_STANDARD_LOCALE );
+
+ currentLocaleDb = (Locale) userService.getUserSettingValue( user, KEY_DB_LOCALE, null );
}
else
{
@@ -167,6 +232,8 @@
{
selectionTreeManager.setSelectedOrganisationUnits( selectionManager.getSelectedOrganisationUnits() );
}
+
+ currentLocale = LocaleManager.DHIS_STANDARD_LOCALE;
}
attributes = new ArrayList<Attribute>( attributeService.getUserAttributes() );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateUserAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateUserAction.java 2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/java/org/hisp/dhis/user/action/UpdateUserAction.java 2013-09-14 19:05:29 +0000
@@ -35,6 +35,7 @@
import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
import org.hisp.dhis.security.PasswordManager;
import org.hisp.dhis.system.util.AttributeUtils;
+import org.hisp.dhis.system.util.LocaleUtils;
import org.hisp.dhis.user.*;
import java.util.*;
@@ -137,6 +138,20 @@
this.phoneNumber = phoneNumber;
}
+ private String localeUi;
+
+ public void setLocaleUi( String localeUi )
+ {
+ this.localeUi = localeUi;
+ }
+
+ private String localeDb;
+
+ public void setLocaleDb( String localeDb )
+ {
+ this.localeDb = localeDb;
+ }
+
private Collection<String> selectedList = new ArrayList<String>();
public void setSelectedList( Collection<String> selectedList )
@@ -232,6 +247,9 @@
selectionManager.setSelectedOrganisationUnits( units );
}
+ userService.addOrUpdateUserSetting( new UserSetting( user, UserSettingService.KEY_UI_LOCALE, LocaleUtils.getLocale( localeUi ) ) );
+ userService.addOrUpdateUserSetting( new UserSetting( user, UserSettingService.KEY_DB_LOCALE, LocaleUtils.getLocale( localeDb ) ) );
+
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/META-INF/dhis/beans.xml 2013-03-12 06:51:28 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/resources/META-INF/dhis/beans.xml 2013-09-14 19:05:29 +0000
@@ -63,6 +63,8 @@
<property name="userService" ref="org.hisp.dhis.user.UserService" />
<property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
<property name="attributeService" ref="org.hisp.dhis.attribute.AttributeService" />
+ <property name="i18nService" ref="org.hisp.dhis.i18n.I18nService" />
+ <property name="localeManager" ref="org.hisp.dhis.i18n.locale.LocaleManager" />
</bean>
<bean id="org.hisp.dhis.user.action.DisableUserAction" class="org.hisp.dhis.user.action.DisableUserAction" scope="prototype" />
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addUserForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addUserForm.vm 2013-07-19 08:23:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addUserForm.vm 2013-09-14 19:05:29 +0000
@@ -79,6 +79,30 @@
<td><label for="phoneNumber">$i18n.getString( "phone_number" )</label></td>
<td colspan="3"><input type="text" id="phoneNumber" name="phoneNumber"></td>
</tr>
+
+ <tr>
+ <td><label>$i18n.getString( "language" )</label></td>
+ <td>
+ <select id="localeUi" name="localeUi">
+ #foreach( $locale in $availableLocales )
+ <option value="$locale.toString()" #if( $locale == $currentLocale )selected="selected"#end>$locale.getDisplayName()</option>
+ #end
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label>$i18n.getString( "db_language" )</label></td>
+ <td>
+ <select id="localeDb" name="localeDb">
+ <option value="">[$i18n.getString( "use_db_locale_no_translation" )]</option>
+ #foreach( $locale in $availableLocalesDb )
+ <option value="$locale.toString()">$locale.getDisplayName()</option>
+ #end
+ </select>
+ </td>
+ </tr>
+
</table>
#tblDynamicAttributes( { "attributes": $attributes } )
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/updateUserForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/updateUserForm.vm 2013-07-19 08:23:53 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/updateUserForm.vm 2013-09-14 19:05:29 +0000
@@ -89,6 +89,30 @@
<td><label for="phoneNumber">$i18n.getString( "phone_number" )</label></td>
<td colspan="3"><input type="text" id="phoneNumber" name="phoneNumber" value="$!encoder.htmlEncode( $userCredentials.user.phoneNumber )"></td>
</tr>
+
+ <tr>
+ <td><label>$i18n.getString( "language" )</label></td>
+ <td>
+ <select id="localeUi" name="localeUi">
+ #foreach( $locale in $availableLocales )
+ <option value="$locale.toString()" #if( $locale == $currentLocale )selected="selected"#end>$locale.getDisplayName()</option>
+ #end
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label>$i18n.getString( "db_language" )</label></td>
+ <td>
+ <select id="localeDb" name="localeDb">
+ <option value="">[$i18n.getString( "use_db_locale_no_translation" )]</option>
+ #foreach( $locale in $availableLocalesDb )
+ <option value="$locale.toString()" #if( $locale == $currentLocaleDb )selected="selected"#end>$locale.getDisplayName()</option>
+ #end
+ </select>
+ </td>
+ </tr>
+
</table>
#tblDynamicAttributes( { "attributes": $attributes, "attributeValues": $attributeValues } )