File tree Expand file tree Collapse file tree
source-code/app/src/main/java/org/buildmlearn/toolkit/activity Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package org .buildmlearn .toolkit .activity ;
22
33import android .Manifest ;
4-
54import android .app .Dialog ;
65import android .app .ProgressDialog ;
7- import android .content .DialogInterface ;
8- import android .support .v7 .app .AlertDialog ;
96import android .content .Context ;
10-
7+ import android . content . DialogInterface ;
118import android .content .Intent ;
129import android .content .SharedPreferences ;
1310import android .content .pm .PackageManager ;
3936import android .widget .ListView ;
4037import android .widget .TextView ;
4138import android .widget .Toast ;
39+
4240import org .buildmlearn .toolkit .R ;
4341import org .buildmlearn .toolkit .ToolkitApplication ;
4442import org .buildmlearn .toolkit .constant .Constants ;
@@ -824,6 +822,10 @@ private String saveDraft() {
824822 Toast .makeText (this , "Unable to perform action: No Data" , Toast .LENGTH_SHORT ).show ();
825823 return null ;
826824 }
825+ if (selectedTemplate .getItems (doc ).get (0 ).getTagName ().equals ("item" ) && (templateId == 5 || templateId == 7 )) {
826+ Toast .makeText (this , "Unable to perform action: No Meta Details" , Toast .LENGTH_SHORT ).show ();
827+ return null ;
828+ }
827829 for (Element item : selectedTemplate .getItems (doc )) {
828830 dataElement .appendChild (item );
829831 }
You can’t perform that action at this time.
0 commit comments