hide fields

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
s.bondi
Posts: 3
Joined: 17 Feb 2012, 11:10

hide fields

Post by s.bondi »

Hello to everyone. I'm a new user of mantis

I added 2 checkbox and 8 customize fields.
I want to hide some fields when I select a checkbox . How can it possible to do it?
Regards
atrol
Site Admin
Posts: 8553
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: hide fields

Post by atrol »

This is not possible by using the customization options of MantisBT.
You would have to change source code of MantisBT or to write a plugin.

Have a look at the following plugin which does not what you want but can be used as an example how to start.
https://github.com/mantisbt-plugins/lin ... tom-fields

A better place to get support for questions on how to develop web applications is a forum where topics like HTML/JavSacript/CSS are discussed.
Please use Search before posting and read the Manual
atrol
Site Admin
Posts: 8553
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: hide fields

Post by atrol »

I just replied also to your other question http://www.mantisbt.org/forums/viewtopi ... =4&t=20165 where you wrote that you are using 1.1.8
This is another reason to update to 1.2.8 because you can't use the mentioned plugin mechanism in 1.1.8
Please use Search before posting and read the Manual
Rocky86
Posts: 8
Joined: 28 Jun 2012, 08:17

Re: hide fields

Post by Rocky86 »

Hello,

I am a new user and I really need your help.

1. How can I arrange the attributes as I want? I mean in reporting issues, I want to see "status" before "description" for example??
how is the way to do that??

2. And how is the way to hide some attributes in Filter? like "changed (hrs)" ????

I really need your help.

Regards,

Rocky
pay2play

Re: hide fields

Post by pay2play »

@ Rocky86, the only way change the order of the native fields is to make changes to the source code of bug_report_page.php.
Rocky86
Posts: 8
Joined: 28 Jun 2012, 08:17

Re: hide fields

Post by Rocky86 »

Thank for your replay,

I will try to read this file and I will come back if I still need anything.

Thank you again.

Regards,

Rocky
M@rce
Posts: 99
Joined: 05 May 2011, 20:46
Location: Montevideo - Uruguay

Re: hide fields

Post by M@rce »

pay2play wrote: the only way change the order of the native fields is to make changes to the source code of bug_report_page.php.
@Pay2play: How i do this? What is necessary for make that?

Thanks.
"La inteligencia consiste no sólo en el conocimiento, sino también en la destreza de aplicar los conocimientos en la práctica."
Aristóteles
pay2play

Re: hide fields

Post by pay2play »

@ M@rce -

It's accomplished by moving the section of code that corresponds to the native field to the order/position that you want it to appear. Say you want move Reproducibility to the 1st field on the report bug page, you need to cut the following:


if ( $tpl_show_reproducibility ) {
?>

<tr <?php echo helper_alternate_class() ?>>
<td class="category">
<?php print_documentation_link( 'reproducibility' ) ?>
</td>
<td>
<select <?php echo helper_get_tab_index() ?> name="reproducibility">
<?php print_enum_string_option_list( 'reproducibility', $f_reproducibility ) ?>
</select>
</td>
</tr>

And move it to the 1st line of code right after the Report Bug Event Signal:

<?php
event_signal( 'EVENT_REPORT_BUG_FORM_TOP', array( $t_project_id ) );
Post Reply