Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
13 / 13 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| SetEditRenderer | |
100.00% |
13 / 13 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| renderAddProblemForm | |
100.00% |
13 / 13 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | class SetEditRenderer |
| 4 | { |
| 5 | public static function renderAddProblemForm($set, $tsumegoButtons) |
| 6 | { |
| 7 | echo '<h1>Add Problem</h1>'; |
| 8 | echo '<form id="TsumegoViewForm" method="post" action="/sets/addTsumego/' . $set['Set']['id'] . '" enctype="multipart/form-data">'; |
| 9 | echo '<label for="order">Order:</label>'; |
| 10 | echo '<input type="text" name="order" id="order" value="' . ($tsumegoButtons->highestTsumegoOrder + 1) . '" placeholder="Order" />'; |
| 11 | echo '<input type="hidden" id="set_id" value="' . $set['Set']['id'] . '">'; |
| 12 | echo '<div style="margin-top: 10px;">'; |
| 13 | echo '<label>SGF (choose one, or none for onsite edit):</label><br>'; |
| 14 | echo '<input type="file" name="adminUpload" accept=".sgf" style="margin-bottom: 10px;"><br>'; |
| 15 | echo '<label style="font-weight: normal;">or paste SGF:</label><br>'; |
| 16 | echo '<input id="sgf" type="textarea" placeholder="(;GM[1]FF[4]...)" rows="3">'; |
| 17 | echo '<input type="submit" value="Add" />'; |
| 18 | echo '</div>'; |
| 19 | echo '</form>'; |
| 20 | } |
| 21 | } |