-
-
Notifications
You must be signed in to change notification settings - Fork 45
CCCT-467 || User Payment Info #2912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
84576f8
a127223
fb22bb4
3cba3ea
3d8e8d6
269f0f1
b3de0d8
01c5b81
9826d41
15981b7
630fc78
475428b
c8ae94a
8d23e74
a3453d5
4bf277b
ca7c9bb
4317d50
7d45fa5
8365404
4c25fab
1650861
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,167 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| xmlns:app="http://schemas.android.com/apk/res-auto" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| xmlns:tools="http://schemas.android.com/tools" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="match_parent" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="match_parent" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:background="@color/connect_background_color" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:padding="16dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tools:context="org.commcare.fragments.connect.ConnectPaymentSetupFragment"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <org.commcare.views.connect.connecttextview.ConnectRegularTextView | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/connectMediumTextView" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="match_parent" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:textSize="14sp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:letterSpacing="0.08" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:text="@string/connect_payment_info_description" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:textColor="@color/black" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintEnd_toEndOf="parent" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintStart_toStartOf="parent" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintTop_toTopOf="parent" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <LinearLayout | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/name_layout" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="match_parent" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginTop="24dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:gravity="start" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:orientation="horizontal" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintEnd_toEndOf="parent" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintStart_toStartOf="parent" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintTop_toBottomOf="@+id/connectMediumTextView"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <LinearLayout | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="42dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="42dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:background="@drawable/connect_side_icon_bg" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginTop="6dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:gravity="center"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <ImageView | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:padding="1dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:src="@drawable/ic_outline_person_24" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </LinearLayout> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <com.google.android.material.textfield.TextInputEditText | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/nameTextValue" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="match_parent" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="55dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginLeft="16dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:background="@drawable/connect_edit_text_bg" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:hint="@string/connect_payment_info_name_hint" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:imeOptions="actionNext" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:paddingStart="16dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:textColorHint="@color/connect_grey" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tools:ignore="RtlSymmetry" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </LinearLayout> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <LinearLayout | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/phone_layout" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="match_parent" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginTop="16dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:orientation="horizontal" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintTop_toBottomOf="@+id/name_layout" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tools:layout_editor_absoluteX="16dp"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <LinearLayout | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="42dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="42dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:background="@drawable/connect_side_icon_bg" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginTop="6dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:gravity="center"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <ImageView | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:padding="1dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:src="@drawable/ic_outline_phone_24" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </LinearLayout> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <LinearLayout | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="match_parent" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:orientation="vertical"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <LinearLayout | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="match_parent" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginStart="16dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:background="@drawable/connect_edit_text_bg" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:padding="0dp"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <EditText | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/countryCode" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="64dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="55dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:background="@null" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:gravity="center" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:hint="@string/connect_phone_country_code_default" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:inputType="number" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:text="@string/connect_phone_country_code_default" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:textColorHint="@color/connect_grey" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <View | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="1dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="match_parent" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginVertical="10dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:background="@color/connect_blue_color_10" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <AutoCompleteTextView | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/connect_primary_phone_input" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="fill_parent" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="55dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:background="@null" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:digits="1234567890" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:focusable="true" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:focusableInTouchMode="true" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:hint="@string/connect_phone_number_hint" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:inputType="numberDecimal" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. any reason |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:paddingStart="16dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:textAlignment="textStart" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:textColorHint="@color/connect_grey" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tools:ignore="RtlSymmetry" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+115
to
+128
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Improve phone number input validation. The phone number input field needs stronger validation constraints. Apply these changes: <AutoCompleteTextView
android:id="@+id/connect_primary_phone_input"
- android:digits="1234567890"
+ android:digits="0123456789"
+ android:maxLength="15"
android:inputType="phone"
+ android:imeOptions="actionDone"
... />📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </LinearLayout> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <org.commcare.views.connect.connecttextview.ConnectMediumTextView | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/errorTextView" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:paddingStart="16dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:paddingTop="4dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:textColor="@android:color/holo_red_light" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:textSize="14sp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:visibility="gone" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </LinearLayout> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </LinearLayout> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <org.commcare.views.connect.connecttextview.ConnectRegularTextView | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/connectPaymentInfoNextStepText" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="match_parent" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginTop="10dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:textSize="14sp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:letterSpacing="0.08" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:text="@string/connect_verify_payment_phone_message" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:textColor="@color/black" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintEnd_toEndOf="parent" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintStart_toStartOf="parent" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintTop_toBottomOf="@id/phone_layout" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <com.google.android.material.button.MaterialButton | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/continue_button" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| style="@style/CustomButtonStyle" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginTop="24dp" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:layout_gravity="end" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| android:text="@string/connect_payment_info_next" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintEnd_toEndOf="parent" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintTop_toBottomOf="@+id/connectPaymentInfoNextStepText" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </androidx.constraintlayout.widget.ConstraintLayout> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,8 @@ | |
| <string name="ConnectClaimJobURL">https://%s/api/opportunity/%d/claim</string> | ||
| <string name="ConnectDeliveriesURL">https://%s/api/opportunity/%d/delivery_progress</string> | ||
| <string name="ConnectPaymentConfirmationURL">https://%s/api/payment/%s/confirm</string> | ||
| <string name="ConnectPaymentPhoneNumberURL">https://connectid.dimagi.com/users/profile/payment_phone_number</string> | ||
| <string name="ConnectConfirmPaymentOtpURL">https://connectid.dimagi.com/users/profile/confirm_payment_otp</string> | ||
|
Comment on lines
+25
to
+26
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. think these should be relative urls to host so that we can easily configure host separately. (eg. prod vs staging) |
||
|
|
||
| <!-- Connect Messaging URLs--> | ||
| <string name="ConnectMessageRetrieveMessagesURL">https://connectid.dimagi.com/messaging/retrieve_messages/</string> | ||
|
|
@@ -479,8 +481,6 @@ | |
| <string name="connect_pin_verify_forgot">Forgot Code</string> | ||
| <string name="connect_recovery_title">ConnectID Recovery</string> | ||
|
|
||
|
|
||
|
|
||
| <string name="connect_recovery_decision_new">Choose a step below</string> | ||
| <string name="connect_recovery_button_new">Create New ConnectID Account</string> | ||
| <string name="connect_recovery_button_recover">Recover Existing Account</string> | ||
|
|
@@ -529,12 +529,18 @@ | |
|
|
||
| <string name="connect_verify_phone_title">Verification Code</string> | ||
| <string name="connect_verify_phone_label">We attempted to send you a SMS ending with %s.</string> | ||
| <string name="connect_verify_phone_label_payment">We attempted to send you a SMS on your payment phone number.</string> | ||
| <string name="connect_verify_phone_label_secondary">We attempted to send you a SMS on your secondary phone number.</string> | ||
| <string name="connect_verify_phone_label_deactivate">In order to deactivate your account, please enter the code sent by SMS to your primary phone number.</string> | ||
| <string name="connect_verify_phone_resend">Didn\'t receive your code? Resend</string> | ||
| <string name="connect_verify_phone_error">Error verifying SMS code</string> | ||
| <string name="connect_verify_phone_resend_code">Resend Code</string> | ||
|
|
||
| <string name="connect_verify_payment_phone_title">Verification Code</string> | ||
| <string name="connect_verify_payment_phone_message">On the next screen, we\'ll send a code via SMS to the payment phone number you entered.</string> | ||
| <string name="connect_verify_payment_phone_back">Back</string> | ||
| <string name="connect_verify_payment_phone_ok">OK</string> | ||
|
|
||
| <string name="connect_verify_phone_resend_wait">Didn\'t receive your code? Resend in %d s</string> | ||
| <string name="connect_verify_phone_change">Change</string> | ||
|
|
||
|
|
@@ -778,6 +784,11 @@ | |
| <string name="connect_expired">Expired</string> | ||
| <string name="connect_job_tile_daily_limit_description">Daily Limit reached. No Payment for submitting forms</string> | ||
| <string name="connect_job_tile_daily_limit">Over Limit</string> | ||
| <string name="connect_payment_info">Payment Info</string> | ||
| <string name="connect_payment_info_description">Please confirm your exact name and phone number to receive payment</string> | ||
| <string name="connect_payment_info_name_hint">Official Name</string> | ||
| <string name="connect_payment_info_next">Next</string> | ||
| <string name="connect_payment_info_resend_otp">Resend OTP</string> | ||
| <string name="connect_job_tile_daily_visits">Daily Visits</string> | ||
| <string name="connect_appbar_title_app_lock">App Lock</string> | ||
| <string name="connect_appbar_title_password_verification">Password Verification</string> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,22 +6,22 @@ | |
| import android.content.Intent; | ||
| import android.content.IntentFilter; | ||
| import android.graphics.PorterDuff; | ||
| import android.graphics.drawable.ColorDrawable; | ||
| import android.os.Bundle; | ||
| import android.view.Menu; | ||
| import android.view.MenuItem; | ||
| import android.view.Window; | ||
|
|
||
| import com.google.common.base.Strings; | ||
|
|
||
| import org.commcare.activities.CommCareActivity; | ||
| import org.commcare.activities.CommCareVerificationActivity; | ||
| import org.commcare.android.database.connect.models.ConnectJobRecord; | ||
| import org.commcare.connect.ConnectConstants; | ||
| import org.commcare.connect.ConnectDatabaseHelper; | ||
| import org.commcare.connect.ConnectManager; | ||
| import org.commcare.connect.MessageManager; | ||
| import org.commcare.dalvik.R; | ||
| import org.commcare.fragments.connect.ConnectDownloadingFragment; | ||
| import org.commcare.fragments.connect.ConnectJobsListsFragmentDirections; | ||
| import org.commcare.fragments.connect.ConnectPaymentSetupFragment; | ||
| import org.commcare.google.services.analytics.FirebaseAnalyticsUtil; | ||
| import org.commcare.services.CommCareFirebaseMessagingService; | ||
| import org.commcare.tasks.ResourceEngineListener; | ||
|
|
@@ -144,7 +144,19 @@ public void setTitle(CharSequence title) { | |
| @Override | ||
| protected void onActivityResult(int requestCode, int resultCode, @androidx.annotation.Nullable Intent data) { | ||
| super.onActivityResult(requestCode, resultCode, data); | ||
| ConnectManager.handleFinishedActivity(this, requestCode, resultCode, data); | ||
|
|
||
| if (resultCode == RESULT_OK) { | ||
| Fragment fragment = getCurrentFragment(); | ||
|
|
||
| if(fragment instanceof ConnectPaymentSetupFragment) { | ||
| if (requestCode == ConnectConstants.CONNECTID_REQUEST_CODE) { | ||
| navController.navigate(ConnectJobsListsFragmentDirections. | ||
| actionConnectJobsListFragmentToConnectJobIntroFragment()); | ||
| } | ||
|
Comment on lines
+151
to
+155
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you describe what's happening here. I am confused as to what workflow is this code handling and why are we using |
||
| } else { | ||
| ConnectManager.handleFinishedActivity(this, requestCode, resultCode, data); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @Override | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enhance phone number input security.
The country code input field allows direct text editing which could lead to invalid input.
Apply these changes to improve input validation:
<EditText android:id="@+id/countryCode" android:layout_width="64dp" android:layout_height="55dp" - android:background="@null" + android:background="?android:attr/selectableItemBackground" - android:inputType="number" + android:inputType="phone" + android:maxLength="4" + android:digits="+0123456789" ... />📝 Committable suggestion