Skip to content

Commit

Permalink
Closes #5081 - Add confirmation dialog when deleting single PM
Browse files Browse the repository at this point in the history
  • Loading branch information
Moc committed Nov 29, 2023
1 parent 70127c2 commit 9313239
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion e107_plugins/pm/pm_shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,8 @@ public function sc_pm_block_user()

public function sc_pm_delete($parm = '')
{
$tp = e107::getParser();

if($this->pmMode !== 'inbox' && $this->pmMode !== 'outbox' && empty($parm))
{
return '';
Expand All @@ -599,7 +601,7 @@ public function sc_pm_delete($parm = '')


$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>";
}


Expand Down

0 comments on commit 9313239

Please sign in to comment.