hide fields

Post about your customizations to share with others.

Moderators: Developer, Contributor

hide fields

Postby s.bondi » Feb 17, 2012 6:13 am

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
s.bondi
 
Posts: 3
Joined: Feb 17, 2012 6:10 am

Re: hide fields

Postby atrol » Feb 18, 2012 4:16 am

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
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
 
Posts: 3646
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: hide fields

Postby atrol » Feb 18, 2012 4:23 am

I just replied also to your other question viewtopic.php?f=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
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
 
Posts: 3646
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: hide fields

Postby Rocky86 » Jun 28, 2012 3:32 am

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
Rocky86
 
Posts: 8
Joined: Jun 28, 2012 3:17 am

Re: hide fields

Postby pay2play » Jun 29, 2012 8:21 am

@ Rocky86, the only way change the order of the native fields is to make changes to the source code of bug_report_page.php.
pay2play
 
Posts: 13
Joined: Jun 01, 2012 3:57 pm

Re: hide fields

Postby Rocky86 » Jul 04, 2012 3:07 am

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
Rocky86
 
Posts: 8
Joined: Jun 28, 2012 3:17 am

Re: hide fields

Postby M@rce » Nov 19, 2012 9:52 am

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
M@rce
 
Posts: 92
Joined: May 05, 2011 3:46 pm
Location: Montevideo - Uruguay

Re: hide fields

Postby pay2play » Dec 19, 2012 10:05 am

@ 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 ) );
pay2play
 
Posts: 13
Joined: Jun 01, 2012 3:57 pm


Return to Customizations

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron