dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18237
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7618: (mobile) minor changes
------------------------------------------------------------
revno: 7618
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-07-16 12:20:08 +0300
message:
(mobile) minor changes
modified:
dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetRepeatableEventRegistrationFormAction.java
dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/SaveRepeatableEventAction.java
dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties
dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/repeatableEventRegistrationForm.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-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetRepeatableEventRegistrationFormAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetRepeatableEventRegistrationFormAction.java 2012-07-11 09:13:18 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/GetRepeatableEventRegistrationFormAction.java 2012-07-16 09:20:08 +0000
@@ -26,14 +26,13 @@
*/
package org.hisp.dhis.light.namebaseddataentry.action;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-
+import com.opensymphony.xwork2.Action;
import org.hisp.dhis.program.ProgramInstanceService;
import org.hisp.dhis.program.ProgramStage;
import org.hisp.dhis.program.ProgramStageService;
-import com.opensymphony.xwork2.Action;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
public class GetRepeatableEventRegistrationFormAction
implements Action
@@ -131,7 +130,7 @@
}
private String defaultDueDate;
-
+
public String getDefaultDueDate()
{
return defaultDueDate;
@@ -151,10 +150,13 @@
Calendar cal = Calendar.getInstance();
int standardIntervalDay = 0;
- if (programStage.getStandardInterval() != null) {
+
+ if ( programStage.getStandardInterval() != null )
+ {
standardIntervalDay = programStage.getStandardInterval();
}
- cal.add( Calendar.DATE, standardIntervalDay);
+
+ cal.add( Calendar.DATE, standardIntervalDay );
defaultDueDate = new SimpleDateFormat( "yyyy-MM-dd" ).format( cal.getTime() );
return SUCCESS;
}
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/SaveRepeatableEventAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/SaveRepeatableEventAction.java 2012-05-31 09:37:26 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/SaveRepeatableEventAction.java 2012-07-16 09:20:08 +0000
@@ -161,7 +161,6 @@
public String execute()
throws Exception
{
-
ProgramStageInstance currentStageInstance = programStageInstanceService
.getProgramStageInstance( currentProgramStageInstanceId );
DateTimeFormatter sdf = ISODateTimeFormat.yearMonthDay();
@@ -185,6 +184,7 @@
programStageInstance.setProgramStage( programStage );
programStageInstance.setStageInProgram( currentStageInstance.getStageInProgram() );
programStageInstanceService.addProgramStageInstance( programStageInstance );
+
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties 2012-07-16 08:15:37 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties 2012-07-16 09:20:08 +0000
@@ -85,6 +85,9 @@
tracking_menu=Tracking Menu
due_date=Due Date
register_due_date_for=Register Due Date For
+schedule=Schedule
+schedule_visit=Schedule Visit
+do_not_schedule_visit=Do Not Schedule Visit
register=Register
please_select=Please Select
enroll_in_program=Enroll In Program
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/repeatableEventRegistrationForm.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/repeatableEventRegistrationForm.vm 2012-07-11 09:13:18 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/namebased/repeatableEventRegistrationForm.vm 2012-07-16 09:20:08 +0000
@@ -1,30 +1,35 @@
-<h2>$i18n.getString( "register_due_date_for" ) $programStage.getName()</h2>
+<h2>$i18n.getString( "schedule" ) $programStage.getName()</h2>
<form action="saveRepeatableEvent.action" method="POST">
<div class="header-box" align="center">
-<input type="hidden" name="programInstanceId" value="$programInstanceId"/>
-<input type="hidden" name="programStageId" value="$programStageId"/>
-<input type="hidden" name="currentProgramStageInstanceId" value="$currentProgramStageInstanceId"/>
- <p style="text-align: left;">
- <label>$i18n.getString( "due_date" ) [yyyy-MM-dd] </label>
- #if( $validationMap.get( "enrollmentDate" ) )
- <br /><span style="color: #990000;"> $i18n.getString($validationMap.get( "dueDate" ))</span>
- #end
- <input type="text" name="nextDueDate" value="#if($previousValues.get("dueDate"))$previousValues.get("dueDate")#else$defaultDueDate#end" />
- </p>
+ <input type="hidden" name="programInstanceId" value="$programInstanceId"/>
+ <input type="hidden" name="programStageId" value="$programStageId"/>
+ <input type="hidden" name="currentProgramStageInstanceId" value="$currentProgramStageInstanceId"/>
+
+ <p style="text-align: left;">
+ <label>$i18n.getString( "due_date" ) [yyyy-MM-dd] </label>
+ #if( $validationMap.get( "enrollmentDate" ) )
+ <br/><span style="color: #990000;"> $i18n.getString($validationMap.get( "dueDate" ))</span>
+ #end
+ <input type="text" name="nextDueDate"
+ value="#if($previousValues.get("dueDate"))$previousValues.get("dueDate")#else$defaultDueDate#end"/>
+ </p>
</div>
<div class="header-box" align="center">
- <p>
- <input type="submit" style="width: 100%;" value="$i18n.getString("register")" />
- </p>
+<p><input type="submit" style="width: 100%;" value="$i18n.getString("schedule_visit")"/></p>
+</form>
+
+<form action="showPatientProgramList.action">
+<input type="hidden" name="patientId" value="$patientId"/>
+<p><input type="submit" style="width: 100%;" value="$i18n.getString("do_not_schedule_visit")"/></p>
+</form>
</div>
-</form>
<div id="footer">
-<h2>$i18n.getString( "navigate_to" )</h2>
-<ul>
- <li> <a href="showPatientProgramList.action?patientId=$patient.getId()"> $i18n.getString("program_list")</a> </li>
- <li><a href="index.action">$i18n.getString("home")</a></li>
-</ul>
+ <h2>$i18n.getString( "navigate_to" )</h2>
+ <ul>
+ <li><a href="showPatientProgramList.action?patientId=$patientId"> $i18n.getString("program_list")</a></li>
+ <li><a href="index.action">$i18n.getString("home")</a></li>
+ </ul>
</div>