Update modal.php

Make use of JLayoutHelper where possible