Commit b92e6752 by Kunj

UOFLMA-133:Fixed - Make Name,User ID and Email fields read only in dynamic forms.

parent da001a90
...@@ -406,12 +406,15 @@ public class CatalogueVariableScreen extends AppCompatActivity { ...@@ -406,12 +406,15 @@ public class CatalogueVariableScreen extends AppCompatActivity {
if(catalogueVariable.getName().equals(getString(R.string.catalogue_user_full_name))) { if(catalogueVariable.getName().equals(getString(R.string.catalogue_user_full_name))) {
String userFullName = PrefManager.getSharedPref(CatalogueVariableScreen.this, PrefManager.PREFERENCE_USER_FULL_NAME); String userFullName = PrefManager.getSharedPref(CatalogueVariableScreen.this, PrefManager.PREFERENCE_USER_FULL_NAME);
((EditText)controlView).setText(userFullName); ((EditText)controlView).setText(userFullName);
((EditText)controlView).setEnabled(false);
} else if(catalogueVariable.getName().equals(getString(R.string.catalogue_user_id))) { } else if(catalogueVariable.getName().equals(getString(R.string.catalogue_user_id))) {
String userId = PrefManager.getSharedPref(CatalogueVariableScreen.this, PrefManager.PREFERENCE_USER_ID); String userId = PrefManager.getSharedPref(CatalogueVariableScreen.this, PrefManager.PREFERENCE_USER_ID);
((EditText)controlView).setText(userId); ((EditText)controlView).setText(userId);
((EditText)controlView).setEnabled(false);
} else if(catalogueVariable.getName().equals(getString(R.string.catalogue_user_email_id))) { } else if(catalogueVariable.getName().equals(getString(R.string.catalogue_user_email_id))) {
String emailId = PrefManager.getSharedPref(CatalogueVariableScreen.this, PrefManager.PREFERENCE_USER_EMAIL_ID); String emailId = PrefManager.getSharedPref(CatalogueVariableScreen.this, PrefManager.PREFERENCE_USER_EMAIL_ID);
((EditText)controlView).setText(emailId); ((EditText)controlView).setText(emailId);
((EditText)controlView).setEnabled(false);
} }
if (viewType == ViewType.DATE) { if (viewType == ViewType.DATE) {
controlView.setOnClickListener(dateListener); controlView.setOnClickListener(dateListener);
......
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