major rework, make it work again

This commit is contained in:
Uwe Steinmann 2021-05-04 18:25:33 +02:00
parent efd79e7521
commit f5b8b5b45d
2 changed files with 20 additions and 17 deletions

View File

@ -68,7 +68,7 @@ if (!is_object($transmittal)) {
}
if ($transmittal->getUser()->getID() != $user->getID()) {
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version"));
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_transmittal"));
}
if($transmittal->addContent($version)) {

View File

@ -16,7 +16,7 @@
/**
* Include parent class
*/
require_once("class.Bootstrap.php");
//require_once("class.Bootstrap.php");
/**
* Class which outputs the html page for AddToTransmittal view
@ -29,7 +29,7 @@ require_once("class.Bootstrap.php");
* 2010-2012 Uwe Steinmann
* @version Release: @package_version@
*/
class SeedDMS_View_AddToTransmittal extends SeedDMS_Bootstrap_Style {
class SeedDMS_View_AddToTransmittal extends SeedDMS_Theme_Style {
function show() { /* {{{ */
$dms = $this->params['dms'];
@ -42,31 +42,34 @@ class SeedDMS_View_AddToTransmittal extends SeedDMS_Bootstrap_Style {
$this->contentStart();
$this->pageNavigation(getMLText("my_documents"), "my_documents");
$this->contentHeading(getMLText("add_to_transmittal"));
$this->contentContainerStart();
?>
<form action="../op/op.AddToTransmittal.php" name="form1" method="post">
<form class="form-horizontal" action="../op/op.AddToTransmittal.php" name="form1" method="post">
<input type="hidden" name="documentid" value="<?php print $content->getDocument()->getID();?>">
<input type="hidden" name="version" value="<?php print $content->getVersion();?>">
<input type="hidden" name="action" value="addtotransmittal">
<?php echo createHiddenFieldWithKey('addtotransmittal'); ?>
<p>
<?php printMLText("transmittal"); ?>:
<select name="assignTo">
<?php
$this->contentContainerStart();
$options = array();
foreach ($transmittals as $transmittal) {
print "<option value=\"".$transmittal->getID()."\">" . htmlspecialchars($transmittal->getName()) . "</option>";
$options[] = array($transmittal->getID(), htmlspecialchars($transmittal->getName()));
}
$this->formField(
getMLText("transmittal"),
array(
'element'=>'select',
'id'=>'assignTo',
'name'=>'assignTo',
'class'=>'chzn-select',
'options'=>$options,
'placeholder'=>getMLText('choose_transmittal'),
)
);
$this->contentContainerEnd();
$this->formSubmit('<i class="fa fa-plus"></i> '.getMLText('add'));
?>
</select>
</p>
<p><button type="submit" class="btn"><i class="fa fa-plus"></i> <?php printMLText("add");?></button></p>
</form>
<?php
$this->contentContainerEnd();
$this->contentEnd();
$this->htmlEndPage();
} /* }}} */