Commit 9faddd9b by Renzo Lucioni

Merge pull request #6267 from edx/renzo/remove-webcam-approve-button

Remove webcam capture approval button (checkmark)
parents 95025dfc 94b22bcd
...@@ -241,7 +241,6 @@ ...@@ -241,7 +241,6 @@
// Install event handlers // Install event handlers
$( "#webcam_reset_button", this.el ).on( 'click', _.bind( this.reset, this ) ); $( "#webcam_reset_button", this.el ).on( 'click', _.bind( this.reset, this ) );
$( "#webcam_capture_button", this.el ).on( 'click', _.bind( this.capture, this ) ); $( "#webcam_capture_button", this.el ).on( 'click', _.bind( this.capture, this ) );
$( "#webcam_approve_button", this.el ).on( 'click', _.bind( this.approve, this ) );
return this; return this;
}, },
...@@ -255,7 +254,6 @@ ...@@ -255,7 +254,6 @@
// Go back to the initial button state // Go back to the initial button state
$( "#webcam_reset_button", this.el ).hide(); $( "#webcam_reset_button", this.el ).hide();
$( "#webcam_approve_button", this.el ).removeClass( "approved" ).hide();
$( "#webcam_capture_button", this.el ).show(); $( "#webcam_capture_button", this.el ).show();
}, },
...@@ -263,23 +261,17 @@ ...@@ -263,23 +261,17 @@
// Take a snapshot of the video // Take a snapshot of the video
var success = this.backend.snapshot(); var success = this.backend.snapshot();
// Show the reset and approve buttons
if ( success ) { if ( success ) {
// Hide the capture button, and show the reset button
$( "#webcam_capture_button", this.el ).hide(); $( "#webcam_capture_button", this.el ).hide();
$( "#webcam_reset_button", this.el ).show(); $( "#webcam_reset_button", this.el ).show();
$( "#webcam_approve_button", this.el ).show();
}
},
approve: function() { // Save the data to the model
// Save the data to the model this.model.set( this.modelAttribute, this.backend.getImageData() );
this.model.set( this.modelAttribute, this.backend.getImageData() );
// Make the "approve" button green // Enable the submit button
$( "#webcam_approve_button" ).addClass( "approved" ); $( this.submitButton ).removeClass( "is-disabled" );
}
// Enable the submit button
$( this.submitButton ).removeClass( "is-disabled" );
}, },
chooseVideoCaptureBackend: function() { chooseVideoCaptureBackend: function() {
...@@ -298,7 +290,6 @@ ...@@ -298,7 +290,6 @@
// Hide the buttons // Hide the buttons
$( "#webcam_capture_button", this.el ).hide(); $( "#webcam_capture_button", this.el ).hide();
$( "#webcam_reset_button", this.el ).hide(); $( "#webcam_reset_button", this.el ).hide();
$( "#webcam_approve_button", this.el ).hide();
// Show the error message // Show the error message
this.errorModel.set({ this.errorModel.set({
......
...@@ -732,8 +732,8 @@ ...@@ -732,8 +732,8 @@
left: ($baseline/2); left: ($baseline/2);
} }
// control - take/do // control - take/do, retake
.control-do { .control-do, .control-retake {
left: 45%; left: 45%;
} }
...@@ -2183,8 +2183,8 @@ ...@@ -2183,8 +2183,8 @@
left: ($baseline/2); left: ($baseline/2);
} }
// control - take/do // control - take/do, retake
.control-do { .control-do, .control-retake {
left: 45%; left: 45%;
} }
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
<li class="help-item"><%- gettext( "Be sure your entire face is inside the frame" ) %></li> <li class="help-item"><%- gettext( "Be sure your entire face is inside the frame" ) %></li>
<li class="help-item"><%- gettext( "Can we match the photo you took with the one on your ID?" ) %></li> <li class="help-item"><%- gettext( "Can we match the photo you took with the one on your ID?" ) %></li>
<li class="help-item"><%- gettext( "Once in position, use the camera button" ) %> <span class="example">(<i class="icon-camera"></i>)</span> <%- gettext( "to capture your picture" ) %></li> <li class="help-item"><%- gettext( "Once in position, use the camera button" ) %> <span class="example">(<i class="icon-camera"></i>)</span> <%- gettext( "to capture your picture" ) %></li>
<li class="help-item"><%- gettext( "Use the checkmark button" ) %> <span class="example">(<i class="icon-ok"></i>)</span> <%- gettext( "once you are happy with the photo" ) %></li>
</ul> </ul>
</div> </div>
</div> </div>
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
<li class="help-item"><%- gettext( "Try to keep your fingers at the edge to avoid covering important information" ) %></li> <li class="help-item"><%- gettext( "Try to keep your fingers at the edge to avoid covering important information" ) %></li>
<li class="help-item"><%- gettext( "Acceptable IDs include drivers licenses, passports, or other goverment-issued IDs that include your name and photo" ) %></li> <li class="help-item"><%- gettext( "Acceptable IDs include drivers licenses, passports, or other goverment-issued IDs that include your name and photo" ) %></li>
<li class="help-item"><%- gettext( "Once in position, use the camera button ") %> <span class="example">(<i class="icon-camera"></i>)</span> <%- gettext( "to capture your ID" ) %></li> <li class="help-item"><%- gettext( "Once in position, use the camera button ") %> <span class="example">(<i class="icon-camera"></i>)</span> <%- gettext( "to capture your ID" ) %></li>
<li class="help-item"><%- gettext( "Use the checkmark button" ) %> <span class="example">(<i class="icon-ok"></i>)</span> <%- gettext( "once you are happy with the photo" ) %></li>
</ul> </ul>
</div> </div>
</div> </div>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<div class="controls photo-controls"> <div class="controls photo-controls">
<ul class="list-controls"> <ul class="list-controls">
<li class="control control-redo" id="webcam_reset_button" style="display: none;"> <li class="control control-retake" id="webcam_reset_button" style="display: none;">
<a class="action action-redo"> <a class="action action-redo">
<i class="icon-undo"></i> <span class="sr"><%- gettext( "Retake" ) %></span> <i class="icon-undo"></i> <span class="sr"><%- gettext( "Retake" ) %></span>
</a> </a>
...@@ -20,11 +20,5 @@ ...@@ -20,11 +20,5 @@
<i class="icon-camera"></i> <span class="sr"><%- gettext( "Take photo" ) %></span> <i class="icon-camera"></i> <span class="sr"><%- gettext( "Take photo" ) %></span>
</a> </a>
</li> </li>
<li class="control control-approve" id="webcam_approve_button" style="display: none;">
<a class="action action-approve">
<i class="icon-ok"></i> <span class="sr"><%- gettext( "Looks good" ) %></span>
</a>
</li>
</ul> </ul>
</div> </div>
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