Commit b73ee666 by Kunj Gupta

UOFLMA-112: Fix - When we click OK on "Failed to submit form", do not exit form.

parent f288a9f7
......@@ -194,7 +194,7 @@ public class CatalogueVariableScreen extends AppCompatActivity {
createView();
}
} else {
showErrorDialog(R.string.failed_to_fetch_catalogue_form_string);
showFetchVariableErrorDialog(R.string.failed_to_fetch_catalogue_form_string);
}
}
}
......@@ -596,7 +596,7 @@ public class CatalogueVariableScreen extends AppCompatActivity {
if(syncStatus == SyncStatus.SUCCESS) {
showSubmissionDialog();
} else {
showErrorDialog(R.string.failed_to_submit_form_string);
showSubmitErrorDialog(R.string.failed_to_submit_form_string);
}
}
}
......@@ -619,12 +619,13 @@ public class CatalogueVariableScreen extends AppCompatActivity {
alert.show();
}
private void showErrorDialog(int message) {
private void showFetchVariableErrorDialog(int message) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(message)
.setCancelable(false)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.dismiss();
finish();
}
});
......@@ -632,6 +633,19 @@ public class CatalogueVariableScreen extends AppCompatActivity {
alert.show();
}
private void showSubmitErrorDialog(int message) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(message)
.setCancelable(false)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.dismiss();
}
});
AlertDialog alert = builder.create();
alert.show();
}
private String getMonth(int month) {
return Constants.month[month];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment