Skip to content

Commit 5f2987e

Browse files
committed
Use HTML5 features.
Use the HTML5 input types in a load of places to allow for more client side validation and make text areas be spell checked for @Red-Cross-Knight
1 parent 603f1d9 commit 5f2987e

File tree

75 files changed

+171
-171
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+171
-171
lines changed

admin/Default/1.6/universe_create_locations.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
}
5050
$extra .= '</span>';
5151
$PHP_OUTPUT.= '<tr><td class="right">' . $location->getName() . $extra . '</td><td class="left">';
52-
$PHP_OUTPUT.= '<input type="text" value="';
52+
$PHP_OUTPUT.= '<input type="number" value="';
5353
if (isset($totalLocs[$location->getTypeID()])) $PHP_OUTPUT.= $totalLocs[$location->getTypeID()];
5454
else $PHP_OUTPUT.= '0';
5555
$PHP_OUTPUT.= '" size="5" name="loc' . $location->getTypeID() . '"></td></tr>';

admin/Default/1.6/universe_create_planets.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
$PHP_OUTPUT.= 'Working on Galaxy : ' . $galaxy->getName() . ' (' . $galaxy->getGalaxyID() . ')<br />';
2525
$PHP_OUTPUT.= '<table class="standard">';
2626
$PHP_OUTPUT.= '<tr><td class="right">Uninhabited Planets</td><td class="left">';
27-
$PHP_OUTPUT.= '<input type="text" value="' . $numberOfPlanets . '" size="5" name="Uninhab"></td></tr>';
27+
$PHP_OUTPUT.= '<input type="number" value="' . $numberOfPlanets . '" size="5" name="Uninhab"></td></tr>';
2828
$PHP_OUTPUT.= '<tr><td class="right">NPC Planets - Won\'t work</td><td class="left">';
29-
$PHP_OUTPUT.= '<input type="text" value="' . (isset($planet_info['NPC']) ? $planet_info['NPC'] : 0) . '" size="5" name="NPC"></td></tr>';
29+
$PHP_OUTPUT.= '<input type="number" value="' . (isset($planet_info['NPC']) ? $planet_info['NPC'] : 0) . '" size="5" name="NPC"></td></tr>';
3030
$PHP_OUTPUT.= '<tr><td colspan="2" class="center"><input type="submit" name="submit" value="Create Planets">';
3131
$container = $var;
3232
$container['body'] = '1.6/universe_create_sectors.php';

admin/Default/1.6/universe_create_ports.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
$PHP_OUTPUT.= '<table class="standard">';
4242
for ($i=1;$i<=9;$i++) {
4343
$PHP_OUTPUT.= '<tr><td class="right">Level ' . $i . ' Ports</td><td class="left">';
44-
$PHP_OUTPUT.= '<input type="text" value="';
44+
$PHP_OUTPUT.= '<input type="number" value="';
4545
$PHP_OUTPUT.= $totalPorts[$i];
4646
$PHP_OUTPUT.= '" size="5" name="port' . $i . '" onFocus="startCalc();" onBlur="stopCalc();"></td></tr>';
4747
}
48-
$PHP_OUTPUT.= '<tr><td class="right">Total Ports</td><td class="left"><input size="5" name="total" type="text" value="';
48+
$PHP_OUTPUT.= '<tr><td type="number" class="right">Total Ports</td><td class="left"><input type="number" size="5" name="total" value="';
4949
$PHP_OUTPUT.= $total['Ports'];
5050
$PHP_OUTPUT.= '"></td></tr>';
5151
$PHP_OUTPUT.= '</table>';
@@ -54,20 +54,20 @@
5454

