From: Vincent Vanwaelscappel Date: Fri, 20 Mar 2020 13:01:37 +0000 (+0100) Subject: wip #3511 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=0df410968abb6df89354c014e14e397e715ef63d;p=cubist_cms-back.git wip #3511 --- diff --git a/src/resources/views/fields/dropzone_media.blade.php b/src/resources/views/fields/dropzone_media.blade.php index c48afcd..098dea2 100644 --- a/src/resources/views/fields/dropzone_media.blade.php +++ b/src/resources/views/fields/dropzone_media.blade.php @@ -207,7 +207,11 @@ $baseUrl = url($crud->route . '/' . $entry->id . '/media'); $(document).on('click', '[data-dz-alt]', function () { var baseUrl = $(this).closest('.dropzone').attr('data-url'); - var t = window.prompt($(this).attr('title'), $(this).closest('[data-alt]').attr('data-alt')); + var defaultAlt = $(this).closest('[data-alt]').attr('data-alt'); + if (defaultAlt === undefined || defaultAlt === null || defaultAlt === 'null') { + defaultAlt = ''; + } + var t = window.prompt($(this).attr('title'), defaultAlt); var mediaId = $(this).closest('[data-id]').attr('data-id'); if (t) { $(this).closest('[data-alt]').attr('data-alt', t);