mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 21:51:32 +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"));
|
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);
|
$document->cancelCheckOut($comment);
|
||||||
if (is_bool($result) && !$result) {
|
if (is_bool($result) && !$result) {
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured"));
|
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">
|
<form class="form-horizontal" action="../op/op.CancelCheckOut.php" method="post">
|
||||||
<input type="hidden" name="documentid" value="<?php print $document->getID(); ?>">
|
<input type="hidden" name="documentid" value="<?php print $document->getID(); ?>">
|
||||||
<?php
|
<?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'));
|
$this->formSubmit(getMLText('cancel_checkout'));
|
||||||
?>
|
?>
|
||||||
</form>
|
</form>
|
||||||
|
@ -710,7 +719,8 @@ $(document).ready(function() {
|
||||||
<form action="../op/op.CancelCheckOut.php" method="post">
|
<form action="../op/op.CancelCheckOut.php" method="post">
|
||||||
<?php echo createHiddenFieldWithKey('cancelcheckout'); ?>
|
<?php echo createHiddenFieldWithKey('cancelcheckout'); ?>
|
||||||
<input type="hidden" name="documentid" value="<?php print $document->getID(); ?>">
|
<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>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user