5555
$races =& Globals::getRaces();
5656
foreach ($races as &$race) {
57-
$PHP_OUTPUT.= '<tr><td class="right">' . $race['Race Name'] . '</td><td class="left"><input size="5" name="race' . $race['Race ID'] . '" value="0" type="text" onFocus="startRaceCalc();" onBlur="stopRaceCalc();"></td></tr>';
57+
$PHP_OUTPUT.= '<tr><td class="right">' . $race['Race Name'] . '</td><td class="left"><input type="number" size="5" name="race' . $race['Race ID'] . '" value="0" onFocus="startRaceCalc();" onBlur="stopRaceCalc();"></td></tr>';
5858
}
59-
$PHP_OUTPUT.= '<tr><td class="right">Total</td><td class="left"><input size="5" name="racedist" value="0" type="text"></td></tr>';
59+
$PHP_OUTPUT.= '<tr><td class="right">Total</td><td class="left"><input type="number" size="5" name="racedist" value="0"></td></tr>';
6060
$PHP_OUTPUT.= '<tr><td class="center" colspan="2">';
6161
$PHP_OUTPUT.= '<div class="buttonA"><a class="buttonA" onClick="setEven();">&nbsp;Set All Equal&nbsp;</a></div></td></tr>';
6262
$PHP_OUTPUT.= '</table>';
6363
$PHP_OUTPUT.= '</td><td class="center"><table class="standard">';
6464
for ($i=1;$i<=20;$i++) {
6565
$PHP_OUTPUT.= '<tr><td class="right">Level ' . $i . ' Mines</td><td class="left">';
66-
$PHP_OUTPUT.= '<input type="text" value="';
66+
$PHP_OUTPUT.= '<input type="number" value="';
6767
$PHP_OUTPUT.= $totalMines[$i];
6868
$PHP_OUTPUT.= '" size="5" name="mine' . $i . '" onFocus="startCalcM();" onBlur="stopCalcM();"></td></tr>';
6969
}
70-
$PHP_OUTPUT.= '<tr><td class="right">Total Mines</td><td class="left"><input size="5" name="totalM" type="text" value="';
70+
$PHP_OUTPUT.= '<tr><td class="right">Total Mines</td><td class="left"><input type="number" size="5" name="totalM" value="';
7171
$PHP_OUTPUT.= $total['Mines'];
7272
$PHP_OUTPUT.= '"></td></tr>';
7373
$PHP_OUTPUT.= '</table></td></tr>';

