Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
www.humitest.fr
/
htdocs
/
templates
/
back
/
product
/
/srv/data/web/vhosts/www.humitest.fr/htdocs/templates/back/product/create.html.twig
{% extends 'back/layout.html.twig' %} {% block title %} Ajouter un produit {% endblock %} {% block content %} <section class="section-padding"> <div class="container"> <h1>Ajouter un produit</h1> <div class="shape"></div> <div class="text-right mt-4"> <a href="{{ path('admin_product_search') }}" class="btn btn-primary rounded" role="button"> <i class="fa fa-reply"></i> Retour </a> {# Bloc à copier #} <textarea id="to-copy" spellcheck="false" style="height:0px; width:0px;"> <blockquote> <p><strong>TITRE CARACTERISRIQUE 1</strong></p> <hr /> <table border="1" cellpadding="5" cellspacing="5" style="background-color:#e6e6fa; border-style:hidden"> <tbody> <tr> <td>------------------------------Titre--------------------------------------</td> <td>------------------------------------------Descritpion----------------------------------------------</td> </tr> <tr> <td> <p> </p> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> </tbody> </table> </blockquote><p> </p> <blockquote> <p><strong>TITRE CARACTERISRIQUE 2</strong></p> <hr /> <table border="1" cellpadding="5" cellspacing="5" style="background-color:#e6e6fa; border-style:hidden"> <tbody> <tr> <td>------------------------------Titre2--------------------------------------</td> <td>------------------------------------------Descritpion2----------------------------------------------</td> </tr> <tr> <td> <p> </p> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> </tbody> </table> </blockquote><p> </p> </textarea> <button id="copy" type="button" class="btn btn-primary rounded p-2"> <i class="fas fa-clone"></i> Copier le modèle de tableau (caractéristiques)<span class="copiedtext" aria-hidden="true">Copié</span> </button> <a id="cleared"></a> {# Bloc à copier#} </div> <div class="card mt-4 mb-4"> <div class="card-header text-center btn-red text-light"> <h4>Formulaire d'ajout d'un produit</h4> </div> <div class="card-content"> {% form_theme form.images 'back/product/jquery.collection.html.twig' %} {{ form_start(form) }} {{ form_row(form.title) }} <div class="row"> <div class="col-sm-3">{{ form_row(form.category) }}</div> <div class="col-sm-3">{{ form_row(form.gammeProduct) }}</div> <div class="col-sm-3">{{ form_row(form.price) }}</div> <div class="col-sm-3">{{ form_row(form.poidsKg) }}</div> </div> {# <div class="row"> <div class="col-sm-6">{{ form_row(form.priceCustomer) }}</div> <div class="col-sm-6">{{ form_row(form.solde) }}</div> </div> #} <hr> <h3 class="h3 text-center btn-red w-100 text-light">Description</h3> <div class="card text-uppercase"><div class="card-header h6"> <span class="btn-red text-light">Description Courte</span></div></div> {{ form_row(form.shortDesc) }} <div class="card text-uppercase"><div class="card-header h6"> <span class="btn-red text-light">Caractéristiques detaillées</span></div></div> {{ form_row(form.caracteristique) }} <div class="card text-uppercase"><div class="card-header h6"> <span class="btn-red text-light">Humitest en action</span></div></div> {{ form_row(form.humitestEnAction) }} <h3 class="h3 text-center btn-red w-100 text-light">Photos</h3> <div class="jumbotron"> {{ form_row(form.images) }} </div> <h3 class="h3 text-center btn-red w-100 text-light">Vidéo</h3> <div class="jumbotron"> {{ form_row(form.linkVideo) }} </div> <div class="row"> <div class="col-sm-4"> {{ form_row(form.isActive) }}</div> <div class="col-sm-4"> {{ form_row(form.isNewProduct) }}</div> <div class="col-sm-4"> {{ form_row(form.position) }}</div> <div class="col-sm-4"> {{ form_widget(form) }}</div> </div> <br> <button class="btn btn-primary rounded">Ajouter</button> {{ form_end(form) }} </div> </div> </div> </section> <style> /* Just to play with animations */ .copiedtext { position: absolute; left: 0; top: 0; right: 0; text-align: center; opacity: 0; transform: translateY(-1em); color: #000; transition: all .500s; } .copied .copiedtext { opacity: 1; transform: translateY(-2em); } /* Some Generic styles */ textarea, button { font-size: 1em; font-family: "Open Sans", Helvetica, Arial, sans-serif; } textarea { } [id="cleared"] { margin-top: 4em; } #copy { position: relative; padding: 8px 20px; border: 0; font-size: 0.835em; text-transform: uppercase; letter-spacing: 0.125em; font-weight: bold; color: #FFF; background: #38454e; transition: background .275s; } #copy:hover, #copy:focus { background: #38454e; } </style> {% endblock %} {% block javascripts %} {{ parent() }} <script> var toCopy = document.getElementById( 'to-copy' ), btnCopy = document.getElementById( 'copy' ), paste = document.getElementById( 'cleared' ); btnCopy.addEventListener( 'click', function(){ toCopy.select(); paste.value = ''; if ( document.execCommand( 'copy' ) ) { btnCopy.classList.add( 'copied' ); paste.focus(); var temp = setInterval( function(){ btnCopy.classList.remove( 'copied' ); clearInterval(temp); }, 600 ); } else { console.info( 'document.execCommand went wrong…' ) } return false; } ); //AFFICHAGE DES NOM DES FICHIER UPLOADE $(document).ready(function(){ var id = $('.custom-file input').attr('id'); $('#'+id).on('change',function(){ var fileName = $(this).val(); fileName = fileName.replace('C:\\fakepath\\', " "); $(this).next('.custom-file-label').html(fileName); }); }); </script> <script type="text/javascript"> $('.image-collection').collection( { up: '<a href="#" class="btn-collection btn btn-primary" title="Move up"><i class="fas fa-caret-up"></i></a>', down: '<a href="#" class="btn-collection btn btn-primary" title="Move down"><i class="fas fa-caret-down"></i></a>', add: '<a href="#" class="btn-collection btn btn-primary" title="Add"><i class="fas fa-plus"></i></a>', remove: '<a href="#" class="btn-collection btn btn-primary" title="Delete"><i class="fas fa-trash-alt"></i></a>', allow_duplicate: false, after_add: function(collection, element) { var id = $('.custom-file input').attr('id'); var index = element.index(); var idArray = id.split("_"); idArray[2] = index; id = idArray[0]+'_'+idArray[1]+'_'+idArray[2]+'_'+idArray[3]+'_'+idArray[4]; $('#'+id).on('change',function(){ var fileName = $(this).val(); fileName = fileName.replace('C:\\fakepath\\', " "); $(this).next('.custom-file-label').html(fileName); }); } } ); </script> {% endblock %}