/** * Outputs a form for creating or editing mandant * * @param int $mandantID * @param String $company * @param Array $locations * @param Array $mandantLocations */ public static function mandantFormOutput($mandantID = null, $company = null, $locations = null, $mandantLocations = null) { $output = "<div class='wrap'>\n<?php screen_icon(); ?>\n<h2>" . HEADER . "</h2>\n<form action = '' method = 'post' name = 'mandant'>\n<table>"; if ($mandantID != null) { $output .= "<tr><td><b>" . DELETE_MANDANT . "?</b></td><td><input type='checkbox' id = 'deleteMandant' name='deleteMandant' value='yes'>"; $output .= "<tr><td><b>" . MANDANT_COMPANY . "</b></td><td>" . View::textFormOutput('company', $company) . "</td></tr>"; } else { $output .= "<tr><td><b>" . MANDANT_COMPANY . "</b></td><td>" . View::textFormOutput('company') . "</td></tr>"; } $output .= ' </table>'; $output .= View::outputMandantLocations($locations, $mandantLocations); $output .= '<input type="button" onclick = "mandantFormSubmit()" value="' . BUTTON_SUBMIT . '">'; echo $output; }