=== added directory 'local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/organisationunit' === added directory 'local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/organisationunit/action' === added file 'local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/organisationunit/action/AddMultiOrganisationUnitAction.java' --- local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/organisationunit/action/AddMultiOrganisationUnitAction.java 1970-01-01 00:00:00 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/organisationunit/action/AddMultiOrganisationUnitAction.java 2012-08-21 08:32:18 +0000 @@ -0,0 +1,228 @@ +package org.hisp.dhis.reportsheet.organisationunit.action; + +/* + * Copyright (c) 2004-2012, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +import java.util.Collection; +import java.util.Date; +import java.util.HashSet; +import java.util.List; + +import org.hisp.dhis.attribute.AttributeService; +import org.hisp.dhis.dataset.DataSet; +import org.hisp.dhis.dataset.DataSetService; +import org.hisp.dhis.i18n.I18nFormat; +import org.hisp.dhis.organisationunit.OrganisationUnit; +import org.hisp.dhis.organisationunit.OrganisationUnitGroup; +import org.hisp.dhis.organisationunit.OrganisationUnitGroupService; +import org.hisp.dhis.organisationunit.OrganisationUnitService; +import org.hisp.dhis.organisationunitprototype.OrganisationUnitPrototype; +import org.hisp.dhis.organisationunitprototype.OrganisationUnitPrototypeService; +import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager; +import org.hisp.dhis.system.util.AttributeUtils; +import org.springframework.beans.factory.annotation.Autowired; + +import com.opensymphony.xwork2.Action; + +/** + * @author Dang Duy Hieu + * @version $Id$ + */ +public class AddMultiOrganisationUnitAction + implements Action +{ + private static final String SEPERATE = " - "; + + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private I18nFormat format; + + public void setFormat( I18nFormat format ) + { + this.format = format; + } + + @Autowired + private OrganisationUnitPrototypeService organisationUnitPrototypeService; + + @Autowired + private OrganisationUnitService organisationUnitService; + + @Autowired + private OrganisationUnitGroupService organisationUnitGroupService; + + @Autowired + private OrganisationUnitSelectionManager selectionManager; + + @Autowired + private DataSetService dataSetService; + + @Autowired + private AttributeService attributeService; + + // ------------------------------------------------------------------------- + // Input & Output + // ------------------------------------------------------------------------- + + private String openingDate; + + public void setOpeningDate( String openingDate ) + { + this.openingDate = openingDate; + } + + private boolean active; + + public void setActive( boolean active ) + { + this.active = active; + } + + private Collection selectedList = new HashSet(); + + public void setSelectedList( Collection selectedList ) + { + this.selectedList = selectedList; + } + + private Collection dataSets = new HashSet(); + + public void setDataSets( Collection dataSets ) + { + this.dataSets = dataSets; + } + + private Collection selectedGroups = new HashSet(); + + public void setSelectedGroups( Collection selectedGroups ) + { + this.selectedGroups = selectedGroups; + } + + private Integer organisationUnitId; + + public Integer getOrganisationUnitId() + { + return organisationUnitId; + } + + private List jsonAttributeValues; + + public void setJsonAttributeValues( List jsonAttributeValues ) + { + this.jsonAttributeValues = jsonAttributeValues; + } + + // ------------------------------------------------------------------------- + // Action implementation + // ------------------------------------------------------------------------- + + public String execute() + throws Exception + { + Date date = format.parseDate( openingDate ); + + // --------------------------------------------------------------------- + // Get parent + // --------------------------------------------------------------------- + + OrganisationUnit parent = selectionManager.getSelectedOrganisationUnit(); + + if ( parent == null ) + { + // ----------------------------------------------------------------- + // If no unit is selected, the parent is the parent of the roots + // ----------------------------------------------------------------- + + parent = selectionManager.getRootOrganisationUnitsParent(); + } + + Collection dataSetList = new HashSet( dataSetService.getDataSets( dataSets ) ); + + Collection unitGroupList = new HashSet( + organisationUnitGroupService.getOrganisationUnitGroups( selectedGroups ) ); + + // --------------------------------------------------------------------- + // Create organization unit + // --------------------------------------------------------------------- + + String extraName = ( parent.getCode() == null ? String.valueOf( parent.getId() ) : parent.getCode() ); + + for ( String id : selectedList ) + { + OrganisationUnitPrototype unitPrototype = organisationUnitPrototypeService + .getOrganisationUnitPrototype( Integer.parseInt( id ) ); + + if ( unitPrototype != null ) + { + OrganisationUnit organisationUnit = new OrganisationUnit( unitPrototype.getDisplayName() + SEPERATE + + extraName, unitPrototype.getDisplayShortName(), null, date, null, active, null ); + + organisationUnit.setParent( parent ); + + if ( parent != null ) + { + parent.getChildren().add( organisationUnit ); + } + + if ( jsonAttributeValues != null ) + { + AttributeUtils.updateAttributeValuesFromJson( organisationUnit.getAttributeValues(), + jsonAttributeValues, attributeService ); + } + + // --------------------------------------------------------------------- + // Must persist org-unit before adding data sets because + // association are + // updated on both sides (and this side is inverse) + // --------------------------------------------------------------------- + + organisationUnitId = organisationUnitService.addOrganisationUnit( organisationUnit ); + + for ( DataSet ds : dataSetList ) + { + organisationUnit.addDataSet( ds ); + } + + for ( OrganisationUnitGroup group : unitGroupList ) + { + if ( group != null ) + { + group.addOrganisationUnit( organisationUnit ); + organisationUnitGroupService.updateOrganisationUnitGroup( group ); + } + } + + organisationUnitService.updateOrganisationUnit( organisationUnit ); + } + } + + return SUCCESS; + } +} === added file 'local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/organisationunit/action/ShowAddOrganisationUnitFormAction.java' --- local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/organisationunit/action/ShowAddOrganisationUnitFormAction.java 1970-01-01 00:00:00 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/java/org/hisp/dhis/reportsheet/organisationunit/action/ShowAddOrganisationUnitFormAction.java 2012-08-21 08:32:18 +0000 @@ -0,0 +1,119 @@ +package org.hisp.dhis.reportsheet.organisationunit.action; + +/* + * Copyright (c) 2004-2011, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +import com.opensymphony.xwork2.Action; +import org.hisp.dhis.attribute.Attribute; +import org.hisp.dhis.attribute.AttributeService; +import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator; +import org.hisp.dhis.dataset.DataSet; +import org.hisp.dhis.dataset.DataSetService; +import org.hisp.dhis.organisationunit.OrganisationUnitGroupService; +import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet; +import org.hisp.dhis.period.Cal; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.List; + +/** + * @author Dang Duy Hieu + * @version $Id$ + */ +public class ShowAddOrganisationUnitFormAction + implements Action +{ + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + @Autowired + private DataSetService dataSetService; + + @Autowired + private OrganisationUnitGroupService organisationUnitGroupService; + + @Autowired + private AttributeService attributeService; + + // ------------------------------------------------------------------------- + // Input & Output + // ------------------------------------------------------------------------- + + private Date defaultDate; + + public Date getDefaultDate() + { + return defaultDate; + } + + private List dataSets; + + public List getDataSets() + { + return dataSets; + } + + private List groupSets; + + public List getGroupSets() + { + return groupSets; + } + + private List attributes; + + public List getAttributes() + { + return attributes; + } + + // ------------------------------------------------------------------------- + // Action implementation + // ------------------------------------------------------------------------- + + public String execute() + { + defaultDate = new Cal().set( 1900, 1, 1 ).time(); + + dataSets = new ArrayList( dataSetService.getAllDataSets() ); + + groupSets = new ArrayList( organisationUnitGroupService + .getCompulsoryOrganisationUnitGroupSetsWithMembers() ); + + attributes = new ArrayList( attributeService.getOrganisationUnitAttributes() ); + + Collections.sort( dataSets, IdentifiableObjectNameComparator.INSTANCE ); + Collections.sort( groupSets, IdentifiableObjectNameComparator.INSTANCE ); + Collections.sort( attributes, IdentifiableObjectNameComparator.INSTANCE ); + + return SUCCESS; + } +} === modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/resources/META-INF/dhis/beans.xml' --- local/vn/dhis-web-spreadsheet-reporting/src/main/resources/META-INF/dhis/beans.xml 2012-08-20 07:13:48 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/resources/META-INF/dhis/beans.xml 2012-08-21 08:32:18 +0000 @@ -1494,5 +1494,13 @@ + + + + === modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/i18n_module.properties' --- local/vn/dhis-web-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/i18n_module.properties 2012-08-20 10:06:25 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/i18n_module.properties 2012-08-21 08:32:18 +0000 @@ -350,10 +350,25 @@ group_members = Group members attribute_group_order = Attribute Group Order organisation_unit_prototype = Organisation Unit Prototype -organisation_unit_prototype = \u0110\u01a1n v\u1ecb ki\u1ec3u m\u1eabu -organisation_unit_prototype_group = Nh\u00f3m c\u00e1c \u0111\u01a1n v\u1ecb ki\u1ec3u m\u1eabu +organisation_unit_prototype_group = Organisation Unit Prototype Group +select_orgunit_prototype_group = Select org-unit prototype group intro_design_export_reports = Create new, update, view and delete Export reports. A spread-sheet report contains one or many export items. There are many types of report. A report can be assigned to one or many organisation unit and other features... intro_design_import_reports = Create new, update, view and delete Import reports. This report has the import items to integrate with the spread-sheet file and other features... intro_attribute_group_order = Create new, update, view, sort and delete the group of attribute value. This group can be used in entry hospital, ie. Group of ICD Diseases intro_organisation_unit_prototype = Create new, update, view and delete an Organisation Unit Prototype. This one is the name of unit which can be apperanced in other upper units. -intro_organisation_unit_prototype_group = Create new, update, view and delete an Organisation Unit Prototype Group. This group contain the list of Organisation Unit Prototypes. \ No newline at end of file +intro_organisation_unit_prototype_group = Create new, update, view and delete an Organisation Unit Prototype Group. This group contain the list of Organisation Unit Prototypes. +into_add_multi_organisation_unit = Allow to create multi-org-unit at the same time based on the selected parent unit and many other params. +orgunit_prototype_management = Organisation Unit Prototype Management +create_new_orgunit_prototype = Create new Organisation unit prototype +edit_org_unit_prototype = Edit Organisation unit prototype +orgunit_prototype_group_management = Organisation Unit Prototype Group Management +create_new_orgunit_prototype_group = Create new Organisation unit prototype group +edit_orgunit_prototype_group = Edit Organisation unit prototype group +available_orgunit_prototypes = Available organisation unit prototypes +create_multi_org_unit = Create Multi organisation unit +confirm_delete_orgunit_prototype_group = Do you want to delete this Organisation unit prototype group ? +registers_data = Registers data +available_data_sets = Available data sets +selected_data_sets = Selected data sets +select_group = Select group of unit +add_multi_organisation_unit = Add Multi-org-unit \ No newline at end of file === modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/i18n_module_vi_VN.properties' --- local/vn/dhis-web-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/i18n_module_vi_VN.properties 2012-08-20 10:06:25 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/i18n_module_vi_VN.properties 2012-08-21 08:32:18 +0000 @@ -382,6 +382,22 @@ attribute_group_order = Nh\u00f3m c\u00e1c Thu\u1ed9c t\u00ednh c\u00f3 th\u1ee9 t\u1ef1 organisation_unit_prototype = \u0110\u01a1n v\u1ecb ki\u1ec3u m\u1eabu organisation_unit_prototype_group = Nh\u00f3m c\u00e1c \u0111\u01a1n v\u1ecb ki\u1ec3u m\u1eabu +select_orgunit_prototype_group = Ch\u1ecdn Nh\u00f3m \u0111\u01a1n v\u1ecb ki\u1ec3u m\u1eabu intro_attribute_group_order = Cho ph\u00e9p th\u00eam, x\u00f3a, s\u1eafp th\u1ee9 t\u1ef1, s\u1eeda c\u00e1c nh\u00f3m. Trong \u0111\u00f3 m\u1ed7i nh\u00f3m c\u00f3 th\u1ec3 ch\u1ee9 m\u1ed9t ho\u1eb7c nhi\u1ec1u gi\u00e1 tr\u1ecb Thu\u1ed9c t\u00ednh. V\u00ed d\u1ee5 s\u1eed d\u1ee5ng cho nh\u1eadp d\u1eef li\u1ec7u b\u1ec7nh vi\u1ec7n m\u1eabu ICD. intro_organisation_unit_prototype = T\u1ea1o m\u1edbi, c\u1eadp nh\u1eadt, xem v\u00e0 x\u00f3a c\u00e1c \u0110\u01a1n v\u1ecb ki\u1ec3u m\u1eabu. M\u1ed9t \u0111\u01a1n v\u1ecb ki\u1ec3u m\u1eabu c\u00f3 c\u00e1c th\u00f4ng tin nh\u01b0 T\u00ean v\u00e0 T\u00ean vi\u1ebft t\u1eaft. -intro_organisation_unit_prototype_group = T\u1ea1o m\u1edbi, c\u1eadp nh\u1eadt, xem v\u00e0 x\u00f3a c\u00e1c Nh\u00f3m \u0110\u01a1n v\u1ecb ki\u1ec3u m\u1eabu. M\u1ed9t Nh\u00f3m \u0111\u01a1n v\u1ecb ki\u1ec3u m\u1eabu c\u00f3 c\u00e1c th\u00f4ng tin nh\u01b0 T\u00ean v\u00e0 danh s\u00e1ch c\u00e1c \u0111\u01a1n v\u1ecb ki\u1ec3u m\u1eabu. \ No newline at end of file +intro_organisation_unit_prototype_group = T\u1ea1o m\u1edbi, c\u1eadp nh\u1eadt, xem v\u00e0 x\u00f3a c\u00e1c Nh\u00f3m \u0110\u01a1n v\u1ecb ki\u1ec3u m\u1eabu. M\u1ed9t Nh\u00f3m \u0111\u01a1n v\u1ecb ki\u1ec3u m\u1eabu c\u00f3 c\u00e1c th\u00f4ng tin nh\u01b0 T\u00ean v\u00e0 danh s\u00e1ch c\u00e1c \u0111\u01a1n v\u1ecb ki\u1ec3u m\u1eabu. +into_add_multi_organisation_unit = Ch\u1ee9c n\u0103ng cho ph\u00e9p b\u1ea1n t\u1ea1o nhi\u1ec1u \u0111\u01a1n v\u1ecb c\u00f9ng l\u00fac d\u1ef1a tr\u00ean \u0111\u01a1n v\u1ecb cha \u0111\u01b0\u1ee3c ch\u1ecdn v\u00e0 c\u00e1c th\u00f4ng s\u1ed1 li\u00ean quan. +create_new_orgunit_prototype = T\u1ea1o m\u1edbi \u0110\u01a1n v\u1ecb ki\u1ec3u m\u1eabu +edit_org_unit_prototype = Ch\u1ec9nh s\u1eeda \u0110\u01a1n v\u1ecb ki\u1ec3u m\u1eabu +orgunit_prototype_management = Qu\u1ea3n l\u00fd \u0110\u01a1n v\u1ecb ki\u1ec3u m\u1eabu +orgunit_prototype_group_management = Qu\u1ea3n l\u00fd Nh\u00f3m c\u00e1c \u0111\u01a1n v\u1ecb ki\u1ec3u m\u1eabu +create_new_orgunit_prototype_group = T\u1ea1o m\u1edbi Nh\u00f3m \u0111\u01a1n v\u1ecb ki\u1ec3u m\u1eabu +edit_orgunit_prototype_group = Ch\u1ec9nh s\u1eeda Nh\u00f3m \u0111\u01a1n v\u1ecb ki\u1ec3u m\u1eabu +available_orgunit_prototypes = C\u00e1c \u0111\u01a1n v\u1ecb ki\u1ec3u m\u1eabu hi\u1ec7n c\u00f3 +create_multi_org_unit = T\u1ea1o nhi\u1ec1u \u0111\u01a1n v\u1ecb +confirm_delete_orgunit_prototype_group = B\u1ea1n c\u00f3 mu\u1ed1n x\u00f3a Nh\u00f3m \u0111\u01a1n v\u1ecb ki\u1ec3u m\u1eabu n\u00e0y ? +registers_data = D\u1eef li\u1ec7u \u0111\u01b0\u1ee3c ph\u00e9p \u0111\u0103ng k\u00fd +available_data_sets = Danh s\u00e1ch t\u1eadp d\u1eef li\u1ec7u hi\u1ec7n c\u00f3 +selected_data_sets = Danh s\u00e1ch t\u1eadp d\u1eef li\u1ec7u \u0111\u01b0\u1ee3c ch\u1ecdn +select_group = Ch\u1ecdn Nh\u00f3m \u0111\u01a1n v\u1ecb +add_multi_organisation_unit = T\u1ea1o nhi\u1ec1u \u0111\u01a1n v\u1ecb \ No newline at end of file === modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/resources/struts.xml' --- local/vn/dhis-web-spreadsheet-reporting/src/main/resources/struts.xml 2012-08-20 09:12:03 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/resources/struts.xml 2012-08-21 08:32:18 +0000 @@ -1669,7 +1669,7 @@ F_ORGANISATIONUNITPROTOTYPE_MANAGEMENT - + /main.vm /dhis-web-spreadsheet-reporting/menu.vm @@ -1786,5 +1786,19 @@ plainTextError + + /main.vm + /dhis-web-spreadsheet-reporting/addMultiOrganisationUnitForm.vm + /dhis-web-spreadsheet-reporting/menuWithTree.vm + F_MULTI_ORGANISATION_UNIT_ADD + + + + administration.action + F_MULTI_ORGANISATION_UNIT_ADD + + \ No newline at end of file === added file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/addMultiOrganisationUnitForm.vm' --- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/addMultiOrganisationUnitForm.vm 1970-01-01 00:00:00 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/addMultiOrganisationUnitForm.vm 2012-08-21 08:32:18 +0000 @@ -0,0 +1,174 @@ + + +

$i18n.getString( "create_multi_org_unit" ) #openHelp( "ou_edit" )

+ +
+ + + + + + + + + + + + + + + + + + + +
$i18n.getString( "available_orgunit_prototypes" )$i18n.getString( "group_members" )
+ + +
+
+
+ +
+ + +
+ + + + + + + + + + + + + + +
$i18n.getString( "details" )
+ +
+ +#tblDynamicAttributes( { "attributes": $attributes } ) + + + + + + + + + + + + + + + + + + + + + + + + + + #foreach ( $groupSet in $groupSets ) + + + + + #end +
$i18n.getString( "data_sets" )
+ + +
+
$i18n.getString( "organisation_unit_groups" )
$encoder.htmlEncode( $groupSet.name ) + +
+ +

+ + +

+ +
+ + \ No newline at end of file === modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/addOrgUnitPrototypeForm.vm' --- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/addOrgUnitPrototypeForm.vm 2012-08-20 07:13:48 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/addOrgUnitPrototypeForm.vm 2012-08-21 08:32:18 +0000 @@ -11,7 +11,7 @@ -

$i18n.getString( "create_new_organisationunitprototype" )

+

$i18n.getString( "create_new_orgunit_prototype" )

=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/addOrgUnitPrototypeGroupForm.vm' --- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/addOrgUnitPrototypeGroupForm.vm 2012-08-20 07:13:48 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/addOrgUnitPrototypeGroupForm.vm 2012-08-21 08:32:18 +0000 @@ -3,8 +3,9 @@ validation2('addOrgUnitPrototypeGroupForm', function ( form ) { form.submit(); }, { - 'beforeValidateHandler' : function () { - beforeSubmit(); + 'beforeValidateHandler' : function () + { + listValidator( 'memberValidator', 'groupMembers' ); }, 'rules' : getValidationRules( "orgUnitPrototypeGroup" ) }); @@ -32,6 +33,9 @@ "alphanumericwithbasicpuncspaces" : true, "notOnlyDigits" : true, "rangelength" : [ 2, 160 ] + }, + "memberValidator" : { + "required" : true } } }; @@ -58,7 +62,7 @@ - $i18n.getString( "available_orgunit_prototype" ) + $i18n.getString( "available_orgunit_prototypes" ) $i18n.getString( "group_members" ) @@ -77,6 +81,7 @@ + === modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonOrganisationUnitPrototypes.vm' --- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonOrganisationUnitPrototypes.vm 2012-08-20 07:13:48 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/jsonOrganisationUnitPrototypes.vm 2012-08-21 08:32:18 +0000 @@ -3,10 +3,11 @@ "orgUnitPrototypes": [ #foreach( $orgUnitPrototype in $!organisationUnitPrototypes ) { + #set( $groups = $!orgUnitPrototype.groups ) "id": "${orgUnitPrototype.id}", "name": "$!encoder.jsonEncode( ${orgUnitPrototype.displayName} )", "shortName": "$!encoder.jsonEncode( ${orgUnitPrototype.displayShortName} )", - "groups": [ #foreach( $group in $orgUnitPrototype.groups )${group.id}#if( $velocityCount < $groups.size() ),#end#end ] + "groups": [ #foreach( $group in $groups )${group.id}#if( $velocityCount < $groups.size() ),#end#end ] }#if( $velocityCount < $size ),#end #end ] === removed file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/updateOrgPrototypeForm.vm' --- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/updateOrgPrototypeForm.vm 2012-08-20 07:13:48 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/updateOrgPrototypeForm.vm 1970-01-01 00:00:00 +0000 @@ -1,54 +0,0 @@ - - -

$i18n.getString( "edit_constant" )

- - - - - - - - - - - - - - - - - - - - -
$i18n.getString( "details" )
-
-
- - \ No newline at end of file === added file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/updateOrgUnitPrototypeForm.vm' --- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/updateOrgUnitPrototypeForm.vm 1970-01-01 00:00:00 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/updateOrgUnitPrototypeForm.vm 2012-08-21 08:32:18 +0000 @@ -0,0 +1,54 @@ + + +

$i18n.getString( "edit_org_unit_prototype" )

+ +
+ + + + + + + + + + + + + + + + + + +
$i18n.getString( "details" )
+
+
+ + \ No newline at end of file === modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/updateOrgUnitPrototypeGroupForm.vm' --- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/updateOrgUnitPrototypeGroupForm.vm 2012-08-20 07:13:48 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/updateOrgUnitPrototypeGroupForm.vm 2012-08-21 08:32:18 +0000 @@ -55,7 +55,7 @@ - $i18n.getString( "available_data_elements" ) + $i18n.getString( "available_orgunit_prototypes" ) $i18n.getString( "group_members" ) === modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/viewAdministrator.vm' --- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/viewAdministrator.vm 2012-08-20 10:06:25 +0000 +++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/viewAdministrator.vm 2012-08-21 08:32:18 +0000 @@ -20,6 +20,7 @@ #introListImgItem( "openOptionComboAssociations.action" "define_categoryoptioncombo_associations" "dhis-web-maintenance-datadictionary" ) #introListImgItem( "orgUnitPrototype.action" "organisation_unit_prototype" "organisationunit" ) #introListImgItem( "orgUnitPrototypeGroup.action" "organisation_unit_prototype_group" "organisationunit" ) + #introListImgItem( "showAddMultiOrganisationUnit.action" "add_multi_organisation_unit" "organisationunit" )