| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <div class="container mt-3 py-4">
- <?php
- if($test->status == Test::STATUS_CONFIRMED) {
- $template->renderBeforeTestForm();
- }
- else if($test->status == Test::STATUS_STARTED) {
- $template->renderDuringTestForm();
- }
- else if($test->status == Test::STATUS_PENDING_VERIFICATION) {
- $json = json_decode($template->json);
- $fields = $json->duringTest;
- $values = $test->getValues(true);
- ?>
- <div class="alert alert-info">
- <i class="fal fa-fw fa-info-circle"></i>
- Answer as clearly and accurately as you can otherwise you may be contacted after the test for clarification and/or verification purposes.
- </div>
- <form method="post" id="test-form">
- <?php
- foreach($fields as $field) {
- $name = $field->name ?? false;
- if($name) {
- if(isset($test->$name)) $field->value = $test->$name;
- if(isset($values[$name])) $field->value = $values[$name];
- }
- Form::renderField($field);
- }
- ?>
- <div class="bg-light text-center p-3 mt-3">
- <input type="hidden" name="submit" value="<?=htmlspecialchars($_SESSION["csrf_token"])?>" />
- <button class="btn btn-block btn-primary" type="submit" id="test-submit-button">Submit Test Results</button>
- <small class="form-text text-muted d-none" id="test-no-internet-text">
- <span class="text-danger">No Internet Connectivity</span><br />
- Please check your Internet connectivity and try again.
- </small>
- <small id="test-submit-status">
- </small>
- </div>
- </form>
- <?php
- }
- else {
- ?>
- <h2>Test Completed</h2>
- <div class="alert alert-success">This test is now completed. <a href="/account">Click here</a> to return to the Account page.</div>
- <?php
- }
- ?>
- </div>
|