Ejemplo n.º 1
0
    function editDocumentForm(&$row, &$lists, $last, $created, &$params)
    {
        global $Itemid;
        global $_DOCMAN, $_DMUSER;
        require_once JPATH_SITE . '/includes/HTML_toolbar.php';
        JFilterOutput::objectHTMLSafe($row);
        ob_start();
        ?>
        <form action="<?php 
        echo JRoute::_('index.php?option=com_docman');
        ?>
" method="post" name="adminForm" onsubmit="javascript:setgood();" id="dm_frmedit" class="dm_form">
       
		<fieldset class="dm_adminform">
    	<legend><?php 
        echo _DML_DESCRIPTION;
        ?>
</legend>
        <table class="dm_admintable">
		<tr>
			<td class="dm_key">
				<label><?php 
        echo _DML_TITLE;
        ?>
</label>
			</td>
			<td>
				<input class="inputbox" type="text" name="dmname" size="50" maxlength="100" value="<?php 
        echo $row->dmname;
        ?>
" />
			</td>
		</tr>
		<tr>
			<td class="dm_key">
				<label for="catid"><?php 
        echo _DML_CATEGORY;
        ?>
</label>
			</td>
			<td>
				<?php 
        echo $lists['catid'];
        ?>
			</td>
		</tr>
		<?php 
        if (!$row->approved && $_DMUSER->canApprove()) {
            ?>
		<tr>
			<td class="dm_key">
				<label><?php 
            echo _DML_APPROVED;
            ?>
</label>
			</td>
			<td>
				<?php 
            echo $lists['approved'];
            ?>
			</td>
		</tr>
		<?php 
        }
        ?>
		<?php 
        if ($row->approved && $_DMUSER->canPublish()) {
            ?>
		<tr>
			<td class="dm_key">
				<label><?php 
            echo _DML_PUBLISHED;
            ?>
</label>
			</td>
			<td>
				<?php 
            echo $lists['published'];
            ?>
			</td>
		</tr>
		<?php 
        }
        ?>
		<tr>
		<td class="dm_key">
				<label><?php 
        echo _DML_DESCRIPTION;
        ?>
</label>
			</td>
			<td>
				<?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        DOCMAN_Compat::editorArea('editor1', $row->dmdescription, 'dmdescription', '100%', '250', '50', '10');
        ?>
			</td>
		</tr>
		</table>
		</fieldset>
       
        <?php 
        jimport('joomla.html.pane');
        $tabs = JPane::getInstance('tabs', array('useCookies' => false));
        echo $tabs->startPane("content-pane");
        echo $tabs->startPanel(_DML_DOCUMENT, "document-page");
        HTML_DMDocuments::_showTabDocument($row, $lists, $last, $created);
        echo $tabs->endPanel();
        echo $tabs->startPanel(_DML_TAB_PERMISSIONS, "permissions-page");
        HTML_DMDocuments::_showTabPermissions($row, $lists, $last, $created);
        echo $tabs->endPanel();
        echo $tabs->startPanel(_DML_TAB_LICENSE, "license-page");
        HTML_DMDocuments::_showTabLicense($row, $lists, $last, $created);
        if (isset($params)) {
            echo $tabs->endPanel();
            echo $tabs->startPanel(_DML_TAB_DETAILS, "details-page");
            HTML_DMDocuments::_showTabDetails($row, $lists, $last, $created, $params);
        }
        echo $tabs->endPanel();
        echo $tabs->endPane();
        ?>

        <input type="hidden" name="goodexit" value="0" />
		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="option" value="com_docman" />
		<input type="hidden" name="task" value="doc_save" />
		<input type="hidden" name="Itemid" value="<?php 
        echo $Itemid;
        ?>
" />
        <input type="hidden" name="dmcounter" value="<?php 
        echo $row->dmcounter;
        ?>
" />
        <?php 
        echo DOCMAN_token::render();
        ?>
		</form>
        <?php 
        $html = ob_get_contents();
        ob_end_clean();
        return $html;
    }
