File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
app/code/Magento/ProductVideo/view/adminhtml/web/js Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -282,9 +282,14 @@ define([
282
282
* @private
283
283
*/
284
284
_onGetVideoInformationClick : function ( ) {
285
- this . _onlyVideoPlayer = false ;
286
- this . _isEditPage = false ;
287
- this . _videoUrlWidget . trigger ( 'update_video_information' ) ;
285
+ var videoForm = this . element . find ( this . _videoFormSelector ) ;
286
+ videoForm . validation ( ) ;
287
+
288
+ if ( this . element . find ( this . _videoUrlSelector ) . valid ( ) ) {
289
+ this . _onlyVideoPlayer = false ;
290
+ this . _isEditPage = false ;
291
+ this . _videoUrlWidget . trigger ( 'update_video_information' ) ;
292
+ }
288
293
} ,
289
294
290
295
/**
@@ -299,6 +304,13 @@ define([
299
304
* @private
300
305
*/
301
306
_onGetVideoInformationStartRequest : function ( ) {
307
+ try {
308
+ var videoForm = this . element . find ( this . _videoFormSelector ) ;
309
+ videoForm . validation ( 'clearError' ) ;
310
+ } catch ( e ) {
311
+ // Do nothing
312
+ }
313
+
302
314
this . _videoRequestComplete = false ;
303
315
} ,
304
316
You can’t perform that action at this time.
0 commit comments