admin/Default/1.6/universe_create_sector_details.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
$PHP_OUTPUT.= '></td></tr>';
6262
$PHP_OUTPUT.= '<tr><td width="5%" class="center">&nbsp;</td><td width="90%" class="center"><input type="checkbox" name="down" value="down"';
6363
if ($sector->hasLinkDown()) $PHP_OUTPUT.= ' checked';
64-
$PHP_OUTPUT.= '></td><td width="5%" class="center">Warp:<br /><input size="5" type="text" name="warp" value="';
64+
$PHP_OUTPUT.= '></td><td width="5%" class="center">Warp:<br /><input type="number" size="5" name="warp" value="';
6565
if ($sector->hasWarp()) {
6666
$warpSector=& $sector->getWarpSector();
6767
$PHP_OUTPUT.= $warpSector->getSectorID();

admin/Default/1.6/universe_create_sectors.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
$container['url'] = '1.6/universe_create_save_processing.php';
121121
$container['body'] = '1.6/universe_create_sectors.php';
122122
$PHP_OUTPUT.= create_echo_form($container);
123-
$PHP_OUTPUT.= 'Connection Percent<br /><input type="text" name="connect" value="' . $connectivity . '" size="3"><br />';
123+
$PHP_OUTPUT.= 'Connection Percent<br /><input type="number" name="connect" value="' . $connectivity . '" size="3"><br />';
124124
$PHP_OUTPUT.= '<input type="submit" name="submit" value="Redo Connections"></form></td><td class="center vert_cent" width="33%">';
125125
$container = $var;
126126
$container['body'] = '1.6/universe_create_locations.php';
@@ -155,7 +155,7 @@
155155
$container['url'] = '1.6/universe_create_save_processing.php';
156156
$container['body'] = '1.6/universe_create_sectors.php';
157157
$PHP_OUTPUT.= create_echo_form($container);
158-
$PHP_OUTPUT.= 'Sector ID<br /><input type="text" size="5" name="sector_edit"><br /><input type="submit" value="Modify Sector" name="submit">';
158+
$PHP_OUTPUT.= 'Sector ID<br /><input type="number" size="5" name="sector_edit"><br /><input type="submit" value="Modify Sector" name="submit">';
159159
$PHP_OUTPUT.= '</form></td></tr><tr><td class="center" colspan="3">';
160160
//if ($warning) {
161161
// $PHP_OUTPUT.= '<span class="small">Note: When you press "Create Universe" ALL universe data will be erased and rewritten.<br />';

admin/Default/1.6/universe_create_warps.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
$PHP_OUTPUT.= '<table class="standard">';
2828
foreach ($galaxies as &$eachGalaxy) {
2929
$PHP_OUTPUT.= '<tr><td class="right">' . $eachGalaxy->getName() . '</td><td class="left">';
30-
$PHP_OUTPUT.= '<input type="text" value="';
30+
$PHP_OUTPUT.= '<input type="number" value="';
3131
if (isset($warps[$eachGalaxy->getGalaxyID()])) $PHP_OUTPUT.= $warps[$eachGalaxy->getGalaxyID()];
3232
else $PHP_OUTPUT.= '0';
3333
$PHP_OUTPUT.= '" size="5" name="warp' . $eachGalaxy->getGalaxyID() . '"></td></tr>';

admin/Default/album_moderate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
if (empty($account_id)) {
1616
$PHP_OUTPUT.=('Enter the account id of the entry you wish to edit:');
1717
$PHP_OUTPUT.=create_echo_form(create_container('skeleton.php', 'album_moderate.php'));
18-
$PHP_OUTPUT.=('<input type="text" name="account_id" size="5" id="InputFields" class="center">&nbsp;');
18+
$PHP_OUTPUT.=('<input type="number" name="account_id" size="5" id="InputFields" class="center">&nbsp;');
1919
$PHP_OUTPUT.=create_submit('Submit');
2020
$PHP_OUTPUT.=('</form>');
2121
$PHP_OUTPUT.=($error_msg);
@@ -73,7 +73,7 @@
7373

7474
$PHP_OUTPUT.=('<td colspan="2"><img src="'.URL.'/upload/'.$account_id.'"></td>');
7575
$PHP_OUTPUT.=('<td style="font-size:75%;">You can edit the text that will be sent<br />to that user as an email if you reset his picture!<br /><br />');
76-
$PHP_OUTPUT.=('<textarea name="email_txt" id="InputFields" style="width:300;height:200;">'.$default_email.'</textarea></td>');
76+
$PHP_OUTPUT.=('<textarea spellcheck="true" name="email_txt" id="InputFields" style="width:300;height:200;">'.$default_email.'</textarea></td>');
7777
$PHP_OUTPUT.=('</form>');
7878
$PHP_OUTPUT.=('</tr>');
7979

admin/Default/anon_acc_view.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
$container['body'] = 'anon_acc_view.php';
1111
$PHP_OUTPUT.=('What account would you like to view?<br />');
1212
$PHP_OUTPUT.=create_echo_form($container);
13-
$PHP_OUTPUT.=('Account ID: <input type="text" name="anon_account" /><br />');
14-
$PHP_OUTPUT.=('Game ID: <input type="text" name="game_id" /><br />');
13+
$PHP_OUTPUT.=('Account ID: <input type="number" name="anon_account" /><br />');
14+
$PHP_OUTPUT.=('Game ID: <input type="number" name="game_id" /><br />');
1515
$PHP_OUTPUT.=create_submit('Continue');
1616
$PHP_OUTPUT.=('</form>');
1717

admin/Default/changelog.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@
7070
$PHP_OUTPUT.=('</tr>');
7171

7272
$PHP_OUTPUT.=('<tr>');
73-
$PHP_OUTPUT.=('<td><textarea name="change_message" id="InputFields" style="width:400px;height:50px;"></textarea></td>');
74-
$PHP_OUTPUT.=('<td><textarea name="affected_db" id="InputFields" style="width:200px;height:50px;"></textarea></td>');
73+
$PHP_OUTPUT.=('<td><textarea spellcheck="true" name="change_message" id="InputFields" style="width:400px;height:50px;"></textarea></td>');
74+
$PHP_OUTPUT.=('<td><textarea spellcheck="true" name="affected_db" id="InputFields" style="width:200px;height:50px;"></textarea></td>');
7575
$PHP_OUTPUT.=('</tr>');
7676

7777
$PHP_OUTPUT.=('<tr>');

admin/Default/game_status.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
$container['url'] = 'game_status_processing.php';
1010
$PHP_OUTPUT.=create_echo_form($container);
1111
$PHP_OUTPUT.=('If you wish to close the game please enter a reason for the closure.<br /><br />');
12-
$PHP_OUTPUT.=('<input type="text" name="close_reason" maxlength="255" size="100" id="InputFields"><br /><br />');
12+
$PHP_OUTPUT.=('<input spellcheck="true" type="text" name="close_reason" maxlength="255" size="100" id="InputFields"><br /><br />');
1313
$PHP_OUTPUT.=create_submit('Close');
1414
$PHP_OUTPUT.=('</form>');
1515

0 commit comments

Comments
 (0)