3 * FusionForge Documentation Manager
5 * Copyright 2012, Franck Villaume - TrivialDev
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.
24 /* please do not add require here : use www/docman/index.php to add require */
25 /* global variables used */
26 global $g; //group object
27 global $group_id; // id of the group
29 if (!forge_check_perm('docman', $group_id, 'approve')) {
30 $return_msg= _('Document Manager Access Denied');
31 session_redirect('/docman/?group_id='.$group_id.'&warning_msg='.urlencode($return_msg));
34 echo '<div id="editFile" >';
35 echo '<form id="editdocdata" name="editdocdata" method="post" enctype="multipart/form-data">';
36 echo '<table border="0">';
38 echo ' <td><strong>'. _('Document Title:') .'</strong>'. utils_requiredField() .'<br />';
39 echo ' <input id="title" type="text" name="title" size="40" maxlength="255"/></td>';
42 echo ' <td><strong>'. _('Description:') .'</strong>'. utils_requiredField() .'<br />';
43 echo ' <input id="description" type="text" name="description" size="40" maxlength="255"/></td>';
45 if ($g->useDocmanSearch()) {
47 echo ' <td>'. _('Both fields are used by document search engine.'). '.</td>';
51 echo ' <td><strong>'. _('File:') .'</strong>';
52 echo ' <a id="filelink" />';
55 if ($g->useCreateOnline()) {
56 echo ' <tr id="editonlineroweditfile" >';
57 echo ' <td>'. _('Edit the contents to your desire or leave them as they are to remain unmodified.') .'<br />';
58 echo ' <textarea id="defaulteditzone" name="details" rows="15" cols="70"></textarea><br />';
59 echo ' <input id="defaulteditfiletype" type="hidden" name="filetype" value="text/plain" />';
60 echo ' <input id="editor" type="hidden" name="editor" value="online" />';
65 echo ' <td><strong>'. _('Folder that document belongs in:') .'</strong><br />';
66 echo ' <select name="doc_group" id="doc_group" />';
70 echo ' <td><strong>'. _('State:') .'</strong><br />';
71 echo ' <select name="stateid" id="stateid" />';
74 echo ' <tr id="fileurlroweditfile">';
75 echo ' <td><strong>'. _('Specify an new outside URL where the file will be referenced:') .'</strong>'. utils_requiredField() .'<br />';
76 echo ' <input id="fileurl" type="text" name="file_url" size="50" />';
79 echo ' <tr id="uploadnewroweditfile">';
80 echo ' <td><strong>'. _('OPTIONAL: Upload new file:') .'</strong><br />';
81 echo ' <input type="file" name="uploaded_data" size="30" />';
85 echo '<input type="hidden" id="docid" name="docid" />';