public static function init($multidataId, $maxSize, $urlAjax, $properties)
 {
     $data = array("size" => 0, "overlySize" => 0, "id" => $multidataId, "max" => $maxSize, "url" => $urlAjax, "properties" => $properties, "values" => null, "errors" => array());
     OutilsMultidataForm::initValues($data);
     return $data;
 }
Beispiel #2
0
 $lesMedicaments = GsbModele::getLesMedicaments();
 // Données auto
 $info_connexion = null;
 $numeroGet = GsbModele::getCompteRenduLeDernierNumeroDuVisiteur(GsbUtilisateur::$Matricule);
 $numero = is_null($numeroGet) ? 0 : $numeroGet + 1;
 $echantillons = false;
 // Données saisie
 $dateVisite = date("Y-m-d");
 $choixPraticien = "";
 $remplacant = false;
 $choixMotif = "no";
 $motifAutre = "";
 $motifAutreActive = false;
 $bilan = "";
 $documentation = false;
 $echantillonsMultidataForm = OutilsMultidataForm::init("echantillonsDonnees", 25, OutilsUrl::composer("compte-rendu", "ajax-saisie-echantillons"), array("choixMedicament", "qteOfferte"));
 // Valider
 $valid = array();
 $valid["dateVisite"] = 1;
 $valid["choixPraticien"] = 1;
 $valid["choixMotif"] = 1;
 $valid["motifAutre"] = 1;
 $valid["bilan"] = 1;
 $valid["echantillons"] = 1;
 // Si Formulaire
 if (OutilsForm::existePostEntrees(array("dateVisite", "choixPraticien", "choixMotif", "bilan"))) {
     $dateVisite = $_POST["dateVisite"];
     $valid["dateVisite"] = OutilsForm::valideDate($dateVisite, time()) ? 1 : 0;
     //
     $choixPraticien = $_POST["choixPraticien"];
     $valid["choixPraticien"] = is_array(GsbModele::getLePraticienDetails($choixPraticien));
Beispiel #3
0
        OutilsForm::validProblemePourNombreDeCaractere($valid["bilan"], "Le bilan", strlen($bilan), 2, 512);
        ?>
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-6">
								<label for="documentation"><input type="checkbox" name="documentation" id="documentation" <?php 
        OutilsForm::checked($documentation);
        ?>
> Documentation fournit</label>
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-12">
								<?php 
        OutilsMultidataForm::implanter($echantillonsMultidataForm, '<i class="fa fa-list fa-fw"></i> Echantillons</h4>', array("Medicament", "Quantité offerte"));
        ?>
								<?php 
        /*
        								<div class="panel panel-default">
        									<div class="panel-heading"><h4 class="panel-title"></div>
        									<div class="panel-body">
        										<?php
        										OutilsForm::implanterAjaxMultipleDonnees($echantillonsDonnees);
        										?>
        									</div>
        									<div class="panel-footer"><a id="MD-echantillonsDonnees-append" class="btn btn-default" onclick="AjaxMultipleDonneesAjouter(&quot;echantillonsDonnees&quot;,&quot;http://ppe.localhost/GSB/trunk/compte-rendu/ajax-saisie-echantillons&quot;,25, null);"><i class="fa fa-plus-circle fa-fw"></i> Ajouter</a></div>
        								</div>
        */
        ?>
							</div>
    OutilsForm::selectedCompose($choixMedicament, $unMedicament['MED_DEPOTLEGAL']);
    ?>
><?php 
    echo $unMedicament['MED_NOMCOMMERCIAL'] . " (" . $unMedicament['MED_DEPOTLEGAL'] . ")";
    ?>
</option><?php 
}
?>
	</select>
	<?php 
OutilsForm::validProbleme($valid["choixMedicament"], "Le médicament");
?>
</td>
<td>
	<input type="number" min="1" max="500" class="form-control" name="<?php 
echo OutilsMultidataForm::genererName($multidataParam, "qteOfferte");
?>
" placeholder="Quantité offerte" <?php 
OutilsForm::value($qteOfferte);
?>
>
	<?php 
OutilsForm::validProbleme($valid["qteOfferte"], "La quantité offerte");
?>
</td>
<td>
	<a class="btn btn-default" onclick='multidataPop(<?php 
echo '"' . $multidataParam["id"] . '","' . $multidataParam["place"] . '"';
?>
);'><i class="fa fa-minus-circle fa-fw"></i> Supprimer</a>
</td>