Skip to content
Snippets Groups Projects
Unverified Commit 9c821d52 authored by Kolya Opahle's avatar Kolya Opahle Committed by GitHub
Browse files

Add Support for lower case characters in the teleTAN screen (#66)


* added support for lower case input in teleTan fragment

Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>

* Removed notice of case insensitivity from temporary strings.xml

Signed-off-by: default avatarKolya Opahle <k.opahle@sap.com>

Co-authored-by: default avatarharambasicluka <64483219+harambasicluka@users.noreply.github.com>
parent e16d2af8
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,11 @@ class SubmissionTanViewModel : ViewModel() {
private const val TAN_LENGTH = 7
private val EXCLUDED_TAN_CHARS = listOf('0', 'O', 'I', '1')
private val VALID_TAN_CHARS = ('A'..'Z').plus('0'..'9').minus(EXCLUDED_TAN_CHARS)
private val VALID_TAN_CHARS =
('a'..'z')
.plus('A'..'Z')
.plus('0'..'9')
.minus(EXCLUDED_TAN_CHARS)
}
val tan = MutableLiveData<String?>(null)
......
......@@ -15,7 +15,6 @@ import kotlinx.android.synthetic.main.view_tan_input.view.tan_input_textview_4
import kotlinx.android.synthetic.main.view_tan_input.view.tan_input_textview_5
import kotlinx.android.synthetic.main.view_tan_input.view.tan_input_textview_6
import kotlinx.android.synthetic.main.view_tan_input.view.tan_input_textview_7
import java.util.Locale
class TanInput(context: Context, attrs: AttributeSet) : FrameLayout(context, attrs) {
......@@ -46,7 +45,7 @@ class TanInput(context: Context, attrs: AttributeSet) : FrameLayout(context, att
}
private fun updateTan(text: CharSequence?) {
this.tan = text?.toString()?.toUpperCase(Locale.getDefault())
this.tan = text?.toString()
updateDigits()
notifyListener()
}
......
......@@ -382,7 +382,7 @@
<string name="submission_test_result_invalid_remove_test_button">Test entfernen</string>
<!-- Submission Tan -->
<string name="submission_tan_title">TAN Eingabe</string>
<string name="submission_tan_body">Geben Sie bitte die TAN Nummer ihres Befundes ein. Die TAN ist 7-stellig und Groß- und Kleinschreibung muss nicht beachtet werden.</string>
<string name="submission_tan_body">Geben Sie bitte die TAN Nummer ihres Befundes ein. Die TAN ist 7-stellig.</string>
<string name="submission_tan_button_text">Weiter</string>
<!-- Submission Intro -->
<string name="submission_intro_title">Wurden Sie getestet?</string>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment