3 * FusionForge Tracker Cloning Form
5 * Copyright 2010, FusionForge Team
6 * http://fusionforge.org
8 * This file is part of FusionForge. FusionForge is free software;
9 * you can redistribute it and/or modify it under the terms of the
10 * GNU General Public License as published by the Free Software
11 * Foundation; either version 2 of the Licence, or (at your option)
14 * FusionForge is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 $g = group_get_object(forge_get_config('template_group'));
25 if (!$g || !is_object($g)) {
27 } elseif ($g->isError()) {
28 exit_error($g->getErrorMessage(),'tracker');
30 $atf = new ArtifactTypeFactory($g);
31 if (!$atf || !is_object($atf)) {
32 exit_error(_('Unable to Create Template Group Object'),'tracker');
33 } elseif ($atf->isError()) {
34 exit_error($atf->getErrorMessage(),'tracker');
36 $ata = $atf->getArtifactTypes();
39 for ($i=0; $i<count($ata); $i++) {
40 if (!$ata[$i] || $ata[$i]->isError()) {
43 $ids[]=$ata[$i]->getID();
44 $titles[]=$g->getPublicName().'::'.$ata[$i]->getName();
48 $ath->adminHeader(array ('title'=>_('Clone Tracker')));
51 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>';
54 <p><?php echo _('Choose the template tracker to clone.') ?></p>
55 <form action="<?php echo getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&atid='.$ath->getID(); ?>" method="post">
56 <input type="hidden" name="clone_tracker" value="y" />
57 <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>
58 <p><?php echo html_build_select_box_from_arrays($ids,$titles,'clone_id','',false); ?></p>
59 <input type="submit" name="post_changes" value="<?php echo _('Submit') ?>" />
63 $ath->footer(array());