template : how to hide fields

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

template : how to hide fields

MOKRANI Rachid-2
Hi,
 
With BugZilla 4.2.3, how to hide from interface the fields "Hardware".
 
 
If I  remove the following lines in the file create.html.tmpl, I can't
submit a bug. I have a BIG red message "You must select/enter a
Hardware" :
 
  <tr>
    [% INCLUDE bug/field.html.tmpl
      bug = default, field = bug_fields.rep_platform, editable = 1,
      value = default.rep_platform %]
  </tr>

 
 
 
It seem I need to do something in templates (hidde), but where and how ?
 
Regards.
 
 
__________________________
Avant d'imprimer, pensez à l'environnement ! Please consider the environment before printing !
Ce message et toutes ses pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. IFP Energies nouvelles décline toute responsabilité au titre de ce message. This message and any attachments are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. IFP Energies nouvelles should not be liable for this message.
__________________________
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

Re: template : how to hide fields

Thorsten Schöning
Guten Tag MOKRANI Rachid,
am Dienstag, 2. Oktober 2012 um 14:55 schrieben Sie:

> It seem I need to do something in templates (hidde), but where and how ?

Just hide the fields with CSS.

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning       E-Mail:[hidden email]
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon.............030-2 1001-310
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

RE: template : how to hide fields

raronson
Hi Thorsten,

Thank you for your help and support.

I too and looking for ways to hide fields, but I am not sure what you mean by "just hide the fields with CSS"?

Can you elaborate?

Best Regards,
rich

-----Original Message-----
From: support-bugzilla-bounces+raronson=[hidden email] [mailto:support-bugzilla-bounces+raronson=[hidden email]] On Behalf Of Thorsten Schöning
Sent: Tuesday, October 02, 2012 8:39 AM
To: [hidden email]
Subject: Re: template : how to hide fields

Guten Tag MOKRANI Rachid,
am Dienstag, 2. Oktober 2012 um 14:55 schrieben Sie:

> It seem I need to do something in templates (hidde), but where and how ?

Just hide the fields with CSS.

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning       E-Mail:[hidden email]
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon.............030-2 1001-310
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

Re: template : how to hide fields

Thorsten Schöning
Guten Tag Richard Aronson,
am Dienstag, 2. Oktober 2012 um 18:56 schrieben Sie:

> I too and looking for ways to hide fields, but I am not sure what
> you mean by "just hide the fields with CSS"?

http://www.bugzilla.org/docs/4.2/en/html/cust-skins.html

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning       E-Mail:[hidden email]
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon.............030-2 1001-310
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

RE: template : how to hide fields

MOKRANI Rachid-2
Hi,

Many thanks for your answer. But I don't understand what I need to do with CSS for hide the field "rep_platform" when I submit a bug.

Could you give me an exemple ?

Regards.
 

> -----Message d'origine-----
> De :
> support-bugzilla-bounces+rachid.mokrani=[hidden email]
> .org
> [mailto:support-bugzilla-bounces+rachid.mokrani=ifpen.fr@lists
> .mozilla.org] De la part de Thorsten Schöning
> Envoyé : mardi 2 octobre 2012 20:22
> À : [hidden email]
> Objet : Re: template : how to hide fields
>
> Guten Tag Richard Aronson,
> am Dienstag, 2. Oktober 2012 um 18:56 schrieben Sie:
>
> > I too and looking for ways to hide fields, but I am not sure what
> > you mean by "just hide the fields with CSS"?
>
> http://www.bugzilla.org/docs/4.2/en/html/cust-skins.html
>
> Mit freundlichen Grüßen,
>
> Thorsten Schöning
>
> --
> Thorsten Schöning       E-Mail:[hidden email]
> AM-SoFT IT-Systeme      http://www.AM-SoFT.de/
>
> Telefon.............030-2 1001-310
> Fax...............05151-  9468- 88
> Mobil..............0178-8 9468- 04
>
> AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
> AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow
>
> _______________________________________________
> support-bugzilla mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/support-bugzilla
> PLEASE put [hidden email] in the To:
> field when you reply.
>
__________________________
Avant d'imprimer, pensez à l'environnement ! Please consider the environment before printing !
Ce message et toutes ses pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. IFP Energies nouvelles décline toute responsabilité au titre de ce message. This message and any attachments are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. IFP Energies nouvelles should not be liable for this message.
__________________________

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

