1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-25 00:41:52 +02:00

Closes #5081 - Add confirmation dialog when deleting single PM

This commit is contained in:
Moc
2023-11-29 22:19:34 +01:00
parent 70127c28d4
commit 93132395b8

View File

@@ -582,6 +582,8 @@ if(!class_exists('plugin_pm_pm_shortcodes'))
public function sc_pm_delete($parm = '')
{
$tp = e107::getParser();
if($this->pmMode !== 'inbox' && $this->pmMode !== 'outbox' && empty($parm))
{
return '';
@@ -599,7 +601,7 @@ if(!class_exists('plugin_pm_pm_shortcodes'))
$action = $extra === '.outbox' ? 'delete-out' : 'delete-in';
return "<a class='btn btn-default btn-secondary' title='".LAN_DELETE."' href='".$this->url('action/'.$action, 'id='.$this->var['pm_id'])."'>".PM_DELETE_ICON."</a>";
return "<a class='btn btn-default btn-secondary' title='".LAN_DELETE."' href='".$this->url('action/'.$action, 'id='.$this->var['pm_id'])."' onclick=\"return jsconfirm(".$tp->toAttribute($tp->toJSON(LAN_JSCONFIRM)).") \">".PM_DELETE_ICON."</a>";
}