Commit e04e61d6 by zubair-arbi

show error message to user on photo reverification page if Flash not found

ECOM-1355
parent b6265c44
......@@ -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
......
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 to comment