Skip to content
Snippets Groups Projects
Commit 2d4e87b1 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Text pour les selectEntity + tinymce ...

parent e71ac351
No related branches found
No related tags found
No related merge requests found
Pipeline #16456 passed
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
namespace UnicaenAutoform\Entity\Db; namespace UnicaenAutoform\Entity\Db;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use UnicaenApp\Entity\HistoriqueAwareInterface;
use UnicaenApp\Entity\HistoriqueAwareTrait;
use UnicaenAutoform\Entity\HasMotsClefsAwareTrait; use UnicaenAutoform\Entity\HasMotsClefsAwareTrait;
use UnicaenUtilisateur\Entity\Db\HistoriqueAwareInterface;
use UnicaenUtilisateur\Entity\Db\HistoriqueAwareTrait;
class Categorie implements HistoriqueAwareInterface { class Categorie implements HistoriqueAwareInterface {
use HistoriqueAwareTrait; use HistoriqueAwareTrait;
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
namespace UnicaenAutoform\Entity\Db; namespace UnicaenAutoform\Entity\Db;
use UnicaenAutoform\Entity\HasMotsClefsAwareTrait; use UnicaenAutoform\Entity\HasMotsClefsAwareTrait;
use UnicaenApp\Entity\HistoriqueAwareInterface; use UnicaenUtilisateur\Entity\Db\HistoriqueAwareInterface;
use UnicaenApp\Entity\HistoriqueAwareTrait; use UnicaenUtilisateur\Entity\Db\HistoriqueAwareTrait;
class Champ implements HistoriqueAwareInterface { class Champ implements HistoriqueAwareInterface {
use HistoriqueAwareTrait; use HistoriqueAwareTrait;
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
namespace UnicaenAutoform\Entity\Db; namespace UnicaenAutoform\Entity\Db;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use UnicaenApp\Entity\HistoriqueAwareInterface; use UnicaenUtilisateur\Entity\Db\HistoriqueAwareInterface;
use UnicaenApp\Entity\HistoriqueAwareTrait; use UnicaenUtilisateur\Entity\Db\HistoriqueAwareTrait;
class Formulaire implements HistoriqueAwareInterface { class Formulaire implements HistoriqueAwareInterface {
use HistoriqueAwareTrait; use HistoriqueAwareTrait;
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
namespace UnicaenAutoform\Entity\Db; namespace UnicaenAutoform\Entity\Db;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use UnicaenApp\Entity\HistoriqueAwareInterface; use UnicaenUtilisateur\Entity\Db\HistoriqueAwareInterface;
use UnicaenApp\Entity\HistoriqueAwareTrait; use UnicaenUtilisateur\Entity\Db\HistoriqueAwareTrait;
class FormulaireInstance implements HistoriqueAwareInterface { class FormulaireInstance implements HistoriqueAwareInterface {
use HistoriqueAwareTrait; use HistoriqueAwareTrait;
......
...@@ -2,8 +2,9 @@ ...@@ -2,8 +2,9 @@
namespace UnicaenAutoform\Entity\Db; namespace UnicaenAutoform\Entity\Db;
use UnicaenApp\Entity\HistoriqueAwareInterface;
use UnicaenApp\Entity\HistoriqueAwareTrait; use UnicaenUtilisateur\Entity\Db\HistoriqueAwareInterface;
use UnicaenUtilisateur\Entity\Db\HistoriqueAwareTrait;
class FormulaireReponse implements HistoriqueAwareInterface { class FormulaireReponse implements HistoriqueAwareInterface {
use HistoriqueAwareTrait; use HistoriqueAwareTrait;
......
...@@ -3,9 +3,10 @@ ...@@ -3,9 +3,10 @@
namespace UnicaenAutoform\Entity\Db; namespace UnicaenAutoform\Entity\Db;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use UnicaenApp\Entity\HistoriqueAwareTrait; use UnicaenUtilisateur\Entity\Db\HistoriqueAwareInterface;
use UnicaenUtilisateur\Entity\Db\HistoriqueAwareTrait;
class Validation { class Validation implements HistoriqueAwareInterface {
use HistoriqueAwareTrait; use HistoriqueAwareTrait;
const TYPE_SUMPPS = "SUMPPS"; const TYPE_SUMPPS = "SUMPPS";
......
...@@ -14,6 +14,11 @@ $splits = explode(";", $reponse); ...@@ -14,6 +14,11 @@ $splits = explode(";", $reponse);
<label for="textarea_<?php echo $champ->getId()?>" class="control-label"> <label for="textarea_<?php echo $champ->getId()?>" class="control-label">
<strong><?php echo $champ->getLibelle()?>&nbsp;:</strong> <strong><?php echo $champ->getLibelle()?>&nbsp;:</strong>
</label> </label>
<?php if ($champ->getTexte() !== null AND trim($champ->getTexte()) !== '') : ?>
<p>
<?php echo $champ->getTexte(); ?>
</p>
<?php endif; ?>
<div class="col-md-offset-2 col-md-10"> <div class="col-md-offset-2 col-md-10">
<?php foreach ($options as $id => $option) : ?> <?php foreach ($options as $id => $option) : ?>
<input type="checkbox" name="<?php echo $champ->getId()?>_<?php echo $id; ?>" <input type="checkbox" name="<?php echo $champ->getId()?>_<?php echo $id; ?>"
......
...@@ -13,6 +13,11 @@ use UnicaenAutoform\Entity\Db\Champ; ...@@ -13,6 +13,11 @@ use UnicaenAutoform\Entity\Db\Champ;
<label for="textarea_<?php echo $champ->getId()?>" class="col-sm-2 control-label"> <label for="textarea_<?php echo $champ->getId()?>" class="col-sm-2 control-label">
<?php echo $champ->getLibelle(); ?>&nbsp;: <?php echo $champ->getLibelle(); ?>&nbsp;:
</label> </label>
<?php if ($champ->getTexte() !== null AND trim($champ->getTexte()) !== '') : ?>
<p>
<?php echo $champ->getTexte(); ?>
</p>
<?php endif; ?>
<div class="col-sm-10"> <div class="col-sm-10">
<select class="selectpicker form-control" name="<?php echo $champ->getId(); ?>" data-live-search="true"> <select class="selectpicker form-control" name="<?php echo $champ->getId(); ?>" data-live-search="true">
<option value="null"></option> <option value="null"></option>
......
...@@ -10,11 +10,11 @@ $options = explode(';', $champ->getOptions()); ...@@ -10,11 +10,11 @@ $options = explode(';', $champ->getOptions());
?> ?>
<div class="row"> <div class="row">
<div class="form-group" style="display: block;"> <div class="form-group" style="display: block;">
<label for="textarea_<?php echo $champ->getId()?>" class="col-sm-3 control-label"> <label for="<?php echo $champ->getId()?>" class="col-sm-3 control-label">
<?php echo $champ->getLibelle(); ?>&nbsp;: <?php echo $champ->getLibelle(); ?>&nbsp;:
</label> </label>
<div class="col-sm-9"> <div class="col-sm-9">
<select class="form-control" name="<?php echo $champ->getId(); ?>"> <select class="form-control" name="<?php echo $champ->getId(); ?>" id="<?php echo $champ->getId(); ?>">
<option value="null"></option> <option value="null"></option>
<?php foreach ($options as $option) : ?> <?php foreach ($options as $option) : ?>
<option value="<?php echo $option; ?>" <option value="<?php echo $option; ?>"
...@@ -31,3 +31,7 @@ $options = explode(';', $champ->getOptions()); ...@@ -31,3 +31,7 @@ $options = explode(';', $champ->getOptions());
</div> </div>
</div> </div>
<script>
//$('#<?php //echo $champ->getId(); ?>').selectpicker();
</script>
...@@ -33,7 +33,7 @@ $options = explode(';', $champ->getOptions()); ...@@ -33,7 +33,7 @@ $options = explode(';', $champ->getOptions());
<script> <script>
$(document).ready(function() { $(document).ready(function() {
tinymce.remove(); //tinymce.remove();
tinymce.init({ tinymce.init({
selector: '.autoform-textarea', selector: '.autoform-textarea',
toolbar: 'newdocument undo redo | bold italic underline removeformat | bullist', toolbar: 'newdocument undo redo | bold italic underline removeformat | bullist',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment