Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Sources/Actions/Display.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ public function prepareDisplayContext(): array|bool
'label' => Lang::getTxt('quick_edit', file: 'General'),
'class' => 'quick_edit',
'id' => 'modify_button_' . $output['id'],
'custom' => 'onclick="oQuickModify.modifyMsg(\'' . $output['id'] . '\', \'' . !empty(Config::$modSettings['toggle_subject']) . '\')"',
'icon' => 'quick_edit_button',
'show' => $output['can_modify'],
],
Expand Down
4 changes: 2 additions & 2 deletions Themes/default/Calendar.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -825,12 +825,12 @@ function template_calendar_top($calendar_data)

echo '
<form action="', Config::$scripturl, '?action=calendar;', Utils::$context['calendar_view'], '" id="', !empty($calendar_data['end_date']) ? 'calendar_range' : 'calendar_navigation', '" method="post" accept-charset="UTF-8">
<input type="date" name="start_date" id="start_date" value="', $calendar_data['iso_start_date'], '" tabindex="', Utils::$context['tabindex']++, '" class="date_input start" data-type="date">';
<input type="date" name="start_date" id="start_date" value="', $calendar_data['iso_start_date'], '" class="date_input start" data-type="date">';

if (!empty($calendar_data['end_date']))
echo '
<span>', Utils::strtolower(Lang::getTxt('to', file: 'General')), '</span>
<input type="date" name="end_date" id="end_date" value="', $calendar_data['iso_end_date'], '" tabindex="', Utils::$context['tabindex']++, '" class="date_input end" data-type="date">';
<input type="date" name="end_date" id="end_date" value="', $calendar_data['iso_end_date'], '" class="date_input end" data-type="date">';

echo '
<input type="submit" class="button" style="float:none" id="view_button" value="', Lang::getTxt('view', file: 'General'), '">
Expand Down
32 changes: 9 additions & 23 deletions Themes/default/Display.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ function template_main()
// Show the topic information - icon, subject, etc.
echo '
<div id="forumposts">
<form action="', Config::$scripturl, '?action=quickmod2;topic=', Utils::$context['current_topic'], '.', Utils::$context['start'], '" method="post" accept-charset="UTF-8" name="quickModForm" id="quickModForm" onsubmit="return oQuickModify.bInEditMode ? oQuickModify.modifySave(\'' . Utils::$context['session_id'] . '\', \'' . Utils::$context['session_var'] . '\') : false">';
<form action="', Config::$scripturl, '?action=quickmod2;topic=', Utils::$context['current_topic'], '.', Utils::$context['start'], '" method="post" accept-charset="UTF-8" name="quickModForm" id="quickModForm">';

Utils::$context['ignoredMsgs'] = array();
Utils::$context['removableMessageIDs'] = array();
Expand Down Expand Up @@ -327,30 +327,16 @@ function template_main()
}

echo '
var oQuickModify = new QuickModify({
new QuickModify({
sScriptUrl: smf_scripturl,
sFormName: \'quickModForm\',
sClassName: \'quick_edit\',
bShowModify: ', Config::$modSettings['show_modify'] ? 'true' : 'false', ',
iTopicId: ', Utils::$context['current_topic'], ',
sTemplateBodyEdit: ', Utils::escapeJavaScript('
<div id="quick_edit_body_container">
<div id="error_box" class="error"></div>
<textarea class="editor" name="message" rows="12" tabindex="' . Utils::$context['tabindex']++ . '">%body%</textarea><br>
<input type="hidden" name="' . Utils::$context['session_var'] . '" value="' . Utils::$context['session_id'] . '">
<input type="hidden" name="topic" value="' . Utils::$context['current_topic'] . '">
<input type="hidden" name="msg" value="%msg_id%">
<div class="righttext quickModifyMargin">
<input type="submit" name="post" value="' . Lang::getTxt('save', file: 'General') . '" tabindex="' . Utils::$context['tabindex']++ . '" onclick="return oQuickModify.modifySave(\'' . Utils::$context['session_id'] . '\', \'' . Utils::$context['session_var'] . '\');" accesskey="s" class="button">' . (Utils::$context['show_spellchecking'] ? ' <input type="button" value="' . Lang::getTxt('spell_check', file: 'General') . '" tabindex="' . Utils::$context['tabindex']++ . '" onclick="spellCheck(\'quickModForm\', \'message\');" class="button">' : '') . ' <input type="submit" name="cancel" value="' . Lang::getTxt('modify_cancel', file: 'General') . '" tabindex="' . Utils::$context['tabindex']++ . '" onclick="return oQuickModify.modifyCancel();" class="button">
</div>
</div>'), ',
sTemplateSubjectEdit: ', Utils::escapeJavaScript('<input type="text" name="subject" value="%subject%" size="80" maxlength="80" tabindex="' . Utils::$context['tabindex']++ . '">'), ',
sTemplateBodyNormal: ', Utils::escapeJavaScript('%body%'), ',
sTemplateSubjectNormal: ', Utils::escapeJavaScript('<a href="' . Config::$scripturl . '?topic=' . Utils::$context['current_topic'] . '.msg%msg_id%#msg%msg_id%" rel="nofollow">%subject%</a>'), ',
sTemplateTopSubject: ', Utils::escapeJavaScript('%subject%'), ',
sTemplateReasonEdit: ', Utils::escapeJavaScript(Lang::getTxt('reason_for_edit', file: 'General') . ': <input type="text" name="modify_reason" value="%modify_reason%" size="80" maxlength="80" tabindex="' . Utils::$context['tabindex']++ . '" class="quickModifyMargin">'), ',
sTemplateReasonNormal: ', Utils::escapeJavaScript('%modify_text'), ',
sErrorBorderStyle: ', Utils::escapeJavaScript('1px solid red'), (Utils::$context['can_reply']) ? ',
sFormRemoveAccessKeys: \'postmodify\'' : '', '
sSaveButtonText: ', Utils::escapeJavaScript(Lang::getTxt('save', file: 'General')), ',
sCancelButtonText: ', Utils::escapeJavaScript(Lang::getTxt('modify_cancel', file: 'General')), ',
sEditReasonText: ', Utils::escapeJavaScript(Lang::getTxt('reason_for_edit', file: 'General')) . ',
sErrorBorderStyle: ', Utils::escapeJavaScript('1px solid red'), '
});

new JumpTo({
Expand Down Expand Up @@ -938,7 +924,7 @@ function template_quickreply()
', Lang::getTxt('name', file: 'General'), '
</dt>
<dd>
<input type="text" name="guestname" size="25" value="', Utils::$context['name'], '" tabindex="', Utils::$context['tabindex']++, '" required>
<input type="text" name="guestname" size="25" value="', Utils::$context['name'], '" required>
</dd>';

if (empty(Config::$modSettings['guest_post_no_email']))
Expand All @@ -948,7 +934,7 @@ function template_quickreply()
', Lang::getTxt('email', file: 'General'), '
</dt>
<dd>
<input type="email" name="email" size="25" value="', Utils::$context['email'], '" tabindex="', Utils::$context['tabindex']++, '" required>
<input type="email" name="email" size="25" value="', Utils::$context['email'], '" required>
</dd>';
}

Expand Down
26 changes: 5 additions & 21 deletions Themes/default/GenericControls.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function template_control_richedit($editor_id, $smileyContainer = null, $bbcCont
$editor_context['sce_options']['toolbar'] = '';

echo '
<textarea class="editor" name="', $editor_id, '" id="', $editor_id, '" cols="600" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="', Utils::$context['tabindex']++, '" style="width: ', $editor_context['width'], '; height: ', $editor_context['height'], ';', isset(Utils::$context['post_error']['no_message']) || isset(Utils::$context['post_error']['long_message']) ? 'border: 1px solid red;' : '', '"', !empty(Utils::$context['editor']['required']) ? ' required' : '', '>', $editor_context['value'], '</textarea>
<textarea class="editor" name="', $editor_id, '" id="', $editor_id, '" cols="600" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" style="width: ', $editor_context['width'], '; height: ', $editor_context['height'], ';', isset(Utils::$context['post_error']['no_message']) || isset(Utils::$context['post_error']['long_message']) ? 'border: 1px solid red;' : '', '"', !empty(Utils::$context['editor']['required']) ? ' required' : '', '>', $editor_context['value'], '</textarea>
<div id="', $editor_id, '_resizer" class="richedit_resize"></div>
<input type="hidden" name="', $editor_id, '_mode" id="', $editor_id, '_mode" value="0">
<script>
Expand Down Expand Up @@ -90,23 +90,7 @@ function template_control_richedit_buttons($editor_id)
</span>
<span class="post_button_container">';

$tempTab = Utils::$context['tabindex'];

if (!empty(Utils::$context['drafts_save']))
$tempTab++;
elseif ($editor_context['preview_type'])
$tempTab++;
elseif (Utils::$context['show_spellchecking'])
$tempTab++;

$tempTab++;
Utils::$context['tabindex'] = $tempTab;

foreach (Utils::$context['richedit_buttons'] as $name => $button) {
if ($name == 'spell_check') {
$button['onclick'] = 'oEditorHandle_' . $editor_id . '.spellCheckStart();';
}

if ($name == 'preview') {
$button['value'] = isset($editor_context['labels']['preview_button']) ? $editor_context['labels']['preview_button'] : $button['value'];
$button['onclick'] = $editor_context['preview_type'] == Editor::PREVIEW_XML ? '' : 'return submitThisOnce(this);';
Expand All @@ -115,12 +99,12 @@ function template_control_richedit_buttons($editor_id)

if ($button['show']) {
echo '
<input type="', $button['type'], '"', $button['type'] == 'hidden' ? ' id="' . $name . '"' : '', ' name="', $name, '" value="', $button['value'], '"', $button['type'] != 'hidden' ? ' tabindex="' . --$tempTab . '"' : '', !empty($button['onclick']) ? ' onclick="' . $button['onclick'] . '"' : '', !empty($button['accessKey']) ? ' accesskey="' . $button['accessKey'] . '"' : '', $button['type'] != 'hidden' ? ' class="button"' : '', '>';
<input type="', $button['type'], '"', $button['type'] == 'hidden' ? ' id="' . $name . '"' : '', ' name="', $name, '" value="', $button['value'], '"', !empty($button['onclick']) ? ' onclick="' . $button['onclick'] . '"' : '', !empty($button['accessKey']) ? ' accesskey="' . $button['accessKey'] . '"' : '', $button['type'] != 'hidden' ? ' class="button"' : '', '>';
}
}

echo '
<input type="submit" value="', isset($editor_context['labels']['post_button']) ? $editor_context['labels']['post_button'] : Lang::getTxt('post', file: 'General'), '" name="post" tabindex="', --$tempTab, '" onclick="return submitThisOnce(this);" accesskey="s" class="button">
<input type="submit" value="', isset($editor_context['labels']['post_button']) ? $editor_context['labels']['post_button'] : Lang::getTxt('post', file: 'General'), '" name="post" onclick="return submitThisOnce(this);" accesskey="s" class="button">
</span>';

// Start an instance of the auto saver if it's enabled
Expand Down Expand Up @@ -206,7 +190,7 @@ function template_control_verification($verify_id, $display_type = 'all', $reset
<div class="smalltext" style="margin: 4px 0 8px 0;">
<a href="', $verify_context->image_href, ';sound" id="visual_verification_', $verify_id, '_sound" rel="nofollow">', Lang::getTxt('visual_verification_sound', file: 'General'), '</a> / <a href="#visual_verification_', $verify_id, '_refresh" id="visual_verification_', $verify_id, '_refresh">', Lang::getTxt('visual_verification_request_new', file: 'General'), '</a>', $display_type != 'quick_reply' ? '<br>' : '', '<br>
', Lang::getTxt('visual_verification_description', file: 'General'), $display_type != 'quick_reply' ? '<br>' : '', '
<input type="text" name="', $verify_id, '_vv[code]" value="" size="30" tabindex="', Utils::$context['tabindex']++, '" autocomplete="off" required>
<input type="text" name="', $verify_id, '_vv[code]" value="" size="30" autocomplete="off" required>
</div>';
}

Expand All @@ -228,7 +212,7 @@ function template_control_verification($verify_id, $display_type = 'all', $reset
echo '
<div class="smalltext">
', $verify_context->questions[$qIndex]['q'], ':<br>
<input type="text" name="', $verify_id, '_vv[q][', $verify_context->questions[$qIndex]['id'], ']" size="30" value="', $verify_context->questions[$qIndex]['a'], '" ', $verify_context->questions[$qIndex]['is_error'] ? 'style="border: 1px red solid;"' : '', ' tabindex="', Utils::$context['tabindex']++, '" required>
<input type="text" name="', $verify_id, '_vv[q][', $verify_context->questions[$qIndex]['id'], ']" size="30" value="', $verify_context->questions[$qIndex]['a'], '" ', $verify_context->questions[$qIndex]['is_error'] ? 'style="border: 1px red solid;"' : '', ' required>
</div>';
}

Expand Down
8 changes: 4 additions & 4 deletions Themes/default/ManageBoards.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function template_modify_category()
<span class="smalltext">', Lang::getTxt('name_on_display', file: 'ManageBoards'), '</span>
</dt>
<dd>
<input type="text" name="cat_name" value="', Utils::$context['category']['editable_name'], '" size="30" tabindex="', Utils::$context['tabindex']++, '">
<input type="text" name="cat_name" value="', Utils::$context['category']['editable_name'], '" size="30">
</dd>
<dt>
<strong>', Lang::getTxt('mboards_description', file: 'ManageBoards'), '</strong><br>
Expand All @@ -160,7 +160,7 @@ function template_modify_category()
<span class="smalltext">', Lang::getTxt('collapse_desc', file: 'ManageBoards'), '</span>
</dt>
<dd>
<input type="checkbox" name="collapse"', Utils::$context['category']['can_collapse'] ? ' checked' : '', ' tabindex="', Utils::$context['tabindex']++, '">
<input type="checkbox" name="collapse"', Utils::$context['category']['can_collapse'] ? ' checked' : '', '>
</dd>';

// Show any category settings added by mods using the 'integrate_edit_category' hook.
Expand All @@ -185,10 +185,10 @@ function template_modify_category()

if (isset(Utils::$context['category']['is_new']))
echo '
<input type="submit" name="add" value="', Lang::getTxt('mboards_add_cat_button', file: 'ManageBoards'), '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', Utils::$context['tabindex']++, '" class="button">';
<input type="submit" name="add" value="', Lang::getTxt('mboards_add_cat_button', file: 'ManageBoards'), '" onclick="return !isEmptyText(this.form.cat_name);" class="button">';
else
echo '
<input type="submit" name="edit" value="', Lang::getTxt('modify', file: 'General'), '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', Utils::$context['tabindex']++, '" class="button">
<input type="submit" name="edit" value="', Lang::getTxt('modify', file: 'General'), '" onclick="return !isEmptyText(this.form.cat_name);" class="button">
<input type="submit" name="delete" value="', Lang::getTxt('mboards_delete_cat', file: 'ManageBoards'), '" data-confirm="', Lang::getTxt('cat_delete_confirm', file: 'ManageBoards'), '" class="button you_sure">';
echo '
<input type="hidden" name="', Utils::$context['session_var'], '" value="', Utils::$context['session_id'], '">
Expand Down
4 changes: 2 additions & 2 deletions Themes/default/ManageMail.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ function template_mailtest()
<div class="windowbg">
<dl id="post_header">
<dt><span id="caption_subject">', Lang::getTxt('subject', file: 'General'), '</span></dt>
<dd><input type="text" name="subject" tabindex="1" size="80" maxlength="80"></dd>
<dd><input type="text" name="subject" size="80" maxlength="80"></dd>
</dl>
<textarea class="editor" name="message" rows="5" cols="200" tabindex="2"></textarea>
<textarea class="editor" name="message" rows="5" cols="200"></textarea>
<dl id="post_footer">
<dd><input type="submit" value="', Lang::getTxt('send_message', file: 'General'), '" class="button"></dd>
</dl>
Expand Down
2 changes: 1 addition & 1 deletion Themes/default/ManageNews.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ function template_email_members_compose()
<label', (isset(Utils::$context['post_error']['no_subject']) ? ' class="error"' : ''), ' for="subject" id="caption_subject">', Lang::getTxt('subject', file: 'General'), '</label>
</dt>
<dd id="pm_subject">
<input type="text" id="subject" name="subject" value="', Utils::$context['subject'], '" tabindex="', Utils::$context['tabindex']++, '" size="80" maxlength="84"', isset(Utils::$context['post_error']['no_subject']) ? ' class="error"' : '', '>
<input type="text" id="subject" name="subject" value="', Utils::$context['subject'], '" size="80" maxlength="84"', isset(Utils::$context['post_error']['no_subject']) ? ' class="error"' : '', '>
</dd>
</dl>
<div id="bbcBox_message"></div>';
Expand Down
6 changes: 3 additions & 3 deletions Themes/default/PersonalMessage.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ function template_send()
// Autosuggest will be added by the JavaScript later on.
echo '
<dd id="pm_to" class="clear_right">
<input type="text" name="to" id="to_control" value="', Utils::$context['to_value'], '" tabindex="', Utils::$context['tabindex']++, '" size="20">';
<input type="text" name="to" id="to_control" value="', Utils::$context['to_value'], '" size="20">';

// A link to add BCC, only visible with JavaScript enabled.
echo '
Expand All @@ -1046,7 +1046,7 @@ function template_send()
<span', (isset(Utils::$context['post_error']['no_to']) || isset(Utils::$context['post_error']['bad_bcc']) ? ' class="error"' : ''), ' id="caption_bbc">', trim(Lang::getTxt('pm_bcc', ['list' => ''], file: 'PersonalMessage')), '</span>
</dt>
<dd id="bcc_div2">
<input type="text" name="bcc" id="bcc_control" value="', Utils::$context['bcc_value'], '" tabindex="', Utils::$context['tabindex']++, '" size="20">
<input type="text" name="bcc" id="bcc_control" value="', Utils::$context['bcc_value'], '" size="20">
<div id="bcc_item_list_container"></div>
</dd>';

Expand All @@ -1056,7 +1056,7 @@ function template_send()
<span', (isset(Utils::$context['post_error']['no_subject']) ? ' class="error"' : ''), ' id="caption_subject">', Lang::getTxt('subject', file: 'General'), '</span>
</dt>
<dd id="pm_subject">
<input type="text" name="subject" value="', Utils::$context['subject'], '" tabindex="', Utils::$context['tabindex']++, '" size="80" maxlength="80"', isset(Utils::$context['post_error']['no_subject']) ? ' class="error"' : '', '>
<input type="text" name="subject" value="', Utils::$context['subject'], '" size="80" maxlength="80"', isset(Utils::$context['post_error']['no_subject']) ? ' class="error"' : '', '>
</dd>
</dl>';

Expand Down
Loading