3 * FusionForge Documentation Manager
5 * Copyright 2000, Quentin Cregan/Sourceforge
6 * Copyright 2002-2003, Tim Perdue/GForge, LLC
7 * Copyright 2010-2011, Franck Villaume - Capgemini
8 * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
9 * Copyright 2013-2014, Franck Villaume - TrivialDev
10 * http://fusionforge.org
12 * This file is part of FusionForge. FusionForge is free software;
13 * you can redistribute it and/or modify it under the terms of the
14 * GNU General Public License as published by the Free Software
15 * Foundation; either version 2 of the Licence, or (at your option)
18 * FusionForge is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License along
24 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
28 /* please do not add require here : use www/docman/index.php to add require */
29 /* global variables used */
30 global $group_id; // id of the group
31 global $dirid; // id of the doc_group
33 if (!forge_check_perm('docman', $group_id, 'approve')) {
34 $warning_msg = _('Document Manager Access Denied');
35 session_redirect('/docman/?group_id='.$group_id);
38 // plugin projects-hierarchy
39 $actionurl = '/docman/?group_id='.$group_id.'&action=addsubdocgroup&dirid='.$dirid;
40 if (isset($childgroup_id) && $childgroup_id) {
41 $g = group_get_object($childgroup_id);
42 $actionurl .= '&childgroup_id='.$childgroup_id;
45 echo html_ao('script', array('type' => 'text/javascript'));
48 function doItAddSubGroup() {
49 document.getElementById('addsubgroup').submit();
50 document.getElementById('submitaddsubgroup').disabled = true;
54 echo html_ac(html_ap() - 1);
55 echo html_ao('div', array('class' => 'docmanDivIncluded'));
56 echo $HTML->openForm(array('id' => 'addsubgroup', 'name' => 'addsubgroup', 'method' => 'post', 'action' => util_make_uri($actionurl)));
58 $folderMessage = _('Name of the document subfolder to create');
60 $folderMessage = _('Name of the document folder to create');
62 echo html_e('span', array(), $folderMessage._(': '), false);
63 echo html_e('input', array('required' => 'required', 'type' => 'text', 'name' => 'groupname', 'size' => 40, 'maxlength' => 255, 'placeholder' => $folderMessage));
64 echo html_e('input', array('id' => 'submitaddsubgroup', 'type' => 'button', 'value' => _('Create'), 'onclick' => 'javascript:doItAddSubGroup()'));
65 echo $HTML->closeForm();
66 echo html_ac(html_ap() -1);