show message and hide form if document cannot be checked in

This commit is contained in:
Uwe Steinmann 2015-04-23 16:44:16 +02:00
parent 4b6eeba319
commit 0bac3deabb

View File

@ -144,6 +144,9 @@ function checkForm()
break; break;
} }
} }
$checkoutinfo = $document->getCheckOutInfo();
if($checkoutstatus == 0) {
$latestContent = $document->getLatestContent(); $latestContent = $document->getLatestContent();
$reviewStatus = $latestContent->getReviewStatus(); $reviewStatus = $latestContent->getReviewStatus();
@ -531,13 +534,20 @@ function checkForm()
?> ?>
<tr> <tr>
<td></td> <td></td>
<td><input type="submit" class="btn" value="<?php printMLText("update_document")?>"></td> <td><input type="submit" class="btn" value="<?php printMLText("checkin_document")?>"></td>
</tr> </tr>
</table> </table>
</form> </form>
<?php <?php
$this->contentContainerEnd(); $this->contentContainerEnd();
} else {
?>
<form action="../op/op.CheckInDocument.php" method="post" name="form1" onsubmit="return checkForm();">
<input type="hidden" name="documentid" value="<?php print $document->getID(); ?>">
<input type="submit" class="btn" value="<?php printMLText("reset_checkout"); ?>">
<?php
}
$this->htmlEndPage(); $this->htmlEndPage();
} /* }}} */ } /* }}} */
} }