ChrisBAshton/smartresolution

View on GitHub
webapp/core/view/dispute_close.html

Summary

Maintainability
Test Coverage
<h1>Close Dispute</h1>

<?php
    if (noSystemMessages()) :
        if ($dispute->getState()->canCloseDispute()) :
            $message = array(
                'class'   => 'bg-padded bg-warning',
                'details' => "By closing the dispute, you're indicating one of two things. Either the dispute was resolved successfully, or you're taking the dispute to court. Once you close a dispute, you cannot reopen it."
            );
        else:
            $message = array(
                'class'   => 'bg-padded bg-warning',
                'details' => "You have already closed this dispute."
            );
        endif;
?>
    <p class="<?= $message['class']; ?>"><?= $message['details']; ?></p>
<?php endif; ?>

<?php if ($dispute->getState()->canCloseDispute()) : ?>
<form name="close_dispute" method="post">

    <div class="col-lg-12">
        <p>
            <input name="verdict" value="resolved" id="resolved" type="radio" /> <label for="resolved" class="text-success">Dispute was resolved successfully</label>
        </p>
        <p>
            <input name="verdict" value="failed" id="failed" type="radio" /> <label for="failed" class="text-danger">Unable to resolve dispute with Online Dispute Resolution</label>
        </p>
    </div>

    <div class="col-lg-12">
        <button class="btn btn-lg btn-primary btn-block" type="submit">Close Dispute</button>
    </div>

</form>
<?php endif; ?>