1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-22 02:50:00 +01:00

[ticket/9657] Remove softdelete reason field when permanent delete is selected

PHPBB3-9657
This commit is contained in:
Joas Schilling 2013-03-11 23:08:40 +01:00
parent b727e1eeda
commit 4e9cf27394
4 changed files with 26 additions and 6 deletions

View File

@ -317,6 +317,18 @@ phpbb.ajaxify = function(options) {
});
}
}, false);
// Add the click function to the code we just laoded.
// Should be removed and replace with a call to .on()
// when jQuery is updated to 1.7.x or higher
// $(document).on('click', '#delete_permanent', function () {});
$('#delete_permanent').click(function () {
if ($(this).attr('checked')) {
$('#delete_reason').hide();
} else {
$('#delete_reason').show();
}
});
}
}

View File

@ -83,8 +83,8 @@ $lang = array_merge($lang, array(
'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_REASON' => 'Soft delete reason',
'DELETE_REASON_EXPLAIN' => 'The reason is only shown to moderators when post is soft deleted.',
'DELETE_POST_WARN' => 'Deleted this post',
'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',

View File

@ -230,6 +230,14 @@ $('#quick-mod-select').change(function () {
$('#quickmodform').submit();
});
$('#delete_permanent').click(function () {
if ($(this).attr('checked')) {
$('#delete_reason').hide();
} else {
$('#delete_reason').show();
}
});
/**
* Toggle the member search panel in memberlist.php.
*

View File

@ -11,9 +11,9 @@
<!-- ENDIF -->
<!-- IF S_DELETE_REASON -->
<label>
<label id="delete_reason">
<strong>{L_DELETE_REASON}:</strong><br /><span>{L_DELETE_REASON_EXPLAIN}</span><br />
<input type="text" name="delete_reason" id="delete_reason" value="" class="inputbox autowidth" maxlength="120" size="45" />
<input type="text" name="delete_reason" value="" class="inputbox autowidth" maxlength="120" size="45" />
</label>
<!-- ENDIF -->
<!-- ENDIF -->
@ -50,9 +50,9 @@
<!-- ENDIF -->
<!-- IF S_DELETE_REASON -->
<dl>
<dl id="delete_reason">
<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>
<dd><input type="text" name="delete_reason" value="" class="inputbox autowidth" maxlength="120" size="45" /></dd>
</dl>
<!-- ENDIF -->
</fieldset>