Merge branch 'seeddms-5.0.x' into develop

This commit is contained in:
Uwe Steinmann 2015-10-30 13:09:25 +01:00
commit a30b3b9505
20 changed files with 93 additions and 74 deletions

View File

@ -4,6 +4,8 @@
- fix lots of HTTP-Headers in op.Ajax.php (Closes: #233) - fix lots of HTTP-Headers in op.Ajax.php (Closes: #233)
- Timeline will be updated by ajax call, clicking on an item in the timeline - Timeline will be updated by ajax call, clicking on an item in the timeline
will output some document information will output some document information
- new attribute type 'date'
- all dates are now in format 'yyyy-mm-dd'
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Changes in version 4.3.21 Changes in version 4.3.21

View File

@ -318,6 +318,7 @@ class SeedDMS_Core_AttributeDefinition { /* {{{ */
const type_boolean = '4'; const type_boolean = '4';
const type_url = '5'; const type_url = '5';
const type_email = '6'; const type_email = '6';
const type_date = '7';
/* /*
* The object type for which a attribute may be used * The object type for which a attribute may be used

View File

@ -136,7 +136,7 @@ $expires = false;
if (!isset($_POST['expires']) || $_POST["expires"] != "false") { if (!isset($_POST['expires']) || $_POST["expires"] != "false") {
if($_POST["expdate"]) { if($_POST["expdate"]) {
$tmp = explode('-', $_POST["expdate"]); $tmp = explode('-', $_POST["expdate"]);
$expires = mktime(0,0,0, $tmp[1], $tmp[0], $tmp[2]); $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]);
} else { } else {
$expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]); $expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]);
} }

View File

@ -50,13 +50,13 @@ $name = $_POST["name"];
$comment = $_POST["comment"]; $comment = $_POST["comment"];
if(isset($_POST["from"])) { if(isset($_POST["from"])) {
$tmp = explode('-', $_POST["from"]); $tmp = explode('-', $_POST["from"]);
$from = mktime(0,0,0, $tmp[1], $tmp[0], $tmp[2]); $from = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]);
} else { } else {
$from = mktime(0,0,0, intval($_POST["frommonth"]), intval($_POST["fromday"]), intval($_POST["fromyear"])); $from = mktime(0,0,0, intval($_POST["frommonth"]), intval($_POST["fromday"]), intval($_POST["fromyear"]));
} }
if(isset($_POST["to"])) { if(isset($_POST["to"])) {
$tmp = explode('-', $_POST["to"]); $tmp = explode('-', $_POST["to"]);
$to = mktime(23,59,59, $tmp[1], $tmp[0], $tmp[2]); $to = mktime(23,59,59, $tmp[1], $tmp[2], $tmp[0]);
} else { } else {
$to = mktime(23,59,59, intval($_POST["tomonth"]), intval($_POST["today"]), intval($_POST["toyear"])); $to = mktime(23,59,59, intval($_POST["tomonth"]), intval($_POST["today"]), intval($_POST["toyear"]));
} }

View File

@ -183,7 +183,7 @@ $expires = false;
if (!isset($_POST["expires"]) || $_POST["expires"] != "false") { if (!isset($_POST["expires"]) || $_POST["expires"] != "false") {
if(isset($_POST["expdate"]) && $_POST["expdate"]) { if(isset($_POST["expdate"]) && $_POST["expdate"]) {
$tmp = explode('-', $_POST["expdate"]); $tmp = explode('-', $_POST["expdate"]);
$expires = mktime(0,0,0, $tmp[1], $tmp[0], $tmp[2]); $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]);
} else { } else {
$expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]); $expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]);
} }

View File

@ -59,13 +59,13 @@ $name = $_POST["name"];
$comment = $_POST["comment"]; $comment = $_POST["comment"];
if(isset($_POST["from"])) { if(isset($_POST["from"])) {
$tmp = explode('-', $_POST["from"]); $tmp = explode('-', $_POST["from"]);
$from = mktime(0,0,0, $tmp[1], $tmp[0], $tmp[2]); $from = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]);
} else { } else {
$from = mktime(0,0,0, intval($_POST["frommonth"]), intval($_POST["fromday"]), intval($_POST["fromyear"])); $from = mktime(0,0,0, intval($_POST["frommonth"]), intval($_POST["fromday"]), intval($_POST["fromyear"]));
} }
if(isset($_POST["to"])) { if(isset($_POST["to"])) {
$tmp = explode('-', $_POST["to"]); $tmp = explode('-', $_POST["to"]);
$to = mktime(23,59,59, $tmp[1], $tmp[0], $tmp[2]); $to = mktime(23,59,59, $tmp[1], $tmp[2], $tmp[0]);
} else { } else {
$to = mktime(23,59,59, intval($_POST["tomonth"]), intval($_POST["today"]), intval($_POST["toyear"])); $to = mktime(23,59,59, intval($_POST["tomonth"]), intval($_POST["today"]), intval($_POST["toyear"]));
} }

View File

@ -243,7 +243,7 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) {
if(isset($_GET["createstart"])) { if(isset($_GET["createstart"])) {
$tmp = explode("-", $_GET["createstart"]); $tmp = explode("-", $_GET["createstart"]);
$startdate = array('year'=>(int)$tmp[2], 'month'=>(int)$tmp[1], 'day'=>(int)$tmp[0], 'hour'=>0, 'minute'=>0, 'second'=>0); $startdate = array('year'=>(int)$tmp[0], 'month'=>(int)$tmp[1], 'day'=>(int)$tmp[2], 'hour'=>0, 'minute'=>0, 'second'=>0);
} else { } else {
if(isset($_GET["createstartyear"])) if(isset($_GET["createstartyear"]))
$startdate = array('year'=>$_GET["createstartyear"], 'month'=>$_GET["createstartmonth"], 'day'=>$_GET["createstartday"], 'hour'=>0, 'minute'=>0, 'second'=>0); $startdate = array('year'=>$_GET["createstartyear"], 'month'=>$_GET["createstartmonth"], 'day'=>$_GET["createstartday"], 'hour'=>0, 'minute'=>0, 'second'=>0);
@ -256,7 +256,7 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) {
} }
if(isset($_GET["createend"])) { if(isset($_GET["createend"])) {
$tmp = explode("-", $_GET["createend"]); $tmp = explode("-", $_GET["createend"]);
$stopdate = array('year'=>(int)$tmp[2], 'month'=>(int)$tmp[1], 'day'=>(int)$tmp[0], 'hour'=>23, 'minute'=>59, 'second'=>59); $stopdate = array('year'=>(int)$tmp[0], 'month'=>(int)$tmp[1], 'day'=>(int)$tmp[2], 'hour'=>23, 'minute'=>59, 'second'=>59);
} else { } else {
if(isset($_GET["createendyear"])) if(isset($_GET["createendyear"]))
$stopdate = array('year'=>$_GET["createendyear"], 'month'=>$_GET["createendmonth"], 'day'=>$_GET["createendday"], 'hour'=>23, 'minute'=>59, 'second'=>59); $stopdate = array('year'=>$_GET["createendyear"], 'month'=>$_GET["createendmonth"], 'day'=>$_GET["createendday"], 'hour'=>23, 'minute'=>59, 'second'=>59);

View File

@ -47,7 +47,7 @@ $expires = false;
if (!isset($_POST["expires"]) || $_POST["expires"] != "false") { if (!isset($_POST["expires"]) || $_POST["expires"] != "false") {
if(isset($_POST["expdate"]) && $_POST["expdate"]) { if(isset($_POST["expdate"]) && $_POST["expdate"]) {
$tmp = explode('-', $_POST["expdate"]); $tmp = explode('-', $_POST["expdate"]);
$expires = mktime(0,0,0, $tmp[1], $tmp[0], $tmp[2]); $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]);
} else { } else {
$expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]); $expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]);
} }

View File

@ -301,7 +301,7 @@ if ($_FILES['userfile']['error'] == 0) {
if (!isset($_POST['expires']) || $_POST["expires"] != "false") { if (!isset($_POST['expires']) || $_POST["expires"] != "false") {
if($_POST["expdate"]) { if($_POST["expdate"]) {
$tmp = explode('-', $_POST["expdate"]); $tmp = explode('-', $_POST["expdate"]);
$expires = mktime(0,0,0, $tmp[1], $tmp[0], $tmp[2]); $expires = mktime(0,0,0, $tmp[1], $tmp[2], $tmp[0]);
} else { } else {
$expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]); $expires = mktime(0,0,0, $_POST["expmonth"], $_POST["expday"], $_POST["expyear"]);
} }

View File

@ -15,7 +15,7 @@ $(document).ready( function() {
$('body').on('touchstart.dropdown', '.dropdown-menu', function (e) { e.stopPropagation(); }); $('body').on('touchstart.dropdown', '.dropdown-menu', function (e) { e.stopPropagation(); });
$('#expirationdate, #fromdate, #todate, #createstartdate, #createenddate, #expirationstartdate, #expirationenddate, #revisionstartdate') $('.datepicker, #expirationdate, #fromdate, #todate, #createstartdate, #createenddate, #expirationstartdate, #expirationenddate, #revisionstartdate')
.datepicker() .datepicker()
.on('changeDate', function(ev){ .on('changeDate', function(ev){
$(ev.currentTarget).datepicker('hide'); $(ev.currentTarget).datepicker('hide');

View File

@ -176,8 +176,8 @@ $(document).ready(function() {
<tr> <tr>
<td><?php printMLText("expires");?>:</td> <td><?php printMLText("expires");?>:</td>
<td> <td>
<span class="input-append date span12" id="expirationdate" data-date="<?php echo date('d-m-Y', $expts); ?>" data-date-format="dd-mm-yyyy" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>"> <span class="input-append date span12" id="expirationdate" data-date="<?php echo date('Y-m-d', $expts); ?>" data-date-format="yyyy-mm-dd" 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', $expts); ?>"> <input class="span3" size="16" name="expdate" type="text" value="<?php echo date('Y-m-d', $expts); ?>">
<span class="add-on"><i class="icon-calendar"></i></span> <span class="add-on"><i class="icon-calendar"></i></span>
</span>&nbsp; </span>&nbsp;
<label class="checkbox inline"> <label class="checkbox inline">

View File

@ -41,7 +41,7 @@ class SeedDMS_View_AddEvent extends SeedDMS_Bootstrap_Style {
$this->contentHeading(getMLText("add_event")); $this->contentHeading(getMLText("add_event"));
$this->contentContainerStart(); $this->contentContainerStart();
$expdate = date('d-m-Y'); $expdate = date('Y-m-d');
?> ?>
<script language="JavaScript"> <script language="JavaScript">
function checkForm() function checkForm()
@ -76,7 +76,7 @@ function checkForm()
<tr> <tr>
<td><?php printMLText("from");?>:</td> <td><?php printMLText("from");?>:</td>
<td><?php //$this->printDateChooser(-1, "from");?> <td><?php //$this->printDateChooser(-1, "from");?>
<span class="input-append date span12" id="fromdate" data-date="<?php echo $expdate; ?>" data-date-format="dd-mm-yyyy"> <span class="input-append date span12" id="fromdate" data-date="<?php echo $expdate; ?>" data-date-format="yyyy-mm-dd">
<input class="span6" size="16" name="from" type="text" value="<?php echo $expdate; ?>"> <input class="span6" size="16" name="from" type="text" value="<?php echo $expdate; ?>">
<span class="add-on"><i class="icon-calendar"></i></span> <span class="add-on"><i class="icon-calendar"></i></span>
</span> </span>
@ -85,7 +85,7 @@ function checkForm()
<tr> <tr>
<td><?php printMLText("to");?>:</td> <td><?php printMLText("to");?>:</td>
<td><?php //$this->printDateChooser(-1, "to");?> <td><?php //$this->printDateChooser(-1, "to");?>
<span class="input-append date span12" id="todate" data-date="<?php echo $expdate; ?>" data-date-format="dd-mm-yyyy"> <span class="input-append date span12" id="todate" data-date="<?php echo $expdate; ?>" data-date-format="yyyy-mm-dd">
<input class="span6" size="16" name="to" type="text" value="<?php echo $expdate; ?>"> <input class="span6" size="16" name="to" type="text" value="<?php echo $expdate; ?>">
<span class="add-on"><i class="icon-calendar"></i></span> <span class="add-on"><i class="icon-calendar"></i></span>
</span> </span>

View File

@ -130,7 +130,7 @@ function showAttributeDefinitions(selectObj) {
<td><?php printMLText("attrdef_objtype");?>:</td><td><select name="objtype"><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_all ?>">All</option><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_folder ?>">Folder</option><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_document ?>"><?php printMLText("document"); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_documentcontent ?>"><?php printMLText("version"); ?></option></select> <td><?php printMLText("attrdef_objtype");?>:</td><td><select name="objtype"><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_all ?>">All</option><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_folder ?>">Folder</option><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_document ?>"><?php printMLText("document"); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_documentcontent ?>"><?php printMLText("version"); ?></option></select>
</tr> </tr>
<tr> <tr>
<td><?php printMLText("attrdef_type");?>:</td><td><select name="type"><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_int ?>"><?php printMLText('attrdef_type_int'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_float ?>"><?php printMLText('attrdef_type_float'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_string ?>"><?php printMLText('attrdef_type_string'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_boolean ?>"><?php printMLText('attrdef_type_boolean'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_url ?>"><?php printMLText('attrdef_type_url'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_email ?>"><?php printMLText('attrdef_type_email'); ?></option></select></td> <td><?php printMLText("attrdef_type");?>:</td><td><select name="type"><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_int ?>"><?php printMLText('attrdef_type_int'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_float ?>"><?php printMLText('attrdef_type_float'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_string ?>"><?php printMLText('attrdef_type_string'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_boolean ?>"><?php printMLText('attrdef_type_boolean'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_url ?>"><?php printMLText('attrdef_type_url'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_email ?>"><?php printMLText('attrdef_type_email'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_date ?>"><?php printMLText('attrdef_type_date'); ?></option></select></td>
</tr> </tr>
<tr> <tr>
<td><?php printMLText("attrdef_multiple");?>:</td><td><input type="checkbox" value="1" name="multiple" /></td> <td><?php printMLText("attrdef_multiple");?>:</td><td><input type="checkbox" value="1" name="multiple" /></td>
@ -296,18 +296,18 @@ function showAttributeDefinitions(selectObj) {
</tr> </tr>
<tr> <tr>
<td> <td>
<?php printMLText("attrdef_type");?>: <?php printMLText("attrdef_objtype");?>:
</td> </td>
<td> <td>
<select name="type"><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_int ?>" <?php if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_int) echo "selected"; ?>><?php printMLText('attrdef_type_int'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_float ?>" <?php if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_float) echo "selected"; ?>><?php printMLText('attrdef_type_float'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_string ?>" <?php if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_string) echo "selected"; ?>><?php printMLText('attrdef_type_string'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_boolean ?>" <?php if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_boolean) echo "selected"; ?>><?php printMLText('attrdef_type_boolean'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_url ?>" <?php if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_url) echo "selected"; ?>><?php printMLText('attrdef_type_url'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_email ?>" <?php if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_email) echo "selected"; ?>><?php printMLText('attrdef_type_email'); ?></option></select> <select name="type"><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_int ?>" <?php if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_int) echo "selected"; ?>><?php printMLText('attrdef_type_int'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_float ?>" <?php if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_float) echo "selected"; ?>><?php printMLText('attrdef_type_float'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_string ?>" <?php if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_string) echo "selected"; ?>><?php printMLText('attrdef_type_string'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_boolean ?>" <?php if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_boolean) echo "selected"; ?>><?php printMLText('attrdef_type_boolean'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_url ?>" <?php if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_url) echo "selected"; ?>><?php printMLText('attrdef_type_url'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_email ?>" <?php if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_email) echo "selected"; ?>><?php printMLText('attrdef_type_email'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_date ?>" <?php if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date) echo "selected"; ?>><?php printMLText('attrdef_type_date'); ?></option></select>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<?php printMLText("attrdef_objtype");?>: <?php printMLText("attrdef_type");?>:
</td> </td>
<td> <td>
<select name="objtype"><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_all ?>">All</option><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_folder ?>" <?php if($attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_folder) echo "selected"; ?>>Folder</option><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_document ?>" <?php if($attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_document) echo "selected"; ?>>Document</option><option value="<?php echo SeedDMS_Core_AttributeDefinition::objtype_documentcontent ?>" <?php if($attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_documentcontent) echo "selected"; ?>>Document content</option></select> <select name="type"><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_int ?>" <?php if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_int) echo "selected"; ?>><?php printMLText('attrdef_type_int'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_float ?>" <?php if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_float) echo "selected"; ?>><?php printMLText('attrdef_type_float'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_string ?>" <?php if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_string) echo "selected"; ?>><?php printMLText('attrdef_type_string'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_boolean ?>" <?php if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_boolean) echo "selected"; ?>><?php printMLText('attrdef_type_boolean'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_date ?>" <?php if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date) echo "selected"; ?>><?php printMLText('attrdef_type_date'); ?></option></select>
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@ -1165,35 +1165,51 @@ function folderSelected<?php echo $form ?>(id, name) {
} /* }}} */ } /* }}} */
function printAttributeEditField($attrdef, $attribute, $fieldname='attributes') { /* {{{ */ function printAttributeEditField($attrdef, $attribute, $fieldname='attributes') { /* {{{ */
if($valueset = $attrdef->getValueSetAsArray()) { switch($attrdef->getType()) {
echo "<select name=\"".$fieldname."[".$attrdef->getId()."]"; case SeedDMS_Core_AttributeDefinition::type_boolean:
if($attrdef->getMultipleValues()) { echo "<input type=\"checkbox\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"1\" ".($objvalue ? 'checked' : '')." />";
echo "[]\" multiple"; break;
case SeedDMS_Core_AttributeDefinition::type_date:
?>
<span class="input-append date datepicker" style="display: inline;" data-date="<?php echo date('Y-m-d'); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input class="span4" size="16" name="<?= $fieldname ?>[<?= $attrdef->getId() ?>]" type="text" value="<?php if($objvalue) echo $objvalue; else echo "" /*date('Y-m-d')*/; ?>">
<span class="add-on"><i class="icon-calendar"></i></span>
</span>
<?php
break;
default:
if($valueset = $attrdef->getValueSetAsArray()) {
echo "<select name=\"".$fieldname."[".$attrdef->getId()."]";
if($attrdef->getMultipleValues()) {
echo "[]\" multiple";
} else {
echo "\"";
}
echo ">";
if(!$attrdef->getMultipleValues()) {
echo "<option value=\"\"></option>";
}
$objvalue = $attribute ? (is_object($attribute) ? $attribute->getValueAsArray() : $attribute) : array();
foreach($valueset as $value) {
if($value) {
echo "<option value=\"".htmlspecialchars($value)."\"";
if(is_array($objvalue) && in_array($value, $objvalue))
echo " selected";
elseif($value == $objvalue)
echo " selected";
echo ">".htmlspecialchars($value)."</option>";
}
}
echo "</select>";
} else { } else {
echo "\""; $objvalue = $attribute ? (is_object($attribute) ? $attribute->getValue() : $attribute) : '';
} if(strlen($objvalue) > 80) {
echo ">"; echo "<textarea name=\"".$fieldname."[".$attrdef->getId()."]\">".htmlspecialchars($objvalue)."</textarea>";
if(!$attrdef->getMultipleValues()) { } else {
echo "<option value=\"\"></option>"; echo "<input type=\"text\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"".htmlspecialchars($objvalue)."\" />";
}
$objvalue = $attribute ? (is_object($attribute) ? $attribute->getValueAsArray() : $attribute) : array();
foreach($valueset as $value) {
if($value) {
echo "<option value=\"".htmlspecialchars($value)."\"";
if(is_array($objvalue) && in_array($value, $objvalue))
echo " selected";
elseif($value == $objvalue)
echo " selected";
echo ">".htmlspecialchars($value)."</option>";
} }
} }
echo "</select>"; break;
} else {
$objvalue = $attribute ? (is_object($attribute) ? $attribute->getValue() : $attribute) : '';
if(strlen($objvalue) > 30)
echo "<textarea name=\"".$fieldname."[".$attrdef->getId()."]\">".htmlspecialchars($objvalue)."</textarea>";
else
echo "<input type=\"text\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"".htmlspecialchars($objvalue)."\" />";
} }
} /* }}} */ } /* }}} */
@ -2270,7 +2286,7 @@ mayscript>
'editable': false, 'editable': false,
'selectable': true, 'selectable': true,
'style': 'box', 'style': 'box',
'locale': 'de_DE' 'locale': '<?= $this->params['session']->getLanguage() ?>'
}; };
function onselect() { function onselect() {

View File

@ -81,7 +81,7 @@ function checkForm()
$this->contentContainerStart(); $this->contentContainerStart();
if($document->expires()) if($document->expires())
$expdate = date('d-m-Y', $document->getExpires()); $expdate = date('Y-m-d', $document->getExpires());
else else
$expdate = ''; $expdate = '';
?> ?>
@ -123,7 +123,7 @@ function checkForm()
<tr> <tr>
<td><?php printMLText("expires");?>:</td> <td><?php printMLText("expires");?>:</td>
<td> <td>
<span class="input-append date span12" 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()); ?>"> <span class="input-append date span12" id="expirationdate" data-date="<?php echo $expdate; ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input class="span3" size="16" name="expdate" type="text" value="<?php echo $expdate; ?>"> <input class="span3" size="16" name="expdate" type="text" value="<?php echo $expdate; ?>">
<span class="add-on"><i class="icon-calendar"></i></span> <span class="add-on"><i class="icon-calendar"></i></span>
</span><br /> </span><br />

View File

@ -82,8 +82,8 @@ function checkForm()
<tr> <tr>
<td><?php printMLText("from");?>:</td> <td><?php printMLText("from");?>:</td>
<td><?php //$this->printDateChooser($event["start"], "from");?> <td><?php //$this->printDateChooser($event["start"], "from");?>
<span class="input-append date span12" id="fromdate" data-date="<?php echo date('d-m-Y', $event["start"]); ?>" data-date-format="dd-mm-yyyy"> <span class="input-append date span12" id="fromdate" data-date="<?php echo date('Y-m-d', $event["start"]); ?>" data-date-format="yyyy-mm-dd">
<input class="span6" size="16" name="from" type="text" value="<?php echo date('d-m-Y', $event["start"]); ?>"> <input class="span6" size="16" name="from" type="text" value="<?php echo date('Y-m-d', $event["start"]); ?>">
<span class="add-on"><i class="icon-calendar"></i></span> <span class="add-on"><i class="icon-calendar"></i></span>
</span> </span>
</td> </td>
@ -91,8 +91,8 @@ function checkForm()
<tr> <tr>
<td><?php printMLText("to");?>:</td> <td><?php printMLText("to");?>:</td>
<td><?php //$this->printDateChooser($event["stop"], "to");?> <td><?php //$this->printDateChooser($event["stop"], "to");?>
<span class="input-append date span12" id="todate" data-date="<?php echo date('d-m-Y', $event["stop"]); ?>" data-date-format="dd-mm-yyyy"> <span class="input-append date span12" id="todate" data-date="<?php echo date('Y-m-d', $event["stop"]); ?>" data-date-format="yyyy-mm-dd">
<input class="span6" size="16" name="to" type="text" value="<?php echo date('d-m-Y', $event["stop"]); ?>"> <input class="span6" size="16" name="to" type="text" value="<?php echo date('Y-m-d', $event["stop"]); ?>">
<span class="add-on"><i class="icon-calendar"></i></span> <span class="add-on"><i class="icon-calendar"></i></span>
</span> </span>
</td> </td>

View File

@ -164,13 +164,13 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
<label class="checkbox inline"> <label class="checkbox inline">
<input type="checkbox" name="creationdate" value="true" <?php if($creationdate) echo "checked"; ?>/><?php printMLText("between");?> <input type="checkbox" name="creationdate" value="true" <?php if($creationdate) echo "checked"; ?>/><?php printMLText("between");?>
</label><br /> </label><br />
<span class="input-append date" style="display: inline;" id="createstartdate" 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()); ?>"> <span class="input-append date" style="display: inline;" id="createstartdate" data-date="<?php echo date('Y-m-d'); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input class="span4" size="16" name="createstart" type="text" value="<?php if($startdate) printf("%02d-%02d-%04d", $startdate['day'], $startdate['month'], $startdate['year']); else echo date('d-m-Y'); ?>"> <input class="span4" size="16" name="createstart" type="text" value="<?php if($startdate) printf("%04d-%02d-%02d", $startdate['year'], $startdate['month'], $startdate['day']); else echo date('Y-m-d'); ?>">
<span class="add-on"><i class="icon-calendar"></i></span> <span class="add-on"><i class="icon-calendar"></i></span>
</span>&nbsp; </span>&nbsp;
<?php printMLText("and"); ?> <?php printMLText("and"); ?>
<span class="input-append date" style="display: inline;" id="createenddate" 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()); ?>"> <span class="input-append date" style="display: inline;" id="createenddate" data-date="<?php echo date('Y-m-d'); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input class="span4" size="16" name="createend" type="text" value="<?php if($stopdate) printf("%02d-%02d-%04d", $stopdate['day'], $stopdate['month'], $stopdate['year']); else echo date('d-m-Y'); ?>"> <input class="span4" size="16" name="createend" type="text" value="<?php if($stopdate) printf("%04d-%02d-%02d", $stopdate['year'], $stopdate['month'], $stopdate['day']); else echo date('Y-m-d'); ?>">
<span class="add-on"><i class="icon-calendar"></i></span> <span class="add-on"><i class="icon-calendar"></i></span>
</span> </span>
</td> </td>
@ -306,13 +306,13 @@ $(document).ready( function() {
<label class="checkbox inline"> <label class="checkbox inline">
<input type="checkbox" name="expirationdate" value="true" <?php if($expirationdate) echo "checked"; ?>/><?php printMLText("between");?> <input type="checkbox" name="expirationdate" value="true" <?php if($expirationdate) echo "checked"; ?>/><?php printMLText("between");?>
</label><br /> </label><br />
<span class="input-append date" style="display: inline;" id="expirationstartdate" 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()); ?>"> <span class="input-append date" style="display: inline;" id="expirationstartdate" data-date="<?php echo date('Y-m-d'); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input class="span4" size="16" name="expirationstart" type="text" value="<?php if($expstartdate) printf("%02d-%02d-%04d", $expstartdate['day'], $expstartdate['month'], $expstartdate['year']); else echo date('d-m-Y'); ?>"> <input class="span4" size="16" name="expirationstart" type="text" value="<?php if($expstartdate) printf("%04d-%02d-%02d", $expstartdate['year'], $expstartdate['month'], $expstartdate['day']); else echo date('Y-m-d'); ?>">
<span class="add-on"><i class="icon-calendar"></i></span> <span class="add-on"><i class="icon-calendar"></i></span>
</span>&nbsp; </span>&nbsp;
<?php printMLText("and"); ?> <?php printMLText("and"); ?>
<span class="input-append date" style="display: inline;" id="expirationenddate" 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()); ?>"> <span class="input-append date" style="display: inline;" id="expirationenddate" data-date="<?php echo date('Y-m-d'); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input class="span4" size="16" name="expirationend" type="text" value="<?php if($expstopdate) printf("%02d-%02d-%04d", $expstopdate['day'], $expstopdate['month'], $expstopdate['year']); else echo date('d-m-Y'); ?>"> <input class="span4" size="16" name="expirationend" type="text" value="<?php if($expstopdate) printf("%04d-%02d-%02d", $expstopdate['year'], $expstopdate['month'], $expstopdate['day']); else echo date('Y-m-d'); ?>">
<span class="add-on"><i class="icon-calendar"></i></span> <span class="add-on"><i class="icon-calendar"></i></span>
</span> </span>
</td> </td>

View File

@ -169,13 +169,13 @@ function checkForm()
<label class="checkbox inline"> <label class="checkbox inline">
<input type="checkbox" name="creationdate" value="true" /><?php printMLText("between");?><br> <input type="checkbox" name="creationdate" value="true" /><?php printMLText("between");?><br>
</label> </label>
<span class="input-append date" id="createstartdate" 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()); ?>"> <span class="input-append date" id="createstartdate" data-date="<?php echo date('Y-m-d'); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input class="span3" size="16" name="createstart" type="text" value="<?php echo date('d-m-Y'); ?>"> <input class="span3" size="16" name="createstart" type="text" value="<?php echo date('Y-m-d'); ?>">
<span class="add-on"><i class="icon-calendar"></i></span> <span class="add-on"><i class="icon-calendar"></i></span>
</span>&nbsp; </span>&nbsp;
<?php printMLText("and"); ?> <?php printMLText("and"); ?>
<span class="input-append date" id="createenddate" 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()); ?>"> <span class="input-append date" id="createenddate" data-date="<?php echo date('Y-m-d'); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input class="span3" size="16" name="createend" type="text" value="<?php echo date('d-m-Y'); ?>"> <input class="span3" size="16" name="createend" type="text" value="<?php echo date('Y-m-d'); ?>">
<span class="add-on"><i class="icon-calendar"></i></span> <span class="add-on"><i class="icon-calendar"></i></span>
</span> </span>
</td> </td>
@ -186,13 +186,13 @@ function checkForm()
<label class="checkbox inline"> <label class="checkbox inline">
<input type="checkbox" name="expirationdate" value="true" /><?php printMLText("between");?><br> <input type="checkbox" name="expirationdate" value="true" /><?php printMLText("between");?><br>
</label> </label>
<span class="input-append date" id="expirationstartdate" 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()); ?>"> <span class="input-append date" id="expirationstartdate" data-date="<?php echo date('Y-m-d'); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input class="span3" size="16" name="expirationstart" type="text" value="<?php echo date('d-m-Y'); ?>"> <input class="span3" size="16" name="expirationstart" type="text" value="<?php echo date('Y-m-d'); ?>">
<span class="add-on"><i class="icon-calendar"></i></span> <span class="add-on"><i class="icon-calendar"></i></span>
</span>&nbsp; </span>&nbsp;
<?php printMLText("and"); ?> <?php printMLText("and"); ?>
<span class="input-append date" id="expirationenddate" 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()); ?>"> <span class="input-append date" id="expirationenddate" data-date="<?php echo date('Y-m-d'); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input class="span3" size="16" name="expirationend" type="text" value="<?php echo date('d-m-Y'); ?>"> <input class="span3" size="16" name="expirationend" type="text" value="<?php echo date('Y-m-d'); ?>">
<span class="add-on"><i class="icon-calendar"></i></span> <span class="add-on"><i class="icon-calendar"></i></span>
</span> </span>
</td> </td>

View File

@ -45,7 +45,7 @@ class SeedDMS_View_SetExpires extends SeedDMS_Bootstrap_Style {
$this->contentContainerStart(); $this->contentContainerStart();
if($document->expires()) if($document->expires())
$expdate = date('d-m-Y', $document->getExpires()); $expdate = date('Y-m-d', $document->getExpires());
else else
$expdate = ''; $expdate = '';
?> ?>
@ -57,7 +57,7 @@ class SeedDMS_View_SetExpires extends SeedDMS_Bootstrap_Style {
<tr> <tr>
<td><?php printMLText("expires");?>:</td> <td><?php printMLText("expires");?>:</td>
<td> <td>
<span class="input-append date span12" id="expirationdate" data-date="<?php echo $expdate; ?>" data-date-format="dd-mm-yyyy" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>"> <span class="input-append date span12" id="expirationdate" data-date="<?php echo $expdate; ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input class="span6" name="expdate" type="text" value="<?php echo $expdate; ?>"> <input class="span6" name="expdate" type="text" value="<?php echo $expdate; ?>">
<span class="add-on"><i class="icon-calendar"></i></span> <span class="add-on"><i class="icon-calendar"></i></span>
</span><br /> </span><br />

View File

@ -189,8 +189,8 @@ function checkForm()
<tr> <tr>
<td><?php printMLText("expires");?>:</td> <td><?php printMLText("expires");?>:</td>
<td class="standardText"> <td class="standardText">
<span class="input-append date span12" id="expirationdate" data-date="<?php echo date('d-m-Y', $expts); ?>" data-date-format="dd-mm-yyyy" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>"> <span class="input-append date span12" id="expirationdate" data-date="<?php echo date('Y-m-d', $expts); ?>" data-date-format="yyyy-mm-dd" 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', $expts); ?>"> <input class="span3" size="16" name="expdate" type="text" value="<?php echo date('Y-m-d', $expts); ?>">
<span class="add-on"><i class="icon-calendar"></i></span> <span class="add-on"><i class="icon-calendar"></i></span>
</span><br /> </span><br />
<label class="checkbox inline"> <label class="checkbox inline">