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 BOXES
28 Allow modification of a artifact Selection Box
30 $title = sprintf(_('Modify a custom field in %s'),$ath->getName());
31 $ath->adminHeader(array('title'=>$title));
33 $id = getStringFromRequest('id');
34 $ac = new ArtifactExtraField($ath,$id);
35 if (!$ac || !is_object($ac)) {
36 $error_msg .= _('Unable to create ArtifactExtraField Object');
37 } elseif ($ac->isError()) {
38 $error_msg .= $ac->getErrorMessage();
42 <strong><?php echo _('Type of custom field').': '.$ac->getTypeName(); ?></strong></p>
44 <form action="<?php echo getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&id='.$id.'&atid='.$ath->getID(); ?>" method="post">
45 <input type="hidden" name="update_box" value="y" />
46 <input type="hidden" name="id" value="<?php echo $ac->getID(); ?>" />
48 <strong><?php echo _('Custom Field Name') ?>:</strong><br />
49 <input type="text" name="name" value="<?php echo $ac->getName(); ?>" />
52 <?php if ($ac->getType() == ARTIFACT_EXTRAFIELDTYPE_TEXTAREA) { ?>
53 <b><?php echo _('Text Area Rows'); ?></b><br />
54 <input type="text" name="attribute1" value="<?php echo $ac->getAttribute1(); ?>" size="2" maxlength="2" />
57 <b><?php echo _('Text Area Columns'); ?></b><br />
58 <input type="text" name="attribute2" value="<?php echo $ac->getAttribute2(); ?>" size="2" maxlength="2" />
59 <?php } elseif ($ac->getType() == ARTIFACT_EXTRAFIELDTYPE_TEXT || $ac->getType() == ARTIFACT_EXTRAFIELDTYPE_RELATION) {?>
60 <b><?php echo _('Text Field Size'); ?></b><br />
61 <input type="text" name="attribute1" value="<?php echo $ac->getAttribute1(); ?>" size="2" maxlength="2" />
64 <b><?php echo _('Text Field Maxlength'); ?></b><br />
65 <input type="text" name="attribute2" value="<?php echo $ac->getAttribute2(); ?>" size="2" maxlength="2" />
67 <input type="hidden" name="attribute1" value="0" />
68 <input type="hidden" name="attribute2" value="0" />
72 <strong><?php echo _('Field alias') ?>:</strong><br />
73 <input type="text" name="alias" value="<?php echo $ac->getAlias(); ?>" />
75 <p><input type="checkbox" name="is_required" <?php if ($ac->isRequired()) echo "checked=\"checked\""; ?> /><?php echo _('Field is mandatory')?></p>
76 <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') ?>
79 <input type="submit" name="post_changes" value="<?php echo _('Submit') ?>" />
85 $ath->footer(array());
89 // c-file-style: "bsd"