Skip to content

Commit b7c6385

Browse files
committed
nuke tab index
Signed-off-by: John Rayes <[email protected]>
1 parent 6141af3 commit b7c6385

File tree

7 files changed

+40
-56
lines changed

7 files changed

+40
-56
lines changed

Themes/default/Calendar.template.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -756,12 +756,12 @@ function template_calendar_top($calendar_data)
756756

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

761761
if (!empty($calendar_data['end_date']))
762762
echo '
763763
<span>', strtolower(Lang::$txt['to']), '</span>
764-
<input type="text" name="end_date" id="end_date" value="', trim($calendar_data['end_date']), '" tabindex="', Utils::$context['tabindex']++, '" class="date_input end" data-type="date">';
764+
<input type="text" name="end_date" id="end_date" value="', trim($calendar_data['end_date']), '" class="date_input end" data-type="date">';
765765

766766
echo '
767767
<input type="submit" class="button" style="float:none" id="view_button" value="', Lang::$txt['view'], '">
@@ -810,7 +810,7 @@ function template_event_post()
810810
<input type="hidden" name="calendar" value="1">
811811
<div class="event_options_left" id="event_title">
812812
<div>
813-
<input type="text" id="evtitle" name="evtitle" maxlength="255" size="55" value="', Utils::$context['event']['title'], '" tabindex="', Utils::$context['tabindex']++, '">
813+
<input type="text" id="evtitle" name="evtitle" maxlength="255" size="55" value="', Utils::$context['event']['title'], '">
814814
</div>
815815
</div>';
816816

@@ -849,19 +849,19 @@ function template_event_post()
849849
<div class="event_options_left" id="event_time_input">
850850
<div>
851851
<span class="label">', Lang::$txt['start'], '</span>
852-
<input type="text" name="start_date" id="start_date" value="', trim(Utils::$context['event']['start_date_orig']), '" tabindex="', Utils::$context['tabindex']++, '" class="date_input start" data-type="date">
853-
<input type="text" name="start_time" id="start_time" maxlength="11" value="', Utils::$context['event']['start_time_orig'], '" tabindex="', Utils::$context['tabindex']++, '" class="time_input start" data-type="time"', !empty(Utils::$context['event']['allday']) ? ' disabled' : '', '>
852+
<input type="text" name="start_date" id="start_date" value="', trim(Utils::$context['event']['start_date_orig']), '" class="date_input start" data-type="date">
853+
<input type="text" name="start_time" id="start_time" maxlength="11" value="', Utils::$context['event']['start_time_orig'], '" class="time_input start" data-type="time"', !empty(Utils::$context['event']['allday']) ? ' disabled' : '', '>
854854
</div>
855855
<div>
856856
<span class="label">', Lang::$txt['end'], '</span>
857-
<input type="text" name="end_date" id="end_date" value="', trim(Utils::$context['event']['end_date_orig']), '" tabindex="', Utils::$context['tabindex']++, '" class="date_input end" data-type="date"', Config::$modSettings['cal_maxspan'] == 1 ? ' disabled' : '', '>
858-
<input type="text" name="end_time" id="end_time" maxlength="11" value="', Utils::$context['event']['end_time_orig'], '" tabindex="', Utils::$context['tabindex']++, '" class="time_input end" data-type="time"', !empty(Utils::$context['event']['allday']) ? ' disabled' : '', '>
857+
<input type="text" name="end_date" id="end_date" value="', trim(Utils::$context['event']['end_date_orig']), '" class="date_input end" data-type="date"', Config::$modSettings['cal_maxspan'] == 1 ? ' disabled' : '', '>
858+
<input type="text" name="end_time" id="end_time" maxlength="11" value="', Utils::$context['event']['end_time_orig'], '" class="time_input end" data-type="time"', !empty(Utils::$context['event']['allday']) ? ' disabled' : '', '>
859859
</div>
860860
</div><!-- #event_time_input -->
861861
<div class="event_options_right" id="event_time_options">
862862
<div id="event_allday">
863863
<label for="allday"><span class="label">', Lang::$txt['calendar_allday'], '</span></label>
864-
<input type="checkbox" name="allday" id="allday"', !empty(Utils::$context['event']['allday']) ? ' checked' : '', ' tabindex="', Utils::$context['tabindex']++, '">
864+
<input type="checkbox" name="allday" id="allday"', !empty(Utils::$context['event']['allday']) ? ' checked' : '', '>
865865
</div>
866866
<div id="event_timezone">
867867
<span class="label">', Lang::$txt['calendar_timezone'], '</span>
@@ -877,7 +877,7 @@ function template_event_post()
877877
</div><!-- #event_time_options -->
878878
<div>
879879
<span class="label">', Lang::$txt['location'], '</span>
880-
<input type="text" name="event_location" id="event_location" maxlength="255" value="', !empty(Utils::$context['event']['location']) ? Utils::$context['event']['location'] : '', '" tabindex="', Utils::$context['tabindex']++, '">
880+
<input type="text" name="event_location" id="event_location" maxlength="255" value="', !empty(Utils::$context['event']['location']) ? Utils::$context['event']['location'] : '', '">
881881
</div>
882882
</fieldset>';
883883

