Loading module/Application/src/Application/Controller/FicheMetier/FicheMetierController.php +3 −4 Original line number Diff line number Diff line Loading @@ -238,6 +238,7 @@ class FicheMetierController extends AbstractActionController /** @var SpecificitePosteForm $form */ $form = $form = $this->getServiceLocator()->get('FormElementManager')->get(SpecificitePosteForm::class); $form->setAttribute('action', $this->url()->fromRoute('fiche-metier/specificite', ['fiche' => $fiche->getId()], [], true)); $form->bind($specificite); /** @var Request $request */ Loading @@ -252,12 +253,10 @@ class FicheMetierController extends AbstractActionController } } $vm = new ViewModel(); $vm->setTemplate('application/default/default-form'); $vm->setVariables([ return new ViewModel([ 'title' => 'Éditer spécificité du poste', 'form' => $form, ]); return $vm; } } No newline at end of file module/Application/src/Application/Form/FicheMetier/SpecificitePosteForm.php +6 −6 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ class SpecificitePosteForm extends Form { ], ], 'attributes' => [ 'class' => 'type2 form-control', 'class' => 'type2 form-control specificite', ] ]); // encadrement Loading @@ -34,7 +34,7 @@ class SpecificitePosteForm extends Form { ], ], 'attributes' => [ 'class' => 'type2 form-control', 'class' => 'type2 form-control encadrement', ] ]); // relations internes Loading @@ -48,7 +48,7 @@ class SpecificitePosteForm extends Form { ], ], 'attributes' => [ 'class' => 'type2 form-control', 'class' => 'type2 form-control relations_internes', ] ]); // relation externes Loading @@ -62,7 +62,7 @@ class SpecificitePosteForm extends Form { ], ], 'attributes' => [ 'class' => 'type2 form-control', 'class' => 'type2 form-control relations_externes', ] ]); // contraintes Loading @@ -76,7 +76,7 @@ class SpecificitePosteForm extends Form { ], ], 'attributes' => [ 'class' => 'type2 form-control', 'class' => 'type2 form-control contraintes', ] ]); // moyens Loading @@ -90,7 +90,7 @@ class SpecificitePosteForm extends Form { ], ], 'attributes' => [ 'class' => 'type2 form-control', 'class' => 'type2 form-control moyens', ] ]); // button Loading module/Application/view/application/fiche-metier/afficher.phtml +15 −1 Original line number Diff line number Diff line Loading @@ -269,7 +269,9 @@ $canEditer = $this->isAllowed(FicheMetierPrivileges::getResourceId(FicheMetierPr <?php if($canEditer) : ?> <a href="<?php echo $this->url('fiche-metier/specificite',['fiche' => $fiche->getId()], [], true); ?>" class="btn btn-primary action ajax-modal"> class="btn btn-primary action ajax-modal" data-event="modification" > <span class="glyphicon glyphicon-pencil"></span> Éditer la spécificité du poste </a> Loading Loading @@ -318,3 +320,15 @@ $canEditer = $this->isAllowed(FicheMetierPrivileges::getResourceId(FicheMetierPr </div> </div> <script> $(function() { $("body").on("modification", function (event) { event.div.modal('hide'); window.location.reload(); }); }); </script> module/Application/view/application/fiche-metier/editer-specificite-poste.phtml 0 → 100644 +125 −0 Original line number Diff line number Diff line <?php /** * @var Form $form */ use Zend\Form\Form; ?> <?php echo $this->form($form); ?> <script> $(document).ready(function() { // tinymce.remove(); tinymce.init({ selector: '.specificite', toolbar: 'newdocument undo redo | bold italic | bullist', resize: true, language: 'fr_FR', plugins: 'lists', statusbar: true, browser_spellcheck : true, branding: false, menu: {}, body_id: 'specificite', setup: function (editor) { editor.on("focusout", function () { console.log(tinymce.get('specificite').getContent()); $('textarea#specificite').val(tinymce.get('specificite').getContent()); }); } }); tinymce.init({ selector: '.encadrement', toolbar: 'newdocument undo redo | bold italic | bullist', resize: true, language: 'fr_FR', plugins: 'lists', statusbar: true, browser_spellcheck : true, branding: false, menu: {}, body_id: 'encadrement', setup: function (editor) { editor.on("focusout", function () { console.log(tinymce.get('encadrement').getContent()); $('textarea#encadrement').val(tinymce.get('encadrement').getContent()); }); } }); tinymce.init({ selector: '.relations_internes', toolbar: 'newdocument undo redo | bold italic | bullist', resize: true, language: 'fr_FR', plugins: 'lists', statusbar: true, browser_spellcheck : true, branding: false, menu: {}, body_id: 'relations_internes', setup: function (editor) { editor.on("focusout", function () { console.log(tinymce.get('relations_internes').getContent()); $('textarea#relations_internes').val(tinymce.get('relations_internes').getContent()); }); } }); tinymce.init({ selector: '.relations_externes', toolbar: 'newdocument undo redo | bold italic | bullist', resize: true, language: 'fr_FR', plugins: 'lists', statusbar: true, browser_spellcheck : true, branding: false, menu: {}, body_id: 'relations_externes', setup: function (editor) { editor.on("focusout", function () { console.log(tinymce.get('relations_externes').getContent()); $('textarea#relations_externes').val(tinymce.get('relations_externes').getContent()); }); } }); tinymce.init({ selector: '.contraintes', toolbar: 'newdocument undo redo | bold italic | bullist', resize: true, language: 'fr_FR', plugins: 'lists', statusbar: true, browser_spellcheck : true, branding: false, menu: {}, body_id: 'contraintes', setup: function (editor) { editor.on("focusout", function () { console.log(tinymce.get('contraintes').getContent()); $('textarea#contraintes').val(tinymce.get('contraintes').getContent()); }); } }); tinymce.init({ selector: '.moyens', toolbar: 'newdocument undo redo | bold italic | bullist', resize: true, language: 'fr_FR', plugins: 'lists', statusbar: true, browser_spellcheck : true, branding: false, menu: {}, body_id: 'moyens', setup: function (editor) { editor.on("focusout", function () { console.log(tinymce.get('moyens').getContent()); $('textarea#moyens').val(tinymce.get('moyens').getContent()); }); } }); }); </script> No newline at end of file Loading
module/Application/src/Application/Controller/FicheMetier/FicheMetierController.php +3 −4 Original line number Diff line number Diff line Loading @@ -238,6 +238,7 @@ class FicheMetierController extends AbstractActionController /** @var SpecificitePosteForm $form */ $form = $form = $this->getServiceLocator()->get('FormElementManager')->get(SpecificitePosteForm::class); $form->setAttribute('action', $this->url()->fromRoute('fiche-metier/specificite', ['fiche' => $fiche->getId()], [], true)); $form->bind($specificite); /** @var Request $request */ Loading @@ -252,12 +253,10 @@ class FicheMetierController extends AbstractActionController } } $vm = new ViewModel(); $vm->setTemplate('application/default/default-form'); $vm->setVariables([ return new ViewModel([ 'title' => 'Éditer spécificité du poste', 'form' => $form, ]); return $vm; } } No newline at end of file
module/Application/src/Application/Form/FicheMetier/SpecificitePosteForm.php +6 −6 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ class SpecificitePosteForm extends Form { ], ], 'attributes' => [ 'class' => 'type2 form-control', 'class' => 'type2 form-control specificite', ] ]); // encadrement Loading @@ -34,7 +34,7 @@ class SpecificitePosteForm extends Form { ], ], 'attributes' => [ 'class' => 'type2 form-control', 'class' => 'type2 form-control encadrement', ] ]); // relations internes Loading @@ -48,7 +48,7 @@ class SpecificitePosteForm extends Form { ], ], 'attributes' => [ 'class' => 'type2 form-control', 'class' => 'type2 form-control relations_internes', ] ]); // relation externes Loading @@ -62,7 +62,7 @@ class SpecificitePosteForm extends Form { ], ], 'attributes' => [ 'class' => 'type2 form-control', 'class' => 'type2 form-control relations_externes', ] ]); // contraintes Loading @@ -76,7 +76,7 @@ class SpecificitePosteForm extends Form { ], ], 'attributes' => [ 'class' => 'type2 form-control', 'class' => 'type2 form-control contraintes', ] ]); // moyens Loading @@ -90,7 +90,7 @@ class SpecificitePosteForm extends Form { ], ], 'attributes' => [ 'class' => 'type2 form-control', 'class' => 'type2 form-control moyens', ] ]); // button Loading
module/Application/view/application/fiche-metier/afficher.phtml +15 −1 Original line number Diff line number Diff line Loading @@ -269,7 +269,9 @@ $canEditer = $this->isAllowed(FicheMetierPrivileges::getResourceId(FicheMetierPr <?php if($canEditer) : ?> <a href="<?php echo $this->url('fiche-metier/specificite',['fiche' => $fiche->getId()], [], true); ?>" class="btn btn-primary action ajax-modal"> class="btn btn-primary action ajax-modal" data-event="modification" > <span class="glyphicon glyphicon-pencil"></span> Éditer la spécificité du poste </a> Loading Loading @@ -318,3 +320,15 @@ $canEditer = $this->isAllowed(FicheMetierPrivileges::getResourceId(FicheMetierPr </div> </div> <script> $(function() { $("body").on("modification", function (event) { event.div.modal('hide'); window.location.reload(); }); }); </script>
module/Application/view/application/fiche-metier/editer-specificite-poste.phtml 0 → 100644 +125 −0 Original line number Diff line number Diff line <?php /** * @var Form $form */ use Zend\Form\Form; ?> <?php echo $this->form($form); ?> <script> $(document).ready(function() { // tinymce.remove(); tinymce.init({ selector: '.specificite', toolbar: 'newdocument undo redo | bold italic | bullist', resize: true, language: 'fr_FR', plugins: 'lists', statusbar: true, browser_spellcheck : true, branding: false, menu: {}, body_id: 'specificite', setup: function (editor) { editor.on("focusout", function () { console.log(tinymce.get('specificite').getContent()); $('textarea#specificite').val(tinymce.get('specificite').getContent()); }); } }); tinymce.init({ selector: '.encadrement', toolbar: 'newdocument undo redo | bold italic | bullist', resize: true, language: 'fr_FR', plugins: 'lists', statusbar: true, browser_spellcheck : true, branding: false, menu: {}, body_id: 'encadrement', setup: function (editor) { editor.on("focusout", function () { console.log(tinymce.get('encadrement').getContent()); $('textarea#encadrement').val(tinymce.get('encadrement').getContent()); }); } }); tinymce.init({ selector: '.relations_internes', toolbar: 'newdocument undo redo | bold italic | bullist', resize: true, language: 'fr_FR', plugins: 'lists', statusbar: true, browser_spellcheck : true, branding: false, menu: {}, body_id: 'relations_internes', setup: function (editor) { editor.on("focusout", function () { console.log(tinymce.get('relations_internes').getContent()); $('textarea#relations_internes').val(tinymce.get('relations_internes').getContent()); }); } }); tinymce.init({ selector: '.relations_externes', toolbar: 'newdocument undo redo | bold italic | bullist', resize: true, language: 'fr_FR', plugins: 'lists', statusbar: true, browser_spellcheck : true, branding: false, menu: {}, body_id: 'relations_externes', setup: function (editor) { editor.on("focusout", function () { console.log(tinymce.get('relations_externes').getContent()); $('textarea#relations_externes').val(tinymce.get('relations_externes').getContent()); }); } }); tinymce.init({ selector: '.contraintes', toolbar: 'newdocument undo redo | bold italic | bullist', resize: true, language: 'fr_FR', plugins: 'lists', statusbar: true, browser_spellcheck : true, branding: false, menu: {}, body_id: 'contraintes', setup: function (editor) { editor.on("focusout", function () { console.log(tinymce.get('contraintes').getContent()); $('textarea#contraintes').val(tinymce.get('contraintes').getContent()); }); } }); tinymce.init({ selector: '.moyens', toolbar: 'newdocument undo redo | bold italic | bullist', resize: true, language: 'fr_FR', plugins: 'lists', statusbar: true, browser_spellcheck : true, branding: false, menu: {}, body_id: 'moyens', setup: function (editor) { editor.on("focusout", function () { console.log(tinymce.get('moyens').getContent()); $('textarea#moyens').val(tinymce.get('moyens').getContent()); }); } }); }); </script> No newline at end of file