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

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

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

    /**
     * SETTER_FORM - setLib.
     *
     * @return void
     */
    function setLib(&$form, $maj) {
        parent::setLib($form, $maj);
        //
        $form->setLib($this->clePrimaire, __("id"));
        $form->setLib('information_generale', __("informations générales"));
    }

    /**
     * SETTER_FORM - setType.
     *
     * @return void
     */
    function setType(&$form, $maj) {
        parent::setType($form, $maj);
        // Gestion du champs geom
        $form->setType('geom','hidden');
        if ($this->f->getParameter("option_localisation") == "sig_interne") {
            if ($maj == 0 || $maj == 1 || $maj == 3) {
                $form->setType('geom', 'geom');
            }
        }
    }

    /**
     * SETTER_FORM - setOnchange.
     *
     * @return void
     */
    function setOnchange(&$form, $maj) {
        parent::setOnchange($form, $maj);
        //
        $form->setOnchange('cimetierelib','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()');
    }
}