Themes/default/Display.template.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -395,19 +395,19 @@ function template_main()
395395
sTemplateBodyEdit: ', Utils::JavaScriptEscape('
396396
<div id="quick_edit_body_container">
397397
<div id="error_box" class="error"></div>
398-
<textarea class="editor" name="message" rows="12" tabindex="' . Utils::$context['tabindex']++ . '">%body%</textarea><br>
398+
<textarea class="editor" name="message" rows="12">%body%</textarea><br>
399399
<input type="hidden" name="' . Utils::$context['session_var'] . '" value="' . Utils::$context['session_id'] . '">
400400
<input type="hidden" name="topic" value="' . Utils::$context['current_topic'] . '">
401401
<input type="hidden" name="msg" value="%msg_id%">
402402
<div class="righttext quickModifyMargin">
403-
<input type="submit" name="post" value="' . Lang::$txt['save'] . '" 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::$txt['spell_check'] . '" tabindex="' . Utils::$context['tabindex']++ . '" onclick="spellCheck(\'quickModForm\', \'message\');" class="button">' : '') . ' <input type="submit" name="cancel" value="' . Lang::$txt['modify_cancel'] . '" tabindex="' . Utils::$context['tabindex']++ . '" onclick="return oQuickModify.modifyCancel();" class="button">
403+
<input type="submit" name="post" value="' . Lang::$txt['save'] . '" onclick="return oQuickModify.modifySave(\'' . Utils::$context['session_id'] . '\', \'' . Utils::$context['session_var'] . '\');" class="button">' . (Utils::$context['show_spellchecking'] ? ' <input type="button" value="' . Lang::$txt['spell_check'] . '" onclick="spellCheck(\'quickModForm\', \'message\');" class="button">' : '') . ' <input type="submit" name="cancel" value="' . Lang::$txt['modify_cancel'] . '" onclick="return oQuickModify.modifyCancel();" class="button">
404404
</div>
405405
</div>'), ',
406-
sTemplateSubjectEdit: ', Utils::JavaScriptEscape('<input type="text" name="subject" value="%subject%" size="80" maxlength="80" tabindex="' . Utils::$context['tabindex']++ . '">'), ',
406+
sTemplateSubjectEdit: ', Utils::JavaScriptEscape('<input type="text" name="subject" value="%subject%" size="80" maxlength="80">'), ',
407407
sTemplateBodyNormal: ', Utils::JavaScriptEscape('%body%'), ',
408408
sTemplateSubjectNormal: ', Utils::JavaScriptEscape('<a href="' . Config::$scripturl . '?topic=' . Utils::$context['current_topic'] . '.msg%msg_id%#msg%msg_id%" rel="nofollow">%subject%</a>'), ',
409409
sTemplateTopSubject: ', Utils::JavaScriptEscape('%subject%'), ',
410-
sTemplateReasonEdit: ', Utils::JavaScriptEscape(Lang::$txt['reason_for_edit'] . ': <input type="text" name="modify_reason" value="%modify_reason%" size="80" maxlength="80" tabindex="' . Utils::$context['tabindex']++ . '" class="quickModifyMargin">'), ',
410+
sTemplateReasonEdit: ', Utils::JavaScriptEscape(Lang::$txt['reason_for_edit'] . ': <input type="text" name="modify_reason" value="%modify_reason%" size="80" maxlength="80" class="quickModifyMargin">'), ',
411411
sTemplateReasonNormal: ', Utils::JavaScriptEscape('%modify_text'), ',
412412
sErrorBorderStyle: ', Utils::JavaScriptEscape('1px solid red'), (Utils::$context['can_reply']) ? ',
413413
sFormRemoveAccessKeys: \'postmodify\'' : '', '
@@ -963,7 +963,7 @@ function template_quickreply()
963963
', Lang::$txt['name'], ':
964964
</dt>
965965
<dd>
966-
<input type="text" name="guestname" size="25" value="', Utils::$context['name'], '" tabindex="', Utils::$context['tabindex']++, '" required>
966+
<input type="text" name="guestname" size="25" value="', Utils::$context['name'], '" required>
967967
</dd>';
968968

