dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18977
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8098: Removed input field title from cde to reduce size
------------------------------------------------------------
revno: 8098
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2012-09-15 14:05:37 +0200
message:
Removed input field title from cde to reduce size
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java
--
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-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java 2012-09-15 11:19:46 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/DefaultDataEntryFormService.java 2012-09-15 12:05:37 +0000
@@ -27,8 +27,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import static org.hisp.dhis.dataelement.DataElement.VALUE_TYPE_BOOL;
-
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
@@ -266,9 +264,6 @@
int i = 1;
- final String codeForInputFields = " name=\"entryfield\" ";
- final String codeForSelectLists = " name=\"entryselect\" ";
-
StringBuffer sb = new StringBuffer();
Matcher inputMatcher = INPUT_PATTERN.matcher( htmlCode );
@@ -305,25 +300,14 @@
return i18n.getString( "category_option_combo_with_id" ) + ": " + optionComboId + " " + i18n.getString( "does_not_exist" );
}
+ String appendCode = "";
+
if ( dataElement.getType().equals( DataElement.VALUE_TYPE_BOOL ) )
{
inputHtml = inputHtml.replace( "input", "select" );
inputHtml = inputHtml.replaceAll( "value=\".*?\"", "" );
- }
-
- // -------------------------------------------------------------
- // Insert title info
- // -------------------------------------------------------------
-
- StringBuilder title = new StringBuilder( "title=\"" ).append( dataElement.getDisplayName() ).append( " " ).append( categoryOptionCombo.getDisplayName() ).append( "\"" );
-
- inputHtml = inputHtml.contains( EMPTY_TITLE_TAG ) ? inputHtml.replace( EMPTY_TITLE_TAG, title ) : inputHtml + " " + title;
-
- String appendCode = "";
-
- if ( dataElement.getType().equals( VALUE_TYPE_BOOL ) )
- {
- appendCode += codeForSelectLists + "tabindex=\"" + i++ + "\">";
+
+ appendCode += " name=\"entryselect\" tabindex=\"" + i++ + "\">";
appendCode += "<option value=\"\">" + i18n.getString( "no_value" ) + "</option>";
appendCode += "<option value=\"true\">" + i18n.getString( "yes" ) + "</option>";
@@ -332,7 +316,7 @@
}
else
{
- appendCode += codeForInputFields + "tabindex=\"" + i++ + "\"" + TAG_CLOSE;
+ appendCode += " name=\"entryfield\" tabindex=\"" + i++ + "\"" + TAG_CLOSE;
}
inputHtml = inputHtml.replace( TAG_CLOSE, appendCode );