dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #29404
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14847: Program. Moved attributes for visit schedule from main menu to attribute managemnet screen, doesn...
------------------------------------------------------------
revno: 14847
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-04-14 14:42:12 +0200
message:
Program. Moved attributes for visit schedule from main menu to attribute managemnet screen, doesn't deserve its own main menu entry. Fixed nullpointer vulnerability for saving of visit schedule attributes.
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/SaveAttributeInListNoProgramAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/SaveAttributeVisitScheduleAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attribute.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attributeVisitSchedule.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/index.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/menu.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-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/SaveAttributeInListNoProgramAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/SaveAttributeInListNoProgramAction.java 2014-04-04 17:43:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/SaveAttributeInListNoProgramAction.java 2014-04-14 12:42:12 +0000
@@ -28,7 +28,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import java.util.ArrayList;
import java.util.Collection;
+import java.util.List;
import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
import org.hisp.dhis.trackedentity.TrackedEntityAttributeService;
@@ -56,9 +58,9 @@
// Input/Output
// -------------------------------------------------------------------------
- private Integer[] selectedAttributeIds;
+ private List<Integer> selectedAttributeIds = new ArrayList<Integer>();
- public void setSelectedAttributeIds( Integer[] selectedAttributeIds )
+ public void setSelectedAttributeIds( List<Integer> selectedAttributeIds )
{
this.selectedAttributeIds = selectedAttributeIds;
}
@@ -73,6 +75,7 @@
Collection<TrackedEntityAttribute> attributes = attributeService.getAllTrackedEntityAttributes();
int index = 1;
+
if ( selectedAttributeIds != null )
{
for ( Integer objectId : selectedAttributeIds )
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/SaveAttributeVisitScheduleAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/SaveAttributeVisitScheduleAction.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/java/org/hisp/dhis/trackedentity/action/trackedentityattribute/SaveAttributeVisitScheduleAction.java 2014-04-14 12:42:12 +0000
@@ -28,7 +28,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import java.util.ArrayList;
import java.util.Collection;
+import java.util.List;
import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
import org.hisp.dhis.trackedentity.TrackedEntityAttributeService;
@@ -59,9 +61,9 @@
// Input/Output
// -------------------------------------------------------------------------
- private Integer[] selectedAttributeIds;
+ private List<Integer> selectedAttributeIds = new ArrayList<Integer>();
- public void setSelectedAttributeIds( Integer[] selectedAttributeIds )
+ public void setSelectedAttributeIds( List<Integer> selectedAttributeIds )
{
this.selectedAttributeIds = selectedAttributeIds;
}
@@ -76,6 +78,7 @@
Collection<TrackedEntityAttribute> attributes = attributeService.getAllTrackedEntityAttributes();
int index = 1;
+
for ( Integer attributeId : selectedAttributeIds )
{
TrackedEntityAttribute attribute = attributeService.getTrackedEntityAttribute( attributeId );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties 2014-04-04 15:09:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/org/hisp/dhis/trackedentity/i18n_module.properties 2014-04-14 12:42:12 +0000
@@ -477,6 +477,7 @@
view_template_reminder_message = View template reminder message
display_in_list_no_program = Display in list without program
manage_attributes_with_no_program = Manage attributes with no program
+manage_attributes_for_visit_schedule = Manage attributes for visit schedule
tracked_entity_attributes_displayed_in_list = Tracked entity attributes displayed in list
unique = Unique
tracked_entity = Tracked Entity
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/struts.xml 2014-04-10 13:39:37 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/resources/struts.xml 2014-04-14 12:42:12 +0000
@@ -156,7 +156,7 @@
<action name="saveAttributeVisitSchedule"
class="org.hisp.dhis.trackedentity.action.trackedentityattribute.SaveAttributeVisitScheduleAction">
- <result name="success" type="redirect">index.action</result>
+ <result name="success" type="redirect">attribute.action</result>
<param name="anyAuthorities">F_TRACKED_ENTITY_ATTRIBUTE_PUBLIC_ADD, F_TRACKED_ENTITY_ATTRIBUTE_PRIVATE_ADD</param>
</action>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attribute.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attribute.vm 2014-04-14 12:03:21 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attribute.vm 2014-04-14 12:42:12 +0000
@@ -20,7 +20,8 @@
<tr valign="bottom">
<td>
#filterDiv( "attribute" )</td>
- <span style="margin-left:2px"><a href="attributeInListNoProgram.action">$i18n.getString( "manage_attributes_with_no_program" )</a></span>
+ <span style="margin-left:2px"><a href="attributeInListNoProgram.action">$i18n.getString( "manage_attributes_with_no_program" )</a></span> |
+ <span style="margin-left:2px"><a href="attributeVisitSchedule.action">$i18n.getString( "manage_attributes_for_visit_schedule" )</a></span>
</td>
<td colspan="3" style="text-align:right"><input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddAttributeForm.action'" style="width:70px"></td>
</tr>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attributeVisitSchedule.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attributeVisitSchedule.vm 2014-02-07 20:25:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attributeVisitSchedule.vm 2014-04-14 12:42:12 +0000
@@ -42,8 +42,8 @@
</tr>
<tr>
<td colspan='2'>
- <input type="submit" value="$i18n.getString( 'save' )" />
- <input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='attributeGroup.action'"/>
+ <input type="submit" value="$i18n.getString( 'save' )" style="width:10em"/>
+ <input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='attribute.action'" style="width:10em"/>
</td>
</tr>
</table>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/index.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/index.vm 2014-02-17 16:09:10 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/index.vm 2014-04-14 12:42:12 +0000
@@ -2,7 +2,6 @@
<ul class="introList">
#introListImgItem( "attribute.action" "attribute" "patient" )
- #introListImgItem( "attributeVisitSchedule.action" "attribute_visit_schedule" "patient" )
#introListImgItem( "attributeGroup.action" "attribute_group" "patient" )
#introListImgItem( "relationshipType.action" "relationship_type" "patient" )
#introListImgItem( "trackedEntity.action" "tracked_entity" "patient" )
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/menu.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/menu.vm 2014-02-17 15:00:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/menu.vm 2014-04-14 12:42:12 +0000
@@ -1,7 +1,6 @@
<h2>$i18n.getString( "tracked_entity" )</h2>
<ul>
<li><a href="attribute.action">$i18n.getString( "tracked_entity_attribute" )</a></li>
- <li><a href="attributeVisitSchedule.action">$i18n.getString( "tracked_entity_attribute_visit_schedule" )</a></li>
<li><a href="attributeGroup.action">$i18n.getString( "tracked_entity_attribute_group" )</a></li>
<li><a href="relationshipType.action">$i18n.getString( "relationship_type" )</a></li>
<li><a href="trackedEntity.action">$i18n.getString( "tracked_entity" )</a></li>