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:
parent
4bf21cbaa5
commit
3087826ee9
@ -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.
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user