Re: template : how to hide fields

Thorsten Schöning
Guten Tag MOKRANI Rachid,
am Mittwoch, 3. Oktober 2012 um 16:05 schrieben Sie:

> Many thanks for your answer. But I don't understand what I need to
> do with CSS for hide the field "rep_platform" when I submit a bug.

CSS is for formatting HTML, have a look at how the standard skin of
Bugzilla works: CSS is used to give the HTML of the templates the look
it have. CSS has properties like display and visibility to show and
hide HTML-elements, which can be used in your case to visibly hide the
fields you want. TZhey are visibly removed form the UI, but the
browser sends them on form submissions. Just create a new skin with
your changed look and maybe customize the HTML templates to not
exclude rep_plattform, but make it accessible for CSS via an id or
class attribute.

> Could you give me an exemple ?

No, sorry, the web is full of tutorials, examples and whatever one
needs to know about HTML and CSS.

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning       E-Mail:[hidden email]
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon.............030-2 1001-310
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

RE: template : how to hide fields

MOKRANI Rachid-2
In reply to this post by raronson
 
Hi,

BugZilla 4.2.3.

After created custom template.
The following work for me, if someone need to use it.


template/en/bug/create.html.tmpl
    290     [% INCLUDE bug/field.html.tmpl
    291       bug = default, field = bug_fields.bug_severity, editable =
1,
    292       value = default.bug_severity %]
    293   </tr>
    294
    295   <tr>
    296 [% IF product.name != "NAME_OF_MY_PRODUCT" %]
    297     [% INCLUDE bug/field.html.tmpl
    298       bug = default, field = bug_fields.rep_platform, editable =
1,
    299       value = default.rep_platform %]
    300 [% ELSE %]
    301         <input type="hidden" name="rep_platform"
value="A_REAL_VALUE">
    302 [% END %]
    303   </tr>
    304
    305   <tr>
    306 [% IF product.name != "NAME_OF_MY_PRODUCT" %]
    307     [% INCLUDE bug/field.html.tmpl
    308        bug = default, field = bug_fields.op_sys, editable = 1,
    309        value = default.op_sys %]
    310 [% ELSE %]
    311         <input type="hidden" name="op_sys" value="A_REAL_VALUE">
    312 [% END %]
    313   </tr>
    314
    315 </tbody>
    316
    317 <tbody class="expert_fields">
    318   <tr>
    319     [% IF Param('usetargetmilestone') &&
Param('letsubmitterchoosemilestone') %]





template/en/bug/edit.html.tmpl
    356       </td>
    357
    358       [% PROCESS select selname => "version" %]
    359     </tr>
    360     [%############%]
    361     [%# PLATFORM #%]
    362     [%############%]
    363     <tr>
    364       <td class="field_label">
    365 [% IF product.name != "NAME_OF_MY_PRODUCT" %]
    366        [% INCLUDE bug/field.html.tmpl
    367             bug = bug, field = bug_fields.rep_platform,
    368             no_tds = 1  %]
    369 [% ELSE %]
    370         <input type="hidden" name="rep_platform"
value="A_REAL_VALUE" >
    371 [% END %]
    372 [% IF product.name != "NAME_OF_MY_PRODUCT" %]
    373        [%+ INCLUDE bug/field.html.tmpl
    374             bug = bug, field = bug_fields.op_sys,
    375             no_tds = 1 %]
    376 [% ELSE %]
    377         <input type="hidden" name="op_sys" value="A_REAL_VALUE"
>
    378 [% END %]
    379        <script type="text/javascript">
    380          assignToDefaultOnChange(['product', 'component']);
    381        </script>
    382       </td>
    383     </tr>
    384 [% END %]
    385
    386
[%######################################################################
######%]
    387 [%# Block for the status section
#%]
    388
[%######################################################################
######%]



__________________________
Avant d'imprimer, pensez à l'environnement ! Please consider the environment before printing !
Ce message et toutes ses pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. IFP Energies nouvelles décline toute responsabilité au titre de ce message. This message and any attachments are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. IFP Energies nouvelles should not be liable for this message.
__________________________
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.