示例#1
0
 /**
  * Créer la popup d'édition du Passkey
  * @param Passkey $oPasskey
  * @return string Code HTML
  */
 private function createPkEditPopup($oPasskey)
 {
     //Création de la popup d'édition
     $oPopup = new View('popup');
     $oPopup->addData('id', md5($oPasskey->getPasskey()));
     $oPopup->addData('buttonstyle', 'btn-primary');
     $oPopup->addData('buttonicon', 'fa-edit');
     $oPopup->addData('buttontext', 'Editer');
     $oPopup->addData('title', 'Edition du passkey');
     //Création du formulaire
     $oFormEdit = new FormGenerator();
     $oFormEdit->setAction('index.php?p=profil&edit=' . $oPasskey->getTrackerId());
     $oFormEdit->addInput('Tracker', 'tracker', false, true, 'text', '', $oPasskey->getTrackerName());
     $oFormEdit->addInput('Passkey', 'passkey', true, false, 'text', '', $oPasskey->getPasskey());
     $oFormEdit->addCheckbox('Supprimer', 'delete');
     $oFormEdit->create();
     $oPopup->addData('content', $oFormEdit->getCode());
     $oPopup->create();
     return $oPopup->getCode();
 }