3 * Copyright (C) 2009 Alain Peyrat, Alcatel-Lucent
4 * Copyright 2012, Franck Villaume - TrivialDev
5 * http://fusionforge.org
7 * This file is part of FusionForge. FusionForge is free software;
8 * you can redistribute it and/or modify it under the terms of the
9 * GNU General Public License as published by the Free Software
10 * Foundation; either version 2 of the Licence, or (at your option)
13 * FusionForge is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 * Standard Alcatel-Lucent disclaimer for contributing to open source
26 * "The provided file ("Contribution") has not been tested and/or
27 * validated for release as or in products, combinations with products or
28 * other commercial use. Any use of the Contribution is entirely made at
29 * the user's own responsibility and the user can not rely on any features,
30 * functionalities or performances Alcatel-Lucent has attributed to the
33 * THE CONTRIBUTION BY ALCATEL-LUCENT IS PROVIDED AS IS, WITHOUT WARRANTY
34 * OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
35 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, COMPLIANCE,
36 * NON-INTERFERENCE AND/OR INTERWORKING WITH THE SOFTWARE TO WHICH THE
37 * CONTRIBUTION HAS BEEN MADE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL
38 * ALCATEL-LUCENT BE LIABLE FOR ANY DAMAGES OR OTHER LIABLITY, WHETHER IN
39 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
40 * CONTRIBUTION OR THE USE OR OTHER DEALINGS IN THE CONTRIBUTION, WHETHER
41 * TOGETHER WITH THE SOFTWARE TO WHICH THE CONTRIBUTION RELATES OR ON A STAND
46 // This page contains a form with a file-upload button
47 // so a user can choose a file to upload a .csv file and store it in task mgr
53 //pm_header(array('title'=>_('Upload data into the tasks.'),'group_project_id'=>$group_project_id));
54 $ath->header(array('atid'=>$ath->getID(), 'title'=>$ath->getName()));
56 $headers = getIntFromRequest('headers', 1);
57 $sep = getStringFromRequest('sep', ',');
64 <fieldset><legend><b>CSV Format</b></legend>
65 <form action="/tracker/" method="get">
66 <input type="hidden" name="group_id" value="<?php echo $group_id ?>" />
67 <input type="hidden" name="atid" value="<?php echo $ath->getID() ?>" />
68 <input type="hidden" name="func" value="csv" />
71 <td class="top"><b>Separator :</b></td>
72 <td><input type="radio" name="sep" value=","<?php if ($sep==',') echo ' checked="checked"' ?>/>Comma (char: ',')<br />
73 <input type="radio" name="sep" value=";"<?php if ($sep==';') echo ' checked="checked"' ?>/>Semi-colon (char: ';')</td>
75 <tr><td colspan="2"></td></tr>
77 <td class="top"><b>Header :</b></td>
78 <td><input type="radio" name="headers" value="1"<?php if ($headers) echo ' checked="checked"' ?>/>Included<br />
79 <input type="radio" name="headers" value="0"<?php if (!$headers) echo ' checked="checked"' ?>/>None</td>
82 <input type="submit" name="Submit" /></form>
88 <p><strong>Notes:</strong></p>
91 <li><strong>Comma/Semi-colon :</strong> Some international version of MS Excel uses ';' instead of ','.</li>
92 <li><strong>Headers Included or not :</strong> Add a line with the name of the fields at the fist line.</li>
96 $ath->footer(array());