コード例 #1
0
 public static function getFormHtml($action, $commentaire)
 {
     $htmlCode = FormManager::beginForm("post", $action);
     $htmlCode .= FormManager::addHiddenInput("idArticle", "idArticle", html_entity_decode($commentaire->getIdArticle(), ENT_QUOTES, "UTF-8")) . "<br/>";
     $htmlCode .= FormManager::addTextInput("Login", "login", "login", "50", html_entity_decode($commentaire->getLogin(), ENT_QUOTES, "UTF-8")) . "<br/>";
     $htmlCode .= FormManager::addTextAreaInput("Texte", "texte", "texte", "5", "100", html_entity_decode($commentaire->getTexte(), ENT_QUOTES, "UTF-8")) . "<br/>";
     $htmlCode .= FormManager::addSubmitButton("Envoyer", "class =\"sansLabel \"") . "<br/>";
     $htmlCode .= FormManager::endForm();
     return $htmlCode;
 }
コード例 #2
0
 public static function getFormHTML($action, $article)
 {
     $htmlCode = FormManager::beginForm("post", $action);
     $htmlCode .= FormManager::addTextInput("Titre de l'article", "Titre", "Titre", 100, html_entity_decode($article->getTitre, ENT_QUOTES, "UTF-8")) . "<br/>";
     $htmlCode .= FormManager::addTextInput("Chemin de l'image", "Image", "Image", 100, html_entity_decode($article->getImage, ENT_QUOTES, "UTF-8")) . "<br/>";
     $htmlCode .= FormManager::addTextAreaInput("Texte de l'article", "Contenu", "Contenu", 50, 100, html_entity_decode($article->getTitre, ENT_QUOTES, "UTF-8")) . "<br/>";
     $htmlCode .= FormManager::addSubmitButton("Envoyer", "class=\"sansLabel\"");
     $htmlCode .= FormManager::endForm();
     return $htmlCode;
 }
コード例 #3
0
 public static function getFormErrorsHTML($action, $commentaire, &$dataErrors)
 {
     $htmlCode = FormManager::beginForm("post", $action);
     $htmlCode .= self::addErrorMsg($dataErrors, "texte");
     $htmlCode .= FormManager::addTextAreaInput("Texte du commentaire ", "Contenu", "Contenu", 10, 100, HTMLUtilities::decode($commentaire->getContenu()), 'maxlength = "1000"');
     $htmlCode .= '<div class="submitWrapper">';
     $htmlCode .= FormManager::addSubmitButton();
     $htmlCode .= '</div>';
     $htmlCode .= FormManager::endForm();
     return $htmlCode;
 }
コード例 #4
0
 public static function getFormErrorsHtmlEdition($action, $article, $dataErrors)
 {
     $htmlCode = FormManager::beginForm("post", $action);
     $htmlCode .= self::addErrorMsg($dataErrors, "id");
     $htmlCode .= FormManager::addHiddenInput("Id", "id", "id", "4", html_entity_decode($article->getId(), ENT_QUOTES, "UTF-8")) . "<br/>";
     $htmlCode .= self::addErrorMsg($dataErrors, "titre");
     $htmlCode .= FormManager::addTextInput("Titre", "titre", "titre", "50", html_entity_decode($article->getTitre(), ENT_QUOTES, "UTF-8")) . "<br/>";
     $htmlCode .= self::addErrorMsg($dataErrors, "urlImage");
     $htmlCode .= FormManager::addTextInput("UrlImage", "urlImage", "urlImage", "50", html_entity_decode($article->getUrlImage(), ENT_QUOTES, "UTF-8")) . "<br/>";
     $htmlCode .= self::addErrorMsg($dataErrors, "texte");
     $htmlCode .= FormManager::addTextAreaInput("Texte", "texte", "texte", "5", "100", html_entity_decode($article->getTexte(), ENT_QUOTES, "UTF-8")) . "<br/>";
     $htmlCode .= FormManager::addSubmitButton("Envoyer", "class=\"sansLabel\"") . "<br/>";
     $htmlCode .= FormManager::endForm();
     return $htmlCode;
 }
コード例 #5
0
 public static function getFormErrorsHtmlEdition($action, $personnage, $dataErrors)
 {
     $htmlCode = FormManager::beginForm("post", $action);
     $htmlCode .= self::addErrorMsg($dataErrors, "id");
     $htmlCode .= FormManager::addHiddenInput("id", "id", html_entity_decode($personnage->getId(), ENT_QUOTES, "UTF-8"));
     $htmlCode .= self::addErrorMsg($dataErrors, "numDocteur");
     $htmlCode .= FormManager::addTextInput("Numéro Docteur", "numDocteur", "numDocteur", "8", html_entity_decode($personnage->getNumDocteur(), ENT_QUOTES, "UTF-8")) . "<br/>";
     $htmlCode .= self::addErrorMsg($dataErrors, "anneeDebut");
     $htmlCode .= FormManager::addTextInput("Annee Debut", "anneeDebut", "anneeFin", "4", html_entity_decode($personnage->getAnneeDebut(), ENT_QUOTES, "UTF-8")) . "<br/>";
     $htmlCode .= self::addErrorMsg($dataErrors, "anneeFin");
     $htmlCode .= FormManager::addTextInput("Annee Fin", "anneeFin", "anneeFin", "4", html_entity_decode($personnage->getAnneeFin(), ENT_QUOTES, "UTF-8")) . "<br/>";
     $htmlCode .= self::addErrorMsg($dataErrors, "acteur");
     $htmlCode .= FormManager::addTextInput("Acteur", "acteur", "acteur", "20", html_entity_decode($personnage->getActeur(), ENT_QUOTES, "UTF-8")) . "<br/>";
     $htmlCode .= self::addErrorMsg($dataErrors, "expFav");
     $htmlCode .= FormManager::addTextInput("Expression Favorite", "expFav", "expFav", "30", html_entity_decode($personnage->getExpFav(), ENT_QUOTES, "UTF-8")) . "<br/>";
     $htmlCode .= self::addErrorMsg($dataErrors, "desc");
     $htmlCode .= FormManager::addTextAreaInput("Decription", "descri", "descri", "5", "50", html_entity_decode($personnage->getDescri(), ENT_QUOTES, "UTF-8")) . "<br/>";
     $htmlCode .= self::addErrorMsg($dataErrors, "urlImage");
     $htmlCode .= FormManager::addTextInput("Url Image", "urlImage", "urlImage", "30", html_entity_decode($personnage->getUrlImage(), ENT_QUOTES, "UTF-8")) . "<br/>";
     $htmlCode .= FormManager::addSubmitButton("Envoyer", "class=\"sansLabel\"") . "<br/>";
     $htmlCode .= FormManager::endForm();
     return $htmlCode;
 }