3 * FusionForge Tracker Cloning Form
5 * Copyright 2010, FusionForge Team
6 * http://fusionforge.org
8 * This file is part of FusionForge.
10 * FusionForge is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published
12 * by the Free Software Foundation; either version 2 of the License,
13 * or (at your option) any later version.
15 * FusionForge is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with FusionForge; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
26 $g =& group_get_object(forge_get_config('template_group'));
27 if (!$g || !is_object($g)) {
29 } elseif ($g->isError()) {
30 exit_error($g->getErrorMessage(),'tracker');
32 $atf = new ArtifactTypeFactory($g);
33 if (!$atf || !is_object($atf)) {
34 exit_error(_('Unable to Create Template Group Object'),'tracker');
35 } elseif ($atf->isError()) {
36 exit_error($atf->getErrorMessage(),'tracker');
38 $ata = $atf->getArtifactTypes();
41 for ($i=0; $i<count($ata); $i++) {
42 if (!$ata[$i] || $ata[$i]->isError()) {
45 $ids[]=$ata[$i]->getID();
46 $titles[]=$g->getPublicName().'::'.$ata[$i]->getName();
50 $ath->adminHeader(array ('title'=>_('Clone Tracker')));
52 echo "<h1>"._('Clone Tracker')."</h1>";
55 echo '<div class="warning_msg">'._('The site administrator must first set up template trackers in the template projet with default values and set permissions propertly so you can access them.').'</div>';
58 <p><?php echo _('Choose the template tracker to clone.') ?></p>
59 <form action="<?php echo getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&atid='.$ath->getID(); ?>" method="post">
60 <input type="hidden" name="clone_tracker" value="y" />
61 <div class="warning" ><?php echo _('WARNING!!! Cloning this tracker will duplicate all the fields and all the elements from those fields into this tracker. There is nothing to prevent you from cloning multiple times or making a huge mess. You have been warned!') ?></div>
62 <p><?php echo html_build_select_box_from_arrays($ids,$titles,'clone_id','',false); ?></p>
63 <input type="submit" name="post_changes" value="<?php echo _('Submit') ?>" />
67 $ath->footer(array());