Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Krishna Vemulavada
/
vera_2.1_app
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8dbc84fc
authored
Dec 27, 2016
by
Kunj
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
UOFLMA-130: Fixed - Please make email field as pre-filled in all forms.
parent
2fa384a9
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
0 deletions
app/src/main/java/com/vsoft/uoflservicenow/CatalogueApplication.java
app/src/main/java/com/vsoft/uoflservicenow/db/models/UserApiValues.java
app/src/main/java/com/vsoft/uoflservicenow/ui/CatalogueVariableScreen.java
app/src/main/java/com/vsoft/uoflservicenow/ui/HomeScreen.java
app/src/main/java/com/vsoft/uoflservicenow/ui/LoginScreen.java
app/src/main/java/com/vsoft/uoflservicenow/utils/PrefManager.java
app/src/main/res/values/strings.xml
app/src/main/java/com/vsoft/uoflservicenow/CatalogueApplication.java
View file @
8dbc84fc
...
@@ -40,6 +40,7 @@ public class CatalogueApplication extends Application {
...
@@ -40,6 +40,7 @@ public class CatalogueApplication extends Application {
PrefManager
.
setSharedPref
(
CatalogueApplication
.
this
,
PrefManager
.
PREFERENCE_FIRST_NAME
,
""
);
PrefManager
.
setSharedPref
(
CatalogueApplication
.
this
,
PrefManager
.
PREFERENCE_FIRST_NAME
,
""
);
PrefManager
.
setSharedPref
(
CatalogueApplication
.
this
,
PrefManager
.
PREFERENCE_USER_ID
,
""
);
PrefManager
.
setSharedPref
(
CatalogueApplication
.
this
,
PrefManager
.
PREFERENCE_USER_ID
,
""
);
PrefManager
.
setSharedPref
(
CatalogueApplication
.
this
,
PrefManager
.
PREFERENCE_USER_FULL_NAME
,
""
);
PrefManager
.
setSharedPref
(
CatalogueApplication
.
this
,
PrefManager
.
PREFERENCE_USER_FULL_NAME
,
""
);
PrefManager
.
setSharedPref
(
CatalogueApplication
.
this
,
PrefManager
.
PREFERENCE_USER_EMAIL_ID
,
""
);
Intent
loginIntent
=
new
Intent
(
CatalogueApplication
.
this
,
LoginScreen
.
class
);
Intent
loginIntent
=
new
Intent
(
CatalogueApplication
.
this
,
LoginScreen
.
class
);
loginIntent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
|
Intent
.
FLAG_ACTIVITY_CLEAR_TASK
);
loginIntent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
|
Intent
.
FLAG_ACTIVITY_CLEAR_TASK
);
startActivity
(
loginIntent
);
startActivity
(
loginIntent
);
...
...
app/src/main/java/com/vsoft/uoflservicenow/db/models/UserApiValues.java
View file @
8dbc84fc
...
@@ -28,6 +28,10 @@ public class UserApiValues {
...
@@ -28,6 +28,10 @@ public class UserApiValues {
@Expose
@Expose
private
String
userId
;
private
String
userId
;
@SerializedName
(
"email"
)
@Expose
private
String
userEmailId
;
public
String
getFirstName
()
{
public
String
getFirstName
()
{
return
firstName
;
return
firstName
;
}
}
...
@@ -67,4 +71,12 @@ public class UserApiValues {
...
@@ -67,4 +71,12 @@ public class UserApiValues {
public
void
setUserId
(
String
userId
)
{
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
;
this
.
userId
=
userId
;
}
}
public
String
getUserEmailId
()
{
return
userEmailId
;
}
public
void
setUserEmailId
(
String
userEmailId
)
{
this
.
userEmailId
=
userEmailId
;
}
}
}
app/src/main/java/com/vsoft/uoflservicenow/ui/CatalogueVariableScreen.java
View file @
8dbc84fc
...
@@ -409,6 +409,9 @@ public class CatalogueVariableScreen extends AppCompatActivity {
...
@@ -409,6 +409,9 @@ public class CatalogueVariableScreen extends AppCompatActivity {
}
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
);
}
else
if
(
catalogueVariable
.
getName
().
equals
(
getString
(
R
.
string
.
catalogue_user_email_id
)))
{
String
emailId
=
PrefManager
.
getSharedPref
(
CatalogueVariableScreen
.
this
,
PrefManager
.
PREFERENCE_USER_EMAIL_ID
);
((
EditText
)
controlView
).
setText
(
emailId
);
}
}
if
(
viewType
==
ViewType
.
DATE
)
{
if
(
viewType
==
ViewType
.
DATE
)
{
controlView
.
setOnClickListener
(
dateListener
);
controlView
.
setOnClickListener
(
dateListener
);
...
...
app/src/main/java/com/vsoft/uoflservicenow/ui/HomeScreen.java
View file @
8dbc84fc
...
@@ -75,6 +75,7 @@ public class HomeScreen extends AppCompatActivity {
...
@@ -75,6 +75,7 @@ public class HomeScreen extends AppCompatActivity {
PrefManager
.
setSharedPref
(
HomeScreen
.
this
,
PrefManager
.
PREFERENCE_FIRST_NAME
,
""
);
PrefManager
.
setSharedPref
(
HomeScreen
.
this
,
PrefManager
.
PREFERENCE_FIRST_NAME
,
""
);
PrefManager
.
setSharedPref
(
HomeScreen
.
this
,
PrefManager
.
PREFERENCE_USER_ID
,
""
);
PrefManager
.
setSharedPref
(
HomeScreen
.
this
,
PrefManager
.
PREFERENCE_USER_ID
,
""
);
PrefManager
.
setSharedPref
(
HomeScreen
.
this
,
PrefManager
.
PREFERENCE_USER_FULL_NAME
,
""
);
PrefManager
.
setSharedPref
(
HomeScreen
.
this
,
PrefManager
.
PREFERENCE_USER_FULL_NAME
,
""
);
PrefManager
.
setSharedPref
(
HomeScreen
.
this
,
PrefManager
.
PREFERENCE_USER_EMAIL_ID
,
""
);
Intent
loginIntent
=
new
Intent
(
HomeScreen
.
this
,
LoginScreen
.
class
);
Intent
loginIntent
=
new
Intent
(
HomeScreen
.
this
,
LoginScreen
.
class
);
loginIntent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
|
Intent
.
FLAG_ACTIVITY_CLEAR_TASK
);
loginIntent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
|
Intent
.
FLAG_ACTIVITY_CLEAR_TASK
);
startActivity
(
loginIntent
);
startActivity
(
loginIntent
);
...
...
app/src/main/java/com/vsoft/uoflservicenow/ui/LoginScreen.java
View file @
8dbc84fc
...
@@ -184,6 +184,7 @@ public class LoginScreen extends Activity {
...
@@ -184,6 +184,7 @@ public class LoginScreen extends Activity {
String
userFullName
=
mUserDetails
.
get
(
0
).
getFullName
();
String
userFullName
=
mUserDetails
.
get
(
0
).
getFullName
();
String
userId
=
mUserDetails
.
get
(
0
).
getUserId
();
String
userId
=
mUserDetails
.
get
(
0
).
getUserId
();
String
userEmailId
=
mUserDetails
.
get
(
0
).
getUserEmailId
();
PrefManager
.
setSharedPref
(
LoginScreen
.
this
,
PrefManager
.
PREFERENCE_FIRST_NAME
,
firstName
);
PrefManager
.
setSharedPref
(
LoginScreen
.
this
,
PrefManager
.
PREFERENCE_FIRST_NAME
,
firstName
);
PrefManager
.
setSharedPref
(
LoginScreen
.
this
,
PrefManager
.
PREFERENCE_LAST_NAME
,
lastName
);
PrefManager
.
setSharedPref
(
LoginScreen
.
this
,
PrefManager
.
PREFERENCE_LAST_NAME
,
lastName
);
...
@@ -191,6 +192,7 @@ public class LoginScreen extends Activity {
...
@@ -191,6 +192,7 @@ public class LoginScreen extends Activity {
/*For prefill value in variable form*/
/*For prefill value in variable form*/
PrefManager
.
setSharedPref
(
LoginScreen
.
this
,
PrefManager
.
PREFERENCE_USER_FULL_NAME
,
userFullName
);
PrefManager
.
setSharedPref
(
LoginScreen
.
this
,
PrefManager
.
PREFERENCE_USER_FULL_NAME
,
userFullName
);
PrefManager
.
setSharedPref
(
LoginScreen
.
this
,
PrefManager
.
PREFERENCE_USER_ID
,
userId
);
PrefManager
.
setSharedPref
(
LoginScreen
.
this
,
PrefManager
.
PREFERENCE_USER_ID
,
userId
);
PrefManager
.
setSharedPref
(
LoginScreen
.
this
,
PrefManager
.
PREFERENCE_USER_EMAIL_ID
,
userEmailId
);
startActivity
(
new
Intent
(
LoginScreen
.
this
,
HomeScreen
.
class
));
startActivity
(
new
Intent
(
LoginScreen
.
this
,
HomeScreen
.
class
));
finish
();
finish
();
...
...
app/src/main/java/com/vsoft/uoflservicenow/utils/PrefManager.java
View file @
8dbc84fc
...
@@ -15,6 +15,7 @@ public class PrefManager {
...
@@ -15,6 +15,7 @@ public class PrefManager {
public
static
final
String
PREFERENCE_SYS_ID
=
"sysId"
;
public
static
final
String
PREFERENCE_SYS_ID
=
"sysId"
;
public
static
final
String
PREFERENCE_USER_FULL_NAME
=
"full_name"
;
public
static
final
String
PREFERENCE_USER_FULL_NAME
=
"full_name"
;
public
static
final
String
PREFERENCE_USER_ID
=
"user_id"
;
public
static
final
String
PREFERENCE_USER_ID
=
"user_id"
;
public
static
final
String
PREFERENCE_USER_EMAIL_ID
=
"user_email_id"
;
/*Access Token */
/*Access Token */
public
static
final
String
PREFERENCE_LOGIN_VALUES_KEY
=
"LoginPrefs"
;
public
static
final
String
PREFERENCE_LOGIN_VALUES_KEY
=
"LoginPrefs"
;
...
...
app/src/main/res/values/strings.xml
View file @
8dbc84fc
...
@@ -99,6 +99,7 @@
...
@@ -99,6 +99,7 @@
<!--Catalogue Variable form screen - key for pre fill value-->
<!--Catalogue Variable form screen - key for pre fill value-->
<string
name=
"catalogue_user_full_name"
>
full_name
</string>
<string
name=
"catalogue_user_full_name"
>
full_name
</string>
<string
name=
"catalogue_user_id"
>
user_id
</string>
<string
name=
"catalogue_user_id"
>
user_id
</string>
<string
name=
"catalogue_user_email_id"
>
email_address
</string>
<!--Home Screen-->
<!--Home Screen-->
<string
name=
"home_screen_logout_confirmation_msg_string"
>
Are you sure you want to logout?
</string>
<string
name=
"home_screen_logout_confirmation_msg_string"
>
Are you sure you want to logout?
</string>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment