set expiration date to currently set value

This commit is contained in:
Uwe Steinmann 2013-04-30 17:41:32 +02:00
parent b1922c0e9f
commit 26ae06b1ef

View File

@ -71,6 +71,11 @@ function checkForm()
<?php
$this->contentHeading(getMLText("edit_document_props"));
$this->contentContainerStart();
if($document->expires())
$expdate = date('d-m-Y', $document->getExpires());
else
$expdate = '';
?>
<form action="../op/op.EditDocument.php" name="form1" onsubmit="return checkForm();" method="post">
<input type="hidden" name="documentid" value="<?php echo $document->getID() ?>">
@ -111,7 +116,7 @@ function checkForm()
<td><?php printMLText("expires");?>:</td>
<td>
<span class="input-append date" id="expirationdate" data-date="<?php echo date('d-m-Y'); ?>" data-date-format="dd-mm-yyyy" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input class="span3" size="16" name="expdate" type="text" value="<?php echo date('d-m-Y'); ?>">
<input class="span3" size="16" name="expdate" type="text" value="<?php echo $expdate; ?>">
<span class="add-on"><i class="icon-calendar"></i></span>
</span>&nbsp;
<label class="checkbox inline">