<?php
/**
 * Ce script définit la classe 'entreprise'.
 *
 * @package opencimetiere
 * @version SVN : $Id$
 */

require_once "../gen/obj/entreprise.class.php";

/**
 * Définition de la classe 'entreprise' (om_dbform).
 */
class entreprise extends entreprise_gen {

    function setOnchange(&$form, $maj) {
        //
        parent::setOnchange($form, $maj);
        //
        $form->setOnchange("nomentreprise","this.value=this.value.toUpperCase()");
        $form->setOnchange("adresse1","this.value=this.value.toUpperCase()");
        $form->setOnchange("adresse2","this.value=this.value.toUpperCase()");
        $form->setOnchange("ville","this.value=this.value.toUpperCase()");
    }

    function setSelect(&$form, $maj, &$dnu1 = null, $dnu2 = null) {
        parent::setSelect($form, $maj);
        //
        if ($maj < 2) {
            //pompes funebres
            $contenu=array();
            $contenu[0]=array('Non','Oui');
            $contenu[1]=array(__("Non"),__("Oui"));
            $form->setSelect("pf",$contenu);
        }
    }

    function setType(&$form, $maj) {
        parent::setType($form, $maj);
        //
        if ($maj < 2) {
            $form->setType('pf','select');
        }
    }
}
