3 // FORM TO CLONE A TRACKER
5 $g =& group_get_object(forge_get_config('template_group'));
6 if (!$g || !is_object($g)) {
7 exit_error('Error','Unable to Create Template Group Object');
8 } elseif ($g->isError()) {
9 exit_error('Error',$g->getErrorMessage());
11 $atf = new ArtifactTypeFactory($g);
12 if (!$atf || !is_object($atf)) {
13 exit_error('Error','Unable to Create Template Group Object');
14 } elseif ($atf->isError()) {
15 exit_error('Error',$atf->atfetErrorMessaatfe());
17 $ata =& $atf->getArtifactTypes();
18 for ($i=0; $i<count($ata); $i++) {
19 if (!$ata[$i] || $ata[$i]->isError()) {
22 $ids[]=$ata[$i]->getID();
23 $titles[]=$g->getPublicName().'::'.$ata[$i]->getName();
27 $ath->adminHeader(array ('title'=>_('Clone Tracker')));
29 echo "<h1>"._('Clone Tracker')."</h1>";
32 <p><?php echo _('Choose the template tracker to clone. The site administrator will have to set up trackers with default values and set permissions properly so you can access them.') ?></p>
33 <form action="<?php echo getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&atid='.$ath->getID(); ?>" method="post">
34 <input type="hidden" name="clone_tracker" value="y" />
35 <p><strong><?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!') ?></strong></p>
36 <p><?php echo html_build_select_box_from_arrays($ids,$titles,'clone_id','',false); ?></p>
37 <input type="submit" name="post_changes" value="<?php echo _('Submit') ?>" />
40 $ath->footer(array());