dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #03553
Re: [Branch ~dhis2-devs-core/dhis2/trunk] Rev 1184: fixed : disabled all input text when data set completed
2009/12/9 Lars Helge Øverland <larshelge@xxxxxxxxx>
>
> All input fields are now disabled when the complete button is clicked.
>
> Is this the behaviour we want? Should one be able to say that the form is
> "reasonably" complete and then be able to enter more data later or is the
> form "locked" when the complete button is clicked?
>
>
>
I don't like locking the datasets just because they are completely filled.
They might have outliers, typos, whatever errors that need to be corrected
later, and there might also as Lars indicates be more data to be filled in a
later stage, in addition to the "mandatory" ones that define a relatively
complete set.
Complete to be does not indicate anything on the data quality, just its
completeness and therefore should not be considered final and locked.
At least this should be made a non-default system setting that Vietnam and
others that likes this can tick. It does not sound like a default behaviour
to me.
Ola
------------
>
>
> On Wed, Dec 9, 2009 at 4:46 AM, <noreply@xxxxxxxxxxxxx> wrote:
>
>> ------------------------------------------------------------
>> revno: 1184
>> committer: Tran Thanh Tri <Tran Thanh Tri@compaq>
>> branch nick: trunk
>> timestamp: Wed 2009-12-09 10:43:38 +0700
>> message:
>> fixed : disabled all input text when data set completed
>> modified:
>>
>> dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/completeRegistration.vm
>>
>> dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/form.vm
>>
>> dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js
>>
>>
>> --
>> lp:dhis2
>> https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk<https://code.launchpad.net/%7Edhis2-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<https://code.launchpad.net/%7Edhis2-devs-core/dhis2/trunk/+edit-subscription>
>> .
>>
>> === modified file
>> 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/completeRegistration.vm'
>> ---
>> dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/completeRegistration.vm
>> 2009-03-03 16:46:36 +0000
>> +++
>> dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/completeRegistration.vm
>> 2009-12-09 03:43:38 +0000
>> @@ -26,4 +26,11 @@
>> <script type="text/javascript">
>> var i18n_confirm_complete = '$encoder.jsEscape( $i18n.getString(
>> "confirm_complete" ) , "'")';
>> var i18n_confirm_undo = '$encoder.jsEscape( $i18n.getString(
>> "confirm_undo" ) , "'")';
>> +
>> + #if( $registration || $periods.size() == 0 )
>> + disableInputField();
>> + #end
>> +
>> +
>> +
>> </script>
>>
>> === modified file
>> 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/form.vm'
>> ---
>> dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/form.vm
>> 2009-11-07 14:09:00 +0000
>> +++
>> dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/form.vm
>> 2009-12-09 03:43:38 +0000
>> @@ -6,7 +6,7 @@
>> </script>
>>
>> #parse( "/dhis-web-dataentry/select.vm" )
>> -
>> +<div id="dataEntryForm">
>> #if ( $customDataEntryFormExists && !$useDefaultForm )
>>
>> #foreach( $optionCombo in $orderdCategoryOptionCombos )
>> @@ -171,7 +171,7 @@
>> #end
>> </table>
>> #end
>> -
>> +</div>
>> #parse( "/dhis-web-dataentry/completeRegistration.vm" )
>>
>> <script type="text/javascript">
>>
>> === modified file
>> 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js'
>> ---
>> dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js
>> 2009-03-12 11:40:58 +0000
>> +++
>> dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js
>> 2009-12-09 03:43:38 +0000
>> @@ -303,6 +303,7 @@
>> document.getElementById( "undoButton" ).disabled = false;
>> document.getElementById( "dateField" ).disabled = true;
>> document.getElementById( "dateDiv" ).style.display = "none";
>> + disableInputField();
>> }
>>
>> function undoCompleteDataSet()
>> @@ -325,4 +326,25 @@
>> document.getElementById( "undoButton" ).disabled = true;
>> document.getElementById( "dateField" ).disabled = false;
>> document.getElementById( "dateDiv" ).style.display = "inline";
>> + enableInputField();
>> +}
>> +
>> +function disableInputField()
>> +{
>> + var inputList =
>> byId("dataEntryForm").getElementsByTagName("input");
>> +
>> + for(var i=0;i<inputList.length;i++){
>> + var input = inputList.item(i);
>> + input.disabled = true;
>> + }
>> +}
>> +
>> +function enableInputField()
>> +{
>> + var inputList =
>> byId("dataEntryForm").getElementsByTagName("input");
>> +
>> + for(var i=0;i<inputList.length;i++){
>> + var input = inputList.item(i);
>> + input.disabled = false;
>> + }
>> }
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs>
>> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs>
>> More help : https://help.launchpad.net/ListHelp
>>
>>
>
References