mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-04 05:25:01 +02:00
Merge remote-tracking branch 'nickvergessen/ticket/11166' into develop
# By Joas Schilling # Via Joas Schilling * nickvergessen/ticket/11166: [ticket/11166] Add ajaxify support to normal ACP confirm_box() [ticket/11166] Fix several custom confirm templates in prosilver [ticket/11166] Add caption to AJAX confirm box default template [ticket/11166] Fix typo in comment [ticket/11166] Use provided custom templates on AJAX confirm box
This commit is contained in:
commit
02758cabbc
@ -1098,12 +1098,13 @@ input.disabled {
|
||||
border: 1px solid #999999;
|
||||
position: fixed;
|
||||
display: none;
|
||||
top: 100px;
|
||||
left: 35%;
|
||||
width: 30%;
|
||||
top: 150px;
|
||||
left: 25%;
|
||||
width: 50%;
|
||||
z-index: 50;
|
||||
padding: 25px;
|
||||
padding: 0 25px 20px 25px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.phpbb_alert .alert_close {
|
||||
@ -1127,6 +1128,20 @@ input.disabled {
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.phpbb_alert label {
|
||||
display: block;
|
||||
margin: 8px 0;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.phpbb_alert div.alert_text > p,
|
||||
.phpbb_alert div.alert_text > label,
|
||||
.phpbb_alert div.alert_text > select,
|
||||
.phpbb_alert div.alert_text > textarea,
|
||||
.phpbb_alert div.alert_text > input {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
#darkenwrapper {
|
||||
display: none;
|
||||
}
|
||||
|
@ -1,3 +1,15 @@
|
||||
<!-- IF S_AJAX_REQUEST -->
|
||||
|
||||
<h3>{MESSAGE_TITLE}</h3>
|
||||
<p>{MESSAGE_TEXT}</p>
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<input type="button" name="confirm" value="{L_YES}" class="button2" />
|
||||
<input type="button" name="cancel" value="{L_NO}" class="button2" />
|
||||
</fieldset>
|
||||
|
||||
<!-- ELSE -->
|
||||
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<form id="confirm" method="post" action="{S_CONFIRM_ACTION}">
|
||||
@ -14,7 +26,7 @@
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
||||
<!-- ENDIF -->
|
||||
|
@ -29,9 +29,7 @@
|
||||
</div>
|
||||
<div id="phpbb_confirm" class="phpbb_alert">
|
||||
<a href="#" class="alert_close"></a>
|
||||
<p class="alert_text"></p>
|
||||
<input type="button" class="button1" value="{L_YES}" />
|
||||
<input type="button" class="button2" value="{L_NO}" />
|
||||
<div class="alert_text"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -303,8 +303,8 @@ phpbb.ajaxify = function(options) {
|
||||
}, res.REFRESH_DATA.time * 1000); // Server specifies time in seconds
|
||||
}
|
||||
} else {
|
||||
// If confirmation is required, display a diologue to the user.
|
||||
phpbb.confirm(res.MESSAGE_TEXT, function(del) {
|
||||
// If confirmation is required, display a dialog to the user.
|
||||
phpbb.confirm(res.MESSAGE_BODY, function(del) {
|
||||
if (del) {
|
||||
phpbb.loadingAlert();
|
||||
data = $('<form>' + res.S_HIDDEN_FIELDS + '</form>').serialize();
|
||||
|
@ -3158,8 +3158,9 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
|
||||
|
||||
'YES_VALUE' => $user->lang['YES'],
|
||||
'S_CONFIRM_ACTION' => $u_action,
|
||||
'S_HIDDEN_FIELDS' => $hidden . $s_hidden_fields)
|
||||
);
|
||||
'S_HIDDEN_FIELDS' => $hidden . $s_hidden_fields,
|
||||
'S_AJAX_REQUEST' => $request->is_ajax(),
|
||||
));
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . " SET user_last_confirm_key = '" . $db->sql_escape($confirm_key) . "'
|
||||
WHERE user_id = " . $user->data['user_id'];
|
||||
@ -3171,8 +3172,9 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
|
||||
$u_action .= '&confirm_uid=' . $user->data['user_id'] . '&sess=' . $user->session_id . '&sid=' . $user->session_id;
|
||||
$json_response = new phpbb_json_response;
|
||||
$json_response->send(array(
|
||||
'MESSAGE_BODY' => $template->assign_display('body'),
|
||||
'MESSAGE_TITLE' => (!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title],
|
||||
'MESSAGE_TEXT' => (!isset($user->lang[$title . '_CONFIRM'])) ? $title : $user->lang[$title . '_CONFIRM'],
|
||||
'MESSAGE_TEXT' => (!isset($user->lang[$title . '_CONFIRM'])) ? $title : $user->lang[$title . '_CONFIRM'],
|
||||
|
||||
'YES_VALUE' => $user->lang['YES'],
|
||||
'S_CONFIRM_ACTION' => str_replace('&', '&', $u_action), //inefficient, rewrite whole function
|
||||
|
@ -1,3 +1,15 @@
|
||||
<!-- IF S_AJAX_REQUEST -->
|
||||
|
||||
<h3>{MESSAGE_TITLE}</h3>
|
||||
<p>{MESSAGE_TEXT}</p>
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<input type="button" name="confirm" value="{L_YES}" class="button1" />
|
||||
<input type="button" name="cancel" value="{L_NO}" class="button2" />
|
||||
</fieldset>
|
||||
|
||||
<!-- ELSE -->
|
||||
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<form id="confirm" action="{S_CONFIRM_ACTION}" method="post">
|
||||
@ -6,10 +18,10 @@
|
||||
|
||||
<h2>{MESSAGE_TITLE}</h2>
|
||||
<p>{MESSAGE_TEXT}</p>
|
||||
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
{S_HIDDEN_FIELDS}
|
||||
<input type="submit" name="confirm" value="{L_YES}" class="button2" />
|
||||
<input type="submit" name="confirm" value="{L_YES}" class="button2" />
|
||||
<input type="submit" name="cancel" value="{L_NO}" class="button2" />
|
||||
</fieldset>
|
||||
|
||||
@ -18,3 +30,5 @@
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
@ -1,3 +1,30 @@
|
||||
<!-- IF S_AJAX_REQUEST -->
|
||||
|
||||
<h3>{MESSAGE_TITLE}</h3>
|
||||
<p>{MESSAGE_TEXT}</p>
|
||||
|
||||
<!-- IF S_NOTIFY_POSTER -->
|
||||
<label><input type="checkbox" name="notify_poster" checked="checked" /> <!-- IF S_APPROVE -->{L_NOTIFY_POSTER_APPROVAL}<!-- ELSE -->{L_NOTIFY_POSTER_DISAPPROVAL}<!-- ENDIF --></label>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF not S_APPROVE -->
|
||||
<label><strong>{L_DISAPPROVE_REASON}{L_COLON}</strong>
|
||||
<select name="reason_id">
|
||||
<!-- BEGIN reason --><option value="{reason.ID}"<!-- IF reason.S_SELECTED --> selected="selected"<!-- ENDIF -->>{reason.DESCRIPTION}</option><!-- END reason -->
|
||||
</select></label>
|
||||
|
||||
<label><strong>{L_MORE_INFO}{L_COLON}</strong><br /><span>{L_CAN_LEAVE_BLANK}</span>
|
||||
<textarea class="inputbox" name="reason" id="reason" rows="4" cols="40">{REASON}</textarea>
|
||||
</label>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<input type="button" name="confirm" value="{YES_VALUE}" class="button1" />
|
||||
<input type="button" name="cancel" value="{L_NO}" class="button2" />
|
||||
</fieldset>
|
||||
|
||||
<!-- ELSE -->
|
||||
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<form id="confirm" action="{S_CONFIRM_ACTION}" method="post">
|
||||
@ -51,3 +78,4 @@
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
||||
<!-- ENDIF -->
|
||||
|
@ -1,3 +1,34 @@
|
||||
<!-- IF S_AJAX_REQUEST -->
|
||||
|
||||
<h3>{MESSAGE_TITLE}</h3>
|
||||
<p>{MESSAGE_TEXT}</p>
|
||||
|
||||
<!-- IF ADDITIONAL_MSG --><p>{ADDITIONAL_MSG}</p><!-- ENDIF -->
|
||||
|
||||
<label>
|
||||
<strong>{L_SELECT_DESTINATION_FORUM}{L_COLON}</strong>
|
||||
<select name="to_forum_id">{S_FORUM_SELECT}</select>
|
||||
</label>
|
||||
|
||||
<!-- IF S_CAN_LEAVE_SHADOW -->
|
||||
<label for="move_leave_shadow">
|
||||
<input type="checkbox" name="move_leave_shadow" id="move_leave_shadow" />{L_LEAVE_SHADOW}
|
||||
</label>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_CAN_LOCK_TOPIC -->
|
||||
<label for="move_lock_topics">
|
||||
<input type="checkbox" name="move_lock_topics" id="move_lock_topics" />{L_LOCK_TOPIC}
|
||||
</label>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<input type="button" name="confirm" value="{YES_VALUE}" class="button1" />
|
||||
<input type="button" name="cancel" value="{L_NO}" class="button2" />
|
||||
</fieldset>
|
||||
|
||||
<!-- ELSE -->
|
||||
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<form id="confirm" action="{S_CONFIRM_ACTION}" method="post">
|
||||
@ -35,3 +66,4 @@
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
||||
<!-- ENDIF -->
|
||||
|
@ -40,9 +40,7 @@
|
||||
</div>
|
||||
<div id="phpbb_confirm" class="phpbb_alert">
|
||||
<a href="#" class="alert_close"></a>
|
||||
<p class="alert_text"></p>
|
||||
<input type="button" class="button1" value="{L_YES}" />
|
||||
<input type="button" class="button2" value="{L_NO}" />
|
||||
<div class="alert_text"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -548,9 +548,9 @@ li.pagination ul {
|
||||
border: 1px solid transparent;
|
||||
position: fixed;
|
||||
display: none;
|
||||
top: 40%;
|
||||
left: 35%;
|
||||
width: 30%;
|
||||
top: 150px;
|
||||
left: 25%;
|
||||
width: 50%;
|
||||
z-index: 50;
|
||||
padding: 25px;
|
||||
padding: 0 25px 20px 25px;
|
||||
@ -576,6 +576,20 @@ li.pagination ul {
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.phpbb_alert label {
|
||||
display: block;
|
||||
margin: 8px 0;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.phpbb_alert div.alert_text > p,
|
||||
.phpbb_alert div.alert_text > label,
|
||||
.phpbb_alert div.alert_text > select,
|
||||
.phpbb_alert div.alert_text > textarea,
|
||||
.phpbb_alert div.alert_text > input {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
#darkenwrapper {
|
||||
display: none;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user