mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +00:00
cancel checkout needs confirmation
This commit is contained in:
parent
39b81e03c3
commit
73a7f8a5f2
|
@ -41,6 +41,10 @@ if(empty($settings->_enableCancelCheckout)) {
|
|||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("operation_disallowed"));
|
||||
}
|
||||
|
||||
if(empty($_POST['confirm'])) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("operation_disallowed"));
|
||||
}
|
||||
|
||||
$document->cancelCheckOut($comment);
|
||||
if (is_bool($result) && !$result) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured"));
|
||||
|
|
|
@ -698,7 +698,16 @@ $(document).ready(function() {
|
|||
<form class="form-horizontal" action="../op/op.CancelCheckOut.php" method="post">
|
||||
<input type="hidden" name="documentid" value="<?php print $document->getID(); ?>">
|
||||
<?php
|
||||
echo createHiddenFieldWithKey('cancelcheckout');
|
||||
echo createHiddenFieldWithKey('cancelcheckout');
|
||||
$this->formField(
|
||||
getMLText("checkout_cancel_confirm"),
|
||||
array(
|
||||
'element'=>'input',
|
||||
'type'=>'checkbox',
|
||||
'name'=>'confirm',
|
||||
'value'=>1
|
||||
)
|
||||
);
|
||||
$this->formSubmit(getMLText('cancel_checkout'));
|
||||
?>
|
||||
</form>
|
||||
|
@ -710,7 +719,8 @@ $(document).ready(function() {
|
|||
<form action="../op/op.CancelCheckOut.php" method="post">
|
||||
<?php echo createHiddenFieldWithKey('cancelcheckout'); ?>
|
||||
<input type="hidden" name="documentid" value="<?php print $document->getID(); ?>">
|
||||
<input type="submit" class="btn" value="<?php printMLText("cancel_checkout"); ?>">
|
||||
<input type="hidden" name="confirm" value="1">
|
||||
<input type="submit" class="btn btn-danger" value="<?php printMLText("cancel_checkout"); ?>">
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user