You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2013-04-04 21:58:23

EchoLynx
Member
Registered: 2013-04-04
Posts: 4

Replace post-only's "Create a Ticket" with a Form Creator Form

Is there a way to replace destination for the "Create a Ticket" link (the one that appears when activated in a profile) to a form created by the Form Creator plugin?

We're trying to use GLPI to triage our tickets as much as possible in order to reduce the load on our call center/helpdesk. We're hoping to be able to use the Form Creator plugin to create a large form that a user can fill out in place of the short one that's used by default.

We're using GLPI 0.83.7 and Form Creator 1.3.2

Offline

#2 2013-04-22 10:16:56

nicotontige
Member
Registered: 2011-06-15
Posts: 137

Re: Replace post-only's "Create a Ticket" with a Form Creator Form

hi,

sorry, i just see your message....
it's possible of course, but you must do some modifications in the GLPI's code

I already response to someone who want the same thing.
Link

So, in the file /inc/html.class.php line 2527
you must replace :

//  Create ticket
      if (Session::haveRight("create_ticket","1")) {
         echo "<li id='menu2'>";
         echo "<a href='".$CFG_GLPI["root_doc"]."/front/helpdesk.public.php?create_ticket=1' ".
                "title=\"".$LANG['profiles'][5]."\" class='itemP'>".$LANG['profiles'][5]."</a>";
         echo "</li>";
      }

by this :

//  Create ticket
      if (Session::haveRight("create_ticket","1")) {
         echo "<li id='menu2'>";
         echo "<a href='".$CFG_GLPI["root_doc"]."/plugins/formcreator/front/formlist.php' ".
                "title=\"".$LANG['profiles'][5]."\" class='itemP'>".$LANG['profiles'][5]."</a>";
         echo "</li>";
      }

Offline

#3 2013-09-05 16:24:39

Dimas
Member
Registered: 2013-09-05
Posts: 1

Re: Replace post-only's "Create a Ticket" with a Form Creator Form

Hi,
But if I change this line, any kind of Ticket will be opened like form made by formcreator?

How can I change just one of the project of my tree?

Like the example below, I just want to change my defaut ticket form to a Form made by formcreator marked by the arrow ( image below ).

j8me.jpg

Offline

#4 2013-09-06 10:23:50

nicotontige
Member
Registered: 2011-06-15
Posts: 137

Re: Replace post-only's "Create a Ticket" with a Form Creator Form

hi,

You can try this, but remind, it's not an official modification wink :
file ./inc/html.class.php line 2624 (glpi 0.84)
replace this :

//  Create ticket
      if (Session::haveRight("create_ticket","1")) {
         echo "<li id='menu2'>";
         echo "<a href='".$CFG_GLPI["root_doc"]."/front/helpdesk.public.php?create_ticket=1' ".
                "title=\"".__s('Create a ticket')."\" class='itemP'>".__('Create a ticket')."</a>";
         echo "</li>";
      }

by this :

//  Create ticket
      if (Session::haveRight("create_ticket","1")) {
         echo "<li id='menu2'>";
         if ($_SESSION["glpidefault_entity"] == 1) {
             echo "<a href='".$CFG_GLPI["root_doc"]."/plugins/formcreator/front/formlist.php' ".
                "title=\"".__s('Create a ticket')."\" class='itemP'>".__('Create a ticket')."</a>";
         } else {
            echo "<a href='".$CFG_GLPI["root_doc"]."/front/helpdesk.public.php?create_ticket=1' ".
                    "title=\"".__s('Create a ticket')."\" class='itemP'>".__('Create a ticket')."</a>";
         }
         echo "</li>";
      }

here you must modify the number of the $_SESSION["glpidefault_entity"]. It's the id of the default entity of the user./front/helpdesk.public.php?create_ticket=1

Offline

Board footer

Powered by FluxBB