dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #30528
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15491: Notificating in org unit level screen when no levels have been saved yet
------------------------------------------------------------
revno: 15491
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2014-06-01 13:31:40 +0200
message:
Notificating in org unit level screen when no levels have been saved yet
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/saveOrganisationUnitLevelForm.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-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module.properties 2013-12-30 09:44:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/resources/org/hisp/dhis/oum/i18n_module.properties 2014-06-01 11:31:40 +0000
@@ -106,4 +106,5 @@
name_code_identifier=Name, code or identifier
identifier=Identifier
short_name_in_use=The short name is already in use. Please choose a different short name
-show_all_sections = Show all sections
\ No newline at end of file
+show_all_sections = Show all sections
+org_unit_levels_not_yet_saved=Organisation unit level is not yet saved, please save
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/saveOrganisationUnitLevelForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/saveOrganisationUnitLevelForm.vm 2013-01-28 07:33:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/saveOrganisationUnitLevelForm.vm 2014-06-01 11:31:40 +0000
@@ -1,7 +1,15 @@
<script type="text/javascript">
- jQuery(document).ready( function(){
- validation( 'saveOrganisationUnitLevelsForm', function( form ){ form.submit() } );
- });
+var i18n_org_unit_levels_not_yet_saved = '$encoder.jsEscape( $i18n.getString( "org_unit_levels_not_yet_saved" ) , "'" )';
+
+jQuery(document).ready( function(){
+ validation( 'saveOrganisationUnitLevelsForm', function( form ){ form.submit() } );
+
+ jQuery.getJSON( '../api/organisationUnitLevels.json?paging=false', function( data ) {
+ if ( !data || !data.organisationUnitLevels || !data.organisationUnitLevels ) {
+ setMessage( 'Organisation unit level is not yet saved, please save' );
+ }
+ } );
+});
</script>
<h3>$i18n.getString( "organisation_unit_level_management" ) #openHelp( "ou_level" )</h3>
@@ -23,8 +31,12 @@
#end
<tr>
<td></td>
- <td><input type="submit" value="$i18n.getString( 'save' )" style="width:10em"/><input
- type="button" value="$i18n.getString( 'cancel' )" onclick="javascript:window.location.href='index.action'" style="width:10em"/></td>
+ <td>
+ <input type="submit" value="$i18n.getString( 'save' )" style="width:10em"/>
+ <input type="button" value="$i18n.getString( 'cancel' )" onclick="javascript:window.location.href='index.action'" style="width:10em"/>
+ </td>
</tr>
</table>
</form>
+
+<span id="message"></span>
\ No newline at end of file