show error message to user on photo reverification page if Flash not found
ECOM-1355
This commit is contained in:
@@ -305,6 +305,11 @@
|
||||
.toggleClass( 'is-disabled', !isEnabled )
|
||||
.prop( 'disabled', !isEnabled )
|
||||
.attr('aria-disabled', !isEnabled);
|
||||
},
|
||||
|
||||
isMobileDevice: function() {
|
||||
// Check whether user is using mobile device or not
|
||||
return ( navigator.userAgent.match(/(Android|iPad|iPhone|iPod)/g) ? true : false );
|
||||
}
|
||||
});
|
||||
|
||||
@@ -335,6 +340,16 @@
|
||||
if ( view.isSupported() ) {
|
||||
return view;
|
||||
}
|
||||
// If user is not using mobile device and Flash is not available
|
||||
// then show user error message for Flash
|
||||
if (!view.isMobileDevice() && !view.isSupported()) {
|
||||
view.backend.trigger(
|
||||
'error',
|
||||
gettext( "No Flash Detected" ),
|
||||
gettext( "You don't seem to have Flash installed. Get Flash to continue your verification." )
|
||||
);
|
||||
return view;
|
||||
}
|
||||
|
||||
// Last resort is HTML file input with image capture.
|
||||
// This will work everywhere, and on iOS it will
|
||||
|
||||
Reference in New Issue
Block a user