969969
if (empty(Config::$modSettings['guest_post_no_email']))
@@ -973,7 +973,7 @@ function template_quickreply()
973973
', Lang::$txt['email'], ':
974974
</dt>
975975
<dd>
976-
<input type="email" name="email" size="25" value="', Utils::$context['email'], '" tabindex="', Utils::$context['tabindex']++, '" required>
976+
<input type="email" name="email" size="25" value="', Utils::$context['email'], '" required>
977977
</dd>';
978978
}
979979

Themes/default/GenericControls.template.php

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -90,23 +90,7 @@ function template_control_richedit_buttons($editor_id)
9090
</span>
9191
<span class="post_button_container">';
9292

93-
$tempTab = Utils::$context['tabindex'];
94-
95-
if (!empty(Utils::$context['drafts_save']))
96-
$tempTab++;
97-
elseif ($editor_context['preview_type'])
98-
$tempTab++;
99-
elseif (Utils::$context['show_spellchecking'])
100-
$tempTab++;
101-
102-
$tempTab++;
103-
Utils::$context['tabindex'] = $tempTab;
104-
10593
foreach (Utils::$context['richedit_buttons'] as $name => $button) {
106-
if ($name == 'spell_check') {
107-
$button['onclick'] = 'oEditorHandle_' . $editor_id . '.spellCheckStart();';
108-
}
109-
11094
if ($name == 'preview') {
11195
$button['value'] = isset($editor_context['labels']['preview_button']) ? $editor_context['labels']['preview_button'] : $button['value'];
11296
$button['onclick'] = $editor_context['preview_type'] == Editor::PREVIEW_XML ? '' : 'return submitThisOnce(this);';
@@ -115,12 +99,12 @@ function template_control_richedit_buttons($editor_id)
11599

116100
if ($button['show']) {
117101
echo '
118-
<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"' : '', '>';
102+
<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"' : '', '>';
119103
}
120104
}
121105

122106
echo '
123-
<input type="submit" value="', isset($editor_context['labels']['post_button']) ? $editor_context['labels']['post_button'] : Lang::$txt['post'], '" name="post" tabindex="', --$tempTab, '" onclick="return submitThisOnce(this);" accesskey="s" class="button">
107+
<input type="submit" value="', isset($editor_context['labels']['post_button']) ? $editor_context['labels']['post_button'] : Lang::$txt['post'], '" name="post" accesskey="s" class="button">
124108
</span>';
125109

126110
// Start an instance of the auto saver if its enabled
@@ -206,7 +190,7 @@ function template_control_verification($verify_id, $display_type = 'all', $reset
206190
<div class="smalltext" style="margin: 4px 0 8px 0;">
207191
<a href="', $verify_context->image_href, ';sound" id="visual_verification_', $verify_id, '_sound" rel="nofollow">', Lang::$txt['visual_verification_sound'], '</a> / <a href="#visual_verification_', $verify_id, '_refresh" id="visual_verification_', $verify_id, '_refresh">', Lang::$txt['visual_verification_request_new'], '</a>', $display_type != 'quick_reply' ? '<br>' : '', '<br>
208192
', Lang::$txt['visual_verification_description'], ':', $display_type != 'quick_reply' ? '<br>' : '', '
209-
<input type="text" name="', $verify_id, '_vv[code]" value="" size="30" tabindex="', Utils::$context['tabindex']++, '" autocomplete="off" required>
193+
<input type="text" name="', $verify_id, '_vv[code]" value="" size="30" autocomplete="off" required>
210194
</div>';
211195
}
212196

@@ -228,7 +212,7 @@ function template_control_verification($verify_id, $display_type = 'all', $reset
228212
echo '
229213
<div class="smalltext">
230214
', $verify_context->questions[$qIndex]['q'], ':<br>
231-
<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>
215+
<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>
232216
</div>';
233217
}
234218

Themes/default/ManageBoards.template.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function template_modify_category()
146146
<span class="smalltext">', Lang::$txt['name_on_display'], '</span>
147147
</dt>
148148
<dd>
149-
<input type="text" name="cat_name" value="', Utils::$context['category']['editable_name'], '" size="30" tabindex="', Utils::$context['tabindex']++, '">
149+
<input type="text" name="cat_name" value="', Utils::$context['category']['editable_name'], '" size="30">
150150
</dd>
151151
<dt>
152152
<strong>', Lang::$txt['mboards_description'], '</strong><br>
@@ -160,7 +160,7 @@ function template_modify_category()
160160
<span class="smalltext">', Lang::$txt['collapse_desc'], '</span>
161161
</dt>
162162
<dd>
163-
<input type="checkbox" name="collapse"', Utils::$context['category']['can_collapse'] ? ' checked' : '', ' tabindex="', Utils::$context['tabindex']++, '">
163+
<input type="checkbox" name="collapse"', Utils::$context['category']['can_collapse'] ? ' checked' : '', '>
164164
</dd>';
165165

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

186186
if (isset(Utils::$context['category']['is_new']))
187187
echo '
188-
<input type="submit" name="add" value="', Lang::$txt['mboards_add_cat_button'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', Utils::$context['tabindex']++, '" class="button">';
188+
<input type="submit" name="add" value="', Lang::$txt['mboards_add_cat_button'], '" onclick="return !isEmptyText(this.form.cat_name);" class="button">';
189189
else
190190
echo '
191-
<input type="submit" name="edit" value="', Lang::$txt['modify'], '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', Utils::$context['tabindex']++, '" class="button">
191+
<input type="submit" name="edit" value="', Lang::$txt['modify'], '" onclick="return !isEmptyText(this.form.cat_name);" class="button">
192192
<input type="submit" name="delete" value="', Lang::$txt['mboards_delete_cat'], '" data-confirm="', Lang::$txt['cat_delete_confirm'], '" class="button you_sure">';
193193
echo '
194194
<input type="hidden" name="', Utils::$context['session_var'], '" value="', Utils::$context['session_id'], '">

Themes/default/ManageNews.template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ function template_email_members_compose()
216216
<label', (isset(Utils::$context['post_error']['no_subject']) ? ' class="error"' : ''), ' for="subject" id="caption_subject">', Lang::$txt['subject'], '</label>
217217
</dt>
218218
<dd id="pm_subject">
219-
<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"' : '', '>
219+
<input type="text" id="subject" name="subject" value="', Utils::$context['subject'], '" size="80" maxlength="84"', isset(Utils::$context['post_error']['no_subject']) ? ' class="error"' : '', '>
220220
</dd>
221221
</dl>
222222
<div id="bbcBox_message"></div>';

Themes/default/PersonalMessage.template.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ function template_send()
10261026
// Autosuggest will be added by the JavaScript later on.
10271027
echo '
10281028
<dd id="pm_to" class="clear_right">
1029-
<input type="text" name="to" id="to_control" value="', Utils::$context['to_value'], '" tabindex="', Utils::$context['tabindex']++, '" size="20">';
1029+
<input type="text" name="to" id="to_control" value="', Utils::$context['to_value'], '" size="20">';
10301030

10311031
// A link to add BCC, only visible with JavaScript enabled.
10321032
echo '
@@ -1045,7 +1045,7 @@ function template_send()
10451045
<span', (isset(Utils::$context['post_error']['no_to']) || isset(Utils::$context['post_error']['bad_bcc']) ? ' class="error"' : ''), ' id="caption_bbc">', Lang::$txt['pm_bcc'], ':</span>
10461046
</dt>
10471047
<dd id="bcc_div2">
1048-
<input type="text" name="bcc" id="bcc_control" value="', Utils::$context['bcc_value'], '" tabindex="', Utils::$context['tabindex']++, '" size="20">
1048+
<input type="text" name="bcc" id="bcc_control" value="', Utils::$context['bcc_value'], '" size="20">
10491049
<div id="bcc_item_list_container"></div>
10501050
</dd>';
10511051

@@ -1055,7 +1055,7 @@ function template_send()
10551055
<span', (isset(Utils::$context['post_error']['no_subject']) ? ' class="error"' : ''), ' id="caption_subject">', Lang::$txt['subject'], ':</span>
10561056
</dt>
10571057
<dd id="pm_subject">
1058-
<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"' : '', '>
1058+
<input type="text" name="subject" value="', Utils::$context['subject'], '" size="80" maxlength="80"', isset(Utils::$context['post_error']['no_subject']) ? ' class="error"' : '', '>
10591059
</dd>
10601060
</dl>';
10611061

0 commit comments

Comments
 (0)