<?php
//$Id$ 
//gen openMairie le 10/05/2013 09:18

require_once ("../gen/obj/agent.class.php");

class agent extends agent_gen {

    function agent($id,&$db,$debug) {
        $this->constructeur($id,$db,$debug);
    }// fin constructeur

    function setLib(&$form,$maj) {
        parent::setLib($form, $maj);
        //libelle des champs
        $form->setLib('agent',_('matricule agent'));
    }


    function setOnchange(&$form,$maj){
         parent::setOnchange($form, $maj);
        $form->setOnchange("nom","this.value=this.value.toUpperCase()");
        $form->setOnchange("ville","this.value=this.value.toUpperCase()");
    }
    
    function setVal(&$form,$maj,$validation){
      
        if ($validation==0) {
          if ($maj == 0){
            include ("../dyn/var.inc");
            $form->setVal('cp', $client_cp);
            $form->setVal('ville', $client_ville);
        }}
    }

}// fin classe
?>