Ejemplo n.º 2
0
    function editDocumentForm(&$row, &$lists, $last, $created, &$params)
    {
        global $Itemid;
        global $_DOCMAN, $_DMUSER;
        require_once $GLOBALS['mosConfig_absolute_path'] . '/includes/HTML_toolbar.php';
        mosMakeHtmlSafe($row);
        ob_start();
        ?>
        <form action="index.php" method="post" name="adminForm" onsubmit="javascript:setgood();" id="dm_frmedit" class="dm_form">
        <?php 
        $tabs = new dmTabs(0);
        echo $tabs->startPane("content-pane");
        echo $tabs->startTab(_DML_DOCUMENT, "document-page");
        HTML_DMDocuments::_showTabDocument($row, $lists, $last, $created);
        echo $tabs->endTab();
        echo $tabs->startTab(_DML_TAB_PERMISSIONS, "permissions-page");
        HTML_DMDocuments::_showTabPermissions($row, $lists, $last, $created);
        echo $tabs->endTab();
        echo $tabs->startTab(_DML_TAB_LICENSE, "license-page");
        HTML_DMDocuments::_showTabLicense($row, $lists, $last, $created);
        if (isset($params)) {
            echo $tabs->endTab();
            echo $tabs->startTab(_DML_TAB_DETAILS, "details-page");
            HTML_DMDocuments::_showTabDetails($row, $lists, $last, $created, $params);
        }
        echo $tabs->endTab();
        echo $tabs->endPane();
        ?>
        <br />
        <p>
            <label class="nofloat" for="dmdescription"><?php 
        echo _DML_DESCRIPTION;
        ?>
</label><br />
            <?php 
        // parameters : areaname, content, hidden field, width, height, rows, cols
        DOCMAN_Compat::editorArea('editor1', $row->dmdescription, 'dmdescription', '550', '250', '50', '10');
        ?>
        </p>

        <input type="hidden" name="goodexit" value="0" />
		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="option" value="com_docman" />
		<input type="hidden" name="task" value="doc_save" />
		<input type="hidden" name="Itemid" value="<?php 
        echo $Itemid;
        ?>
" />
        <input type="hidden" name="dmcounter" value="<?php 
        echo $row->dmcounter;
        ?>
" />
        <?php 
        echo DOCMAN_token::render();
        ?>
		</form>
        <?php 
        $html = ob_get_contents();
        ob_end_clean();
        return $html;
    }
Ejemplo n.º 3
0
    function editDocument(&$row, &$lists, $last, $created, &$params)
    {
        global $database, $mosConfig_offset, $mosConfig_live_site, $mosConfig_locale, $mosConfig_absolute_path;
        $tabs = new mosTabs(1);
        mosMakeHtmlSafe($row);
        DOCMAN_Compat::calendarJS();
        ?>
    	<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
    	<script language="JavaScript" src="<?php 
        echo $mosConfig_live_site;
        ?>
/includes/js/overlib_mini.js" type="text/javascript"></script>
    	<script language="JavaScript" type="text/javascript">
    		<!--
    		function submitbutton(pressbutton) {
    		  var form = document.adminForm;
    		  if (pressbutton == 'cancel') {
    			submitform( pressbutton );
    			return;
    		  }
    		  // do field validation
			<?php 
        dmHTML::docEditFieldsJS();
        /* Include all edits at once */
        ?>
			if ( $msg != "" ){
					$msghdr = "<?php 
        echo _DML_ENTRY_ERRORS;
        ?>
";
					$msghdr += '\n=================================';
					alert( $msghdr+$msg+'\n' );
			}else {
			<?php 
        getEditorContents('editor1', 'dmdescription');
        ?>
				submitform( pressbutton );
				}
			}
			//--> end submitbutton
    	</script>

    	<style>
			select option.label { background-color: #EEE; border: 1px solid #DDD; color : #333; }
		</style>

        <?php 
        $tmp = ($row->id ? _DML_EDIT : _DML_ADD) . ' ' . _DML_DOCUMENT;
        dmHTML::adminHeading($tmp, 'documents');
        ?>

    	<form action="index2.php" method="post" name="adminForm" class="adminform" id="dm_formedit">
        <table class="adminform">
        <tr>
            <th colspan="3"><?php 
        echo _DML_TITLE_DOCINFORMATION;
        ?>
</th>
        </tr>

        <?php 
        HTML_DMDocuments::_showTabBasic($row, $lists, $last, $created);
        ?>

        <tr>
        <td colspan="2">
		<?php 
        $tabs->startPane("content-pane");
        $tabs->startTab(_DML_DOC, "document-page");
        HTML_DMDocuments::_showTabDocument($row, $lists, $last, $created);
        $tabs->endTab();
        $tabs->startTab(_DML_TAB_PERMISSIONS, "ownership-page");
        HTML_DMDocuments::_showTabPermissions($row, $lists, $last, $created);
        $tabs->endTab();
        $tabs->startTab(_DML_TAB_LICENSE, "license-page");
        HTML_DMDocuments::_showTabLicense($row, $lists, $last, $created);
        if (isset($params)) {
            $tabs->endTab();
            $tabs->startTab(_DML_TAB_DETAILS, "details-page");
            HTML_DMDocuments::_showTabDetails($row, $lists, $last, $created, $params);
        }
        $tabs->endTab();
        $tabs->endPane();
        ?>
        </td>
        </tr>
        </table>
		<input type="hidden" name="original_dmfilename" value="<?php 
        echo $lists['original_dmfilename'];
        ?>
" />
    	<input type="hidden" name="dmsubmitedby" value="<?php 
        echo $row->dmsubmitedby;
        ?>
" />
    	<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
    	<input type="hidden" name="option" value="com_docman" />
    	<input type="hidden" name="section" value="documents" />
    	<input type="hidden" name="task" value="" />
        <input type="hidden" name="dmcounter" value="<?php 
        echo $row->dmcounter;
        ?>
" />
        <?php 
        echo DOCMAN_token::render();
        ?>
    	</form>
        <?php 
        include_once $mosConfig_absolute_path . "/components/com_docman/footer.php";
    }
Ejemplo n.º 4
0
    function editDocument(&$row, &$lists, $last, $created, &$params)
    {
        JHTML::_('behavior.tooltip');
        jimport('joomla.html.pane');
        $tabs = JPane::getInstance('tabs', array('useCookies' => true));
        JFilterOutput::objectHTMLSafe($row);
        DOCMAN_Compat::calendarJS();
        ?>
    	<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
    	<script language="JavaScript" src="<?php 
        echo JURI::root(true);
        ?>
/includes/js/overlib_mini.js" type="text/javascript"></script>
    	<script language="JavaScript" type="text/javascript">
    		<!--
    		function submitbutton(pressbutton) {
    		  var form = document.adminForm;
    		  if (pressbutton == 'cancel') {
    			submitform( pressbutton );
    			return;
    		  }
    		  // do field validation
			<?php 
        dmHTML::docEditFieldsJS();
        /* Include all edits at once */
        ?>
			if ( $msg != "" ){
					$msghdr = "<?php 
        echo _DML_ENTRY_ERRORS;
        ?>
";
					$msghdr += '\n=================================';
					alert( $msghdr+$msg+'\n' );
			}else {
			<?php 
        jimport('joomla.html.editor');
        $editor =& JFactory::getEditor();
        echo $editor->save('dmdescription');
        ?>
				submitform( pressbutton );
				}
			}
			//--> end submitbutton
    	</script>

    	<style>
			select option.label { background-color: #EEE; border: 1px solid #DDD; color : #333; }
		</style>

        <?php 
        $tmp = ($row->id ? _DML_EDIT : _DML_ADD) . ' ' . _DML_DOCUMENT;
        dmHTML::adminHeading($tmp, 'documents');
        ?>

    	<form action="index.php" method="post" name="adminForm" class="adminform" id="dm_formedit">
        <fieldset class="adminform">
        <legend><?php 
        echo _DML_TITLE_DOCINFORMATION;
        ?>
</legend>
        <table class="admintable">

        <?php 
        HTML_DMDocuments::_showTabBasic($row, $lists, $last, $created);
        ?>

        <tr>
        </table>
    	</fieldset>
		<?php 
        echo $tabs->startPane("content-pane");
        echo $tabs->startPanel(_DML_DOC, "document-page");
        HTML_DMDocuments::_showTabDocument($row, $lists, $last, $created);
        echo $tabs->endPanel();
        echo $tabs->startPanel(_DML_TAB_PERMISSIONS, "ownership-page");
        HTML_DMDocuments::_showTabPermissions($row, $lists, $last, $created);
        echo $tabs->endPanel();
        echo $tabs->startPanel(_DML_TAB_LICENSE, "license-page");
        HTML_DMDocuments::_showTabLicense($row, $lists, $last, $created);
        if (isset($params)) {
            echo $tabs->endPanel();
            echo $tabs->startPanel(_DML_TAB_DETAILS, "details-page");
            HTML_DMDocuments::_showTabDetails($row, $lists, $last, $created, $params);
        }
        echo $tabs->endPanel();
        echo $tabs->endPane();
        ?>
        
        </fieldset>
		<input type="hidden" name="original_dmfilename" value="<?php 
        echo $lists['original_dmfilename'];
        ?>
" />
    	<input type="hidden" name="dmsubmitedby" value="<?php 
        echo $row->dmsubmitedby;
        ?>
" />
    	<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
    	<input type="hidden" name="option" value="com_docman" />
    	<input type="hidden" name="section" value="documents" />
    	<input type="hidden" name="task" value="" />
        <input type="hidden" name="dmcounter" value="<?php 
        echo $row->dmcounter;
        ?>
" />
        <?php 
        echo DOCMAN_token::render();
        ?>
    	</form>
        <?php 
        include_once JPATH_SITE . "/components/com_docman/footer.php";
    }