mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/soft-delete] Invert the logic on confirm box
Permanent delete is now the checkbox rather then softdelete. PHPBB3-9567
This commit is contained in:
parent
8d05dad634
commit
bed82bf2bd
6 changed files with 67 additions and 63 deletions
|
@ -806,7 +806,10 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
|
|||
'S_DELETE_REASON' => $auth->acl_get('m_softdelete', $forum_id),
|
||||
));
|
||||
|
||||
confirm_box(false, (sizeof($topic_ids) == 1) ? 'DELETE_TOPIC' : 'DELETE_TOPICS', $s_hidden_fields, 'posting_delete_post_body.html');
|
||||
$l_confirm = (sizeof($post_ids) == 1) ? 'DELETE_TOPIC' : 'DELETE_TOPICS';
|
||||
$l_confirm .= ($only_softdeleted) ? '_PERMANENTLY' : '';
|
||||
|
||||
confirm_box(false, $l_confirm, $s_hidden_fields, 'confirm_delete_body.html');
|
||||
}
|
||||
|
||||
$topic_id = request_var('t', 0);
|
||||
|
@ -1031,7 +1034,10 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '')
|
|||
'S_DELETE_REASON' => $auth->acl_get('m_softdelete', $forum_id),
|
||||
));
|
||||
|
||||
confirm_box(false, (sizeof($post_ids) == 1) ? 'DELETE_POST' : 'DELETE_POSTS', $s_hidden_fields, 'posting_delete_post_body.html');
|
||||
$l_confirm = (sizeof($post_ids) == 1) ? 'DELETE_POST' : 'DELETE_POSTS';
|
||||
$l_confirm .= ($only_softdeleted) ? '_PERMANENTLY' : '';
|
||||
|
||||
confirm_box(false, $l_confirm, $s_hidden_fields, 'confirm_delete_body.html');
|
||||
}
|
||||
|
||||
$redirect = request_var('redirect', "index.$phpEx");
|
||||
|
|
|
@ -72,16 +72,12 @@ $lang = array_merge($lang, array(
|
|||
'DELETE_PM_REPORTS' => 'Delete PM reports',
|
||||
'DELETE_PM_REPORTS_CONFIRM' => 'Are you sure you want to delete the selected PM reports?',
|
||||
'DELETE_POSTS' => 'Delete posts',
|
||||
'DELETE_POSTS_CONFIRM' => 'Are you sure you want to delete these posts?',
|
||||
'DELETE_POST_CONFIRM' => 'Are you sure you want to delete this post?',
|
||||
'DELETE_REPORT' => 'Delete report',
|
||||
'DELETE_REPORT_CONFIRM' => 'Are you sure you want to delete the selected report?',
|
||||
'DELETE_REPORTS' => 'Delete reports',
|
||||
'DELETE_REPORTS_CONFIRM' => 'Are you sure you want to delete the selected reports?',
|
||||
'DELETE_SHADOW_TOPIC' => 'Delete shadow topic',
|
||||
'DELETE_TOPICS' => 'Delete selected topics',
|
||||
'DELETE_TOPICS_CONFIRM' => 'Are you sure you want to delete these topics?',
|
||||
'DELETE_TOPIC_CONFIRM' => 'Are you sure you want to delete this topic?',
|
||||
'DISAPPROVE' => 'Disapprove',
|
||||
'DISAPPROVE_REASON' => 'Reason for disapproval',
|
||||
'DISAPPROVE_POST' => 'Disapprove post',
|
||||
|
|
|
@ -77,13 +77,20 @@ $lang = array_merge($lang, array(
|
|||
'DELETE_MESSAGE' => 'Delete message',
|
||||
'DELETE_MESSAGE_CONFIRM' => 'Are you sure you want to delete this message?',
|
||||
'DELETE_OWN_POSTS' => 'Sorry but you can only delete your own posts.',
|
||||
'DELETE_PERMANENTLY' => 'Delete permanently',
|
||||
'DELETE_POST_CONFIRM' => 'Are you sure you want to delete this post?',
|
||||
'DELETE_POST_SOFT' => 'Soft delete post',
|
||||
'DELETE_POST_SOFT_EXP' => 'Soft deleted posts can be recovered by a moderator',
|
||||
'DELETE_POST_REASON' => 'Soft delete reason',
|
||||
'DELETE_POST_PERMANENTLY_CONFIRM' => 'Are you sure you want to <strong>permanently</strong> delete this post?',
|
||||
'DELETE_POST_PERMANENTLY' => 'Permanently delete this post so it can not be recovered',
|
||||
'DELETE_POSTS_CONFIRM' => 'Are you sure you want to delete these posts?',
|
||||
'DELETE_POSTS_PERMANENTLY_CONFIRM' => 'Are you sure you want to <strong>permanently</strong> delete these posts?',
|
||||
'DELETE_REASON' => 'Delete reason',
|
||||
'DELETE_REASON_EXPLAIN' => 'The reason is only used when the post is not deleted permanently.',
|
||||
'DELETE_POST_WARN' => 'Once deleted the post cannot be recovered',
|
||||
'DELETE_TOPIC_SOFT' => 'Soft delete topic',
|
||||
'DELETE_TOPIC_SOFT_EXP' => 'Soft deleted topics can be recovered by a moderator',
|
||||
'DELETE_TOPIC_CONFIRM' => 'Are you sure you want to delete this topic?',
|
||||
'DELETE_TOPIC_PERMANENTLY' => 'Permanently delete this topic so it can not be recovered',
|
||||
'DELETE_TOPIC_PERMANENTLY_CONFIRM' => 'Are you sure you want to <strong>permanently</strong> delete this topic?',
|
||||
'DELETE_TOPICS_CONFIRM' => 'Are you sure you want to delete these topics?',
|
||||
'DELETE_TOPICS_PERMANENTLY_CONFIRM' => 'Are you sure you want to <strong>permanently</strong> delete these topics?',
|
||||
'DISABLE_BBCODE' => 'Disable BBCode',
|
||||
'DISABLE_MAGIC_URL' => 'Do not automatically parse URLs',
|
||||
'DISABLE_SMILIES' => 'Disable smilies',
|
||||
|
@ -184,7 +191,6 @@ $lang = array_merge($lang, array(
|
|||
'POLL_VOTE_CHANGE' => 'Allow re-voting',
|
||||
'POLL_VOTE_CHANGE_EXPLAIN' => 'If enabled users are able to change their vote.',
|
||||
'POSTED_ATTACHMENTS' => 'Posted attachments',
|
||||
'POST_ALREADY_SOFTDELETED' => 'The post is already soft deleted, you can only hard delete it.',
|
||||
'POST_APPROVAL_NOTIFY' => 'You will be notified when your post has been approved.',
|
||||
'POST_CONFIRMATION' => 'Confirmation of post',
|
||||
'POST_CONFIRM_EXPLAIN' => 'To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.',
|
||||
|
@ -241,7 +247,6 @@ $lang = array_merge($lang, array(
|
|||
'TOO_MANY_URLS' => 'Your message contains too many URLs. The maximum number of URLs allowed is %d.',
|
||||
'TOO_MANY_USER_OPTIONS' => 'You cannot specify more options per user than existing poll options.',
|
||||
'TOPIC_BUMPED' => 'Topic has been bumped successfully.',
|
||||
'TOPIC_ALREADY_SOFTDELETED' => 'The topic is already soft deleted, you can only hard delete it.',
|
||||
|
||||
'UNAUTHORISED_BBCODE' => 'You cannot use certain BBCodes: %s.',
|
||||
'UNGLOBALISE_EXPLAIN' => 'To switch this topic back from being global to a normal topic, you need to select the forum you wish this topic to be displayed.',
|
||||
|
|
|
@ -1593,7 +1593,9 @@ function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data, $is_sof
|
|||
'S_DELETE_REASON' => $auth->acl_get('m_softdelete', $forum_id),
|
||||
));
|
||||
|
||||
confirm_box(false, 'DELETE_POST', $s_hidden_fields, 'posting_delete_post_body.html');
|
||||
$l_confirm = 'DELETE_POST' . (($post_data['post_visibility'] == ITEM_DELETED) ? '_PERMANENTLY' : '');
|
||||
|
||||
confirm_box(false, $l_confirm, $s_hidden_fields, 'confirm_delete_body.html');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
44
phpBB/styles/prosilver/template/confirm_delete_body.html
Normal file
44
phpBB/styles/prosilver/template/confirm_delete_body.html
Normal file
|
@ -0,0 +1,44 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<form id="confirm" action="{S_CONFIRM_ACTION}" method="post">
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
|
||||
<h2>{MESSAGE_TITLE}</h2>
|
||||
|
||||
<p>{MESSAGE_TEXT}</p>
|
||||
|
||||
<!-- IF not S_SOFTDELETED and (S_DELETE_REASON or (S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE)) -->
|
||||
<fieldset class="fields1">
|
||||
<!-- IF S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE -->
|
||||
<dl>
|
||||
<dt><label for="delete_permanent">{L_DELETE_PERMANENTLY}:</label></dt>
|
||||
<dd>
|
||||
<label for="delete_permanent">
|
||||
<input id="delete_permanent" name="delete_permanent" type="checkbox" value="1" />
|
||||
<!-- IF S_TOPIC_MODE -->{L_DELETE_TOPIC_PERMANENTLY}<!-- ELSE -->{L_DELETE_POST_PERMANENTLY}<!-- ENDIF -->
|
||||
</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_DELETE_REASON -->
|
||||
<dl>
|
||||
<dt><label for="delete_reason">{L_DELETE_REASON}:</label><br /><span>{L_DELETE_REASON_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" name="delete_reason" id="delete_reason" value="" class="inputbox autowidth" maxlength="120" size="45" /></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
{S_HIDDEN_FIELDS}
|
||||
<input type="submit" name="confirm" value="{L_YES}" class="button1" />
|
||||
<input type="submit" name="cancel" value="{L_NO}" class="button2" />
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
|
@ -1,49 +0,0 @@
|
|||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<form id="confirm" action="{S_CONFIRM_ACTION}" method="post">
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
|
||||
<h2>{MESSAGE_TITLE}</h2>
|
||||
<p>{MESSAGE_TEXT}</p>
|
||||
|
||||
<!-- IF S_SOFTDELETED and S_TOPIC_MODE and S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE -->
|
||||
<p>{L_TOPIC_ALREADY_SOFTDELETED}</p>
|
||||
<!-- ELSEIF S_SOFTDELETED and S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE -->
|
||||
<p>{L_POST_ALREADY_SOFTDELETED}</p>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF not S_SOFTDELETED and (S_DELETE_REASON or (S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE)) -->
|
||||
<fieldset class="fields1">
|
||||
<!-- IF S_TOPIC_MODE and S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE -->
|
||||
<dl>
|
||||
<dt><label for="soft_delete">{L_DELETE_TOPIC_SOFT}:</label></dt>
|
||||
<dd><label for="soft_delete"><input id="soft_delete" name="soft_delete" type="checkbox" checked="checked" value="1" /> {L_DELETE_TOPIC_SOFT_EXP}</label></dd>
|
||||
</dl>
|
||||
<!-- ELSEIF S_ALLOWED_DELETE and S_ALLOWED_SOFTDELETE -->
|
||||
<dl>
|
||||
<dt><label for="soft_delete">{L_DELETE_POST_SOFT}:</label></dt>
|
||||
<dd><label for="soft_delete"><input id="soft_delete" name="soft_delete" type="checkbox" checked="checked" value="1" /> {L_DELETE_POST_SOFT_EXP}</label></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_DELETE_REASON -->
|
||||
<dl>
|
||||
<dt><label for="delete_reason">{L_DELETE_POST_REASON}:</label></dt>
|
||||
<dd><input type="text" name="delete_reason" id="delete_reason" value="" class="inputbox autowidth" maxlength="120" size="45" /></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
{S_HIDDEN_FIELDS}
|
||||
<input type="submit" name="confirm" value="{L_YES}" class="button1" />
|
||||
<input type="submit" name="cancel" value="{L_NO}" class="button2" />
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
Loading…
Add table
Reference in a new issue