diff options
Diffstat (limited to 'youtube/templates')
-rw-r--r-- | youtube/templates/base.html | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/youtube/templates/base.html b/youtube/templates/base.html index 554e116..4ff83c5 100644 --- a/youtube/templates/base.html +++ b/youtube/templates/base.html @@ -155,6 +155,16 @@ var XHR = new XMLHttpRequest(); var FD = new FormData(playlistAddForm); + if(FD.getAll('video_info_list').length === 0){ + displayMessage('Error: No videos selected', true); + return; + } + + if(FD.get('playlist_name') === ""){ + displayMessage('Error: No playlist selected', true); + return; + } + // https://stackoverflow.com/questions/48322876/formdata-doesnt-include-value-of-buttons FD.append('action', 'add'); |