1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-19 20:21:51 +02:00

Fixes #4041 - SEF Generation confirmation 'cancel' option was being ignored. Also, confirmation will now only appear if the current sef is not empty.

This commit is contained in:
Cameron 2019-12-06 13:12:42 -08:00
parent 4bf21cbaa5
commit 3087826ee9
2 changed files with 15 additions and 1 deletions

View File

@ -5874,7 +5874,7 @@ var_dump($select_options);*/
$parms['tdClassRight'] = 'input-group';
}
$parms['post'] = "<span class='form-inline input-group-btn pull-left'><a class='e-sef-generate btn btn-default' data-src='".$sefSource."' data-target='".$sefTarget."' data-confirm=\"".LAN_WILL_OVERWRITE_SEF." ".LAN_JSCONFIRM."\">".LAN_GENERATE."</a></span>";
$parms['post'] = "<span class='form-inline input-group-btn pull-left'><a class='e-sef-generate btn btn-default' data-src='".$sefSource."' data-target='".$sefTarget."' data-sef-generate-confirm=\"".LAN_WILL_OVERWRITE_SEF." ".LAN_JSCONFIRM."\">".LAN_GENERATE."</a></span>";
}
if(!empty($parms['password'])) // password mechanism without the md5 storage.

View File

@ -811,6 +811,20 @@ $(document).ready(function()
target = $(this).attr("data-target");
toconvert = $('#'+src).val();
script = window.location;
confirmation = $(this).attr("data-sef-generate-confirm");
targetLength = $('#'+target).val().length ;
if(confirmation !== undefined && targetLength > 0)
{
answer = confirm(confirmation);
if(answer === false)
{
return;
}
}
$.ajax({
type: "POST",