5 * Copyright 2010 (c) FusionForge Team
6 * Copyright 2014, Franck Villaume - TrivialDev
7 * http://fusionforge.org
9 * This file is part of FusionForge. FusionForge is free software;
10 * you can redistribute it and/or modify it under the terms of the
11 * GNU General Public License as published by the Free Software
12 * Foundation; either version 2 of the Licence, or (at your option)
15 * FusionForge is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License along
21 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 // FORM TO UPDATE POP-UP CHOICES FOR A BOX
29 Allow modification of a Choice for a Pop-up Box
31 $boxid = getIntFromRequest('boxid');
32 $ac = new ArtifactExtraField($ath,$boxid);
33 if (!$ac || !is_object($ac)) {
34 exit_error(_('Unable to create ArtifactExtraField Object'),'tracker');
35 } elseif ($ac->isError()) {
36 exit_error($ac->getErrorMessage(),'tracker');
38 $id = getStringFromRequest('id');
39 $ao = new ArtifactExtraFieldElement($ac,$id);
40 if (!$ao || !is_object($ao)) {
41 exit_error(_('Unable to create ArtifactExtraFieldElement Object'),'tracker');
42 } elseif ($ao->isError()) {
43 exit_error($ao->getErrorMessage(),'tracker');
45 $title = sprintf(_('Update a custom field element in %s'), $ath->getName()) ;
46 $ath->adminHeader(array('title'=>$title));
49 <h2><?php echo _('Custom field name')._(': ').$ac->getName() ?></h2>
50 <form action="<?php echo getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&atid='.$ath->getID(); ?>" method="post">
51 <input type="hidden" name="update_opt" value="y" />
52 <input type="hidden" name="id" value="<?php echo $ao->getID(); ?>" />
53 <input type="hidden" name="boxid" value="<?php echo $boxid; ?>" />
57 <strong><?php echo _('Element')._(':'); ?></strong><br />
59 <input id="name" type="text" name="name" value="<?php echo $ao->getName(); ?>" />
62 Show a pop-up box to choose the possible statuses that this element will map to
64 <?php if ($ac->getType() == ARTIFACT_EXTRAFIELDTYPE_STATUS) { ?>
65 <strong><?php echo _('Status'); ?></strong><br />
66 <?php echo $ath->statusBox('status_id',$ao->getStatusID(),false,false); ?>
69 <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.') ?>
72 <input type="submit" name="post_changes" value="<?php echo _('Submit') ?>" /></p>
75 $ath->footer(array());
81 // c-file-style: "bsd"