5 * Copyright 2010 (c) 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.
25 // FORM TO UPDATE POP-UP CHOICES FOR A BOX
28 Allow modification of a Choice for a Pop-up Box
30 $boxid = getIntFromRequest('boxid');
31 $ac = new ArtifactExtraField($ath,$boxid);
32 if (!$ac || !is_object($ac)) {
33 exit_error(_('Unable to create ArtifactExtraField Object'),'tracker');
34 } elseif ($ac->isError()) {
35 exit_error($ac->getErrorMessage(),'tracker');
37 $id = getStringFromRequest('id');
38 $ao = new ArtifactExtraFieldElement($ac,$id);
39 if (!$ao || !is_object($ao)) {
40 exit_error(_('Unable to create ArtifactExtraFieldElement Object'),'tracker');
41 } elseif ($ao->isError()) {
42 exit_error($ao->getErrorMessage(),'tracker');
44 $title = sprintf(_('Modify a custom field element in %s'), $ath->getName()) ;
45 $ath->adminHeader(array('title'=>$title));
48 <form action="<?php echo getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&atid='.$ath->getID(); ?>" method="post">
49 <input type="hidden" name="update_opt" value="y" />
50 <input type="hidden" name="id" value="<?php echo $ao->getID(); ?>" />
51 <input type="hidden" name="boxid" value="<?php echo $boxid; ?>" />
54 <strong><?php echo _('Element') ?>:</strong><br />
55 <input type="text" name="name" value="<?php echo $ao->getName(); ?>" /></p>
57 Show a pop-up box to choose the possible statuses that this element will map to
59 <?php if ($ac->getType() == ARTIFACT_EXTRAFIELDTYPE_STATUS) { ?>
60 <strong><?php echo _('Status'); ?></strong><br />
61 <?php echo $ath->statusBox('status_id',$ao->getStatusID(),false,false); ?>
64 <div class="warning"><?php echo _('It is not recommended that you change the custom field name because other things are dependent upon it. When you change the custom field name, all related items will be changed to the new name') ?>
67 <input type="submit" name="post_changes" value="<?php echo _('Submit') ?>" /></p>
70 $ath->footer(array());
76 // c-file-style: "bsd"