function loadCarInsuranceData(car $car)
{
    $response->model = $car->getModel();
    $response->color = $car->getColor();
    $response->year = $car->getYear();
    $response->license = $car->getLicense();
    $response->imageSource = $car->getInsurance()->getOutputLocation();
    return $response;
}
Example #2
0
function createCarForm(car $car, $title)
{
    print '<fieldset >
				<legend> <h3>V&eacutehicule ' . $title . '</h3> </legend>
				<div style="display:block" >';
    print createDemandTextField(car::MODEL_TAG, $car->getModel(), '', $car->getModelParamName(), '32', $car->getModelParamName(), $car->getModelErrorMessage());
    print createDemandTextField(car::COLOR_TAG, $car->getColor(), '', $car->getColorParamName(), '16', $car->getColorParamName(), $car->getColorErrorMessage());
    print createDemandTextField(car::YEAR_TAG, $car->getYear(), '', $car->getYearParamName(), '4', $car->getYearParamName(), $car->getYearErrorMessage());
    print createDemandTextField(car::LICENSE_TAG, $car->getLicense(), '', $car->getLicenseParamName(), '128', $car->getLicenseParamName(), $car->getLicenseErrorMessage());
    print createCheckBoxField($car->getElectricParamName(), $car->getIsElectric(), car::ELECTRIC_TAG);
    print createDemandFileField(car::INSURANCE_TAG, '(nom de fichier alphanum&eacuterique [a-z][0-9] sans espace)', '', 'file', $car->getInsuranceParamName(), '', $car->getInsuranceParamName(), $car->getInsuranceErrorMessage(), $car->getInsurance());
    print '	</div>			
		</fieldset>';
}
function getCarHtmlContent(car $car)
{
    $carIndex = $car->getIndex();
    return "<span id='demandVerificationInfoContainer'>\t\n\t\t\t\t\t<label class='infoFieldTitleWithBar' >" . util::cleanUTF8('Modèle') . "</label>\n\t\t\t\t\t<label id='car" . $carIndex . "Model' class='infoFieldValue' style='font-size:18px'>" . $car->getModel() . "</label>\n\t\t\t\t\n\t\t\t\t\t<label class='infoFieldTitleWithBar' >Couleur</label>\n\t\t\t\t\t<label id='car" . $carIndex . "Color' class='infoFieldValue' style='font-size:18px'>" . $car->getColor() . "</label> \n\t\t\t\t\n\t\t\t\t\t<label class='infoFieldTitleWithBar' >" . util::cleanUTF8('Année') . "</label>\n\t\t\t\t\t<label id='car" . $carIndex . "Year' class='infoFieldValue' style='font-size:18px'>" . $car->getYear() . "</label> \n\t\t\t\t\n\t\t\t\t\t<label class='infoFieldTitleWithBar' >" . util::cleanUTF8('Année') . "</label>\n\t\t\t\t\t<label id='car" . $carIndex . "License' class='infoFieldValue' style='font-size:18px'>" . $car->getLicense() . "</label>\n\t\t\t\t</span>";
}