jeromemh Posted June 11, 2012 Share Posted June 11, 2012 Bonjour dans ma page contact, il y avait par défaut un menu déroulant pour choisir : service client ou Webmaster. Compte tenu du fait que j'ai supprimé "webmaster", c'est un peu ridicule de devoir passer par un menu déroulant pour n'avoir qu'1 seul choix (service client) Y a til un moyen de supprimer ce menu déroulant (sans perdre la fonctionnalité bien entendu) ? Merci Link to comment Share on other sites More sharing options...
DevNet Posted June 11, 2012 Share Posted June 11, 2012 Bonsoir, Vous devez changer la condition présente dans ./themes/[votre_thème]/contact-form.tpl, ligne 50 : {if isset($customerThread.id_contact)} {foreach from=$contacts item=contact} {if $contact.id_contact == $customerThread.id_contact} <input type="text" id="contact_name" name="contact_name" value="{$contact.name|escape:'htmlall':'UTF-8'}" readonly="readonly" /> <input type="hidden" name="id_contact" value="{$contact.id_contact}" /> {/if} {/foreach} </p> {else} <select id="id_contact" name="id_contact" onchange="showElemFromSelect('id_contact', 'desc_contact')"> <option value="0">{l s='-- Choose --'}</option> {foreach from=$contacts item=contact} <option value="{$contact.id_contact|intval}" {if isset($smarty.post.id_contact) && $smarty.post.id_contact == $contact.id_contact}selected="selected"{/if}>{$contact.name|escape:'htmlall':'UTF-8'}</option> {/foreach} </select> </p> <p id="desc_contact0" class="desc_contact"> </p> {foreach from=$contacts item=contact} <p id="desc_contact{$contact.id_contact|intval}" class="desc_contact" style="display:none;"> <label> </label>{$contact.description|escape:'htmlall':'UTF-8'} </p> {/foreach} {/if} Bien cordialement Link to comment Share on other sites More sharing options...
jeromemh Posted June 25, 2012 Author Share Posted June 25, 2012 Merci, je vais essayer Link to comment Share on other sites More sharing options...
jeromemh Posted June 28, 2012 Author Share Posted June 28, 2012 j'ai bien tenté de modifier le code à partir de la ligne 50 mais sans succès. Pourrais-ti m'en dire un peu plus sur les modification à faire ? merci Link to comment Share on other sites More sharing options...
celine37 Posted September 7, 2012 Share Posted September 7, 2012 La solution se trouve en effet sur les ligne citées ci-dessus. Précisément, voici la marche à suivre (trouvée ici) : Dans le fichier contact-form.tpl du thème utilisé, remplacer les lignes : <p class="select"> <label for="id_contact">{l s='Subject Heading'}</label> {if isset($customerThread.id_contact)} {foreach from=$contacts item=contact} {if $contact.id_contact == $customerThread.id_contact} <input type="text" id="contact_name" name="contact_name" value="{$contact.name|escape:'htmlall':'UTF-8'}" readonly="readonly" /> <input type="hidden" name="id_contact" value="{$contact.id_contact}" /> {/if} {/foreach} </p> {else} <select id="id_contact" name="id_contact" onchange="showElemFromSelect('id_contact', 'desc_contact')"> <option value="0">{l s='-- Choose --'}</option> {foreach from=$contacts item=contact} <option value="{$contact.id_contact|intval}" {if isset($smarty.post.id_contact) && $smarty.post.id_contact == $contact.id_contact}selected="selected"{/if}>{$contact.name|escape:'htmlall':'UTF-8'}</option> {/foreach} </select> </p> <p id="desc_contact0" class="desc_contact"> </p> {foreach from=$contacts item=contact} <p id="desc_contact{$contact.id_contact|intval}" class="desc_contact" style="display:none;"> <label> </label>{$contact.description|escape:'htmlall':'UTF-8'} </p> {/foreach} {/if} par ceci : <input type="hidden" name="id_contact" value=1> La valeur "1" doit correspondre au bon destinataire. A vérifier dans le BO > Employés Cela fonctionne sur PS 1.4.9 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now