Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2021-05-04 17:52:59 +02:00
commit d7a935b276
5 changed files with 12 additions and 11 deletions

View File

@ -25,6 +25,7 @@ require_once("inc/inc.Init.php");
require_once("inc/inc.Extension.php"); require_once("inc/inc.Extension.php");
require_once("inc/inc.DBInit.php"); require_once("inc/inc.DBInit.php");
require_once("inc/inc.ClassUI.php"); require_once("inc/inc.ClassUI.php");
require_once("inc/inc.ClassAccessOperation.php");
require_once("inc/inc.Authentication.php"); require_once("inc/inc.Authentication.php");
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
@ -38,6 +39,8 @@ if ($user->isGuest()) {
UI::exitError(getMLText("edit_event"),getMLText("access_denied")); UI::exitError(getMLText("edit_event"),getMLText("access_denied"));
} }
$accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings);
if($view) { if($view) {
$view->setParam('accessobject', $accessop); $view->setParam('accessobject', $accessop);
$view->setParam('strictformcheck', $settings->_strictFormCheck); $view->setParam('strictformcheck', $settings->_strictFormCheck);

View File

@ -78,7 +78,6 @@ $(document).ready(function() {
$this->pageNavigation("", "calendar"); $this->pageNavigation("", "calendar");
$this->contentHeading(getMLText("add_event")); $this->contentHeading(getMLText("add_event"));
$this->contentContainerStart();
$expdate = getReadableDate(); $expdate = getReadableDate();
?> ?>
@ -87,6 +86,7 @@ $(document).ready(function() {
<?php echo createHiddenFieldWithKey('addevent'); ?> <?php echo createHiddenFieldWithKey('addevent'); ?>
<?php <?php
$this->contentContainerStart();
$this->formField( $this->formField(
getMLText("from"), getMLText("from"),
$this->getDateChooser($expdate, "from", $this->params['session']->getLanguage()) $this->getDateChooser($expdate, "from", $this->params['session']->getLanguage())
@ -114,13 +114,13 @@ $(document).ready(function() {
'cols'=>80 'cols'=>80
) )
); );
$this->contentContainerEnd();
$this->formSubmit(getMLText('add_event')); $this->formSubmit(getMLText('add_event'));
?> ?>
</form> </form>
<?php <?php
$this->contentContainerEnd();
$this->contentEnd(); $this->contentEnd();
$this->htmlEndPage(); $this->htmlEndPage();
} /* }}} */ } /* }}} */

View File

@ -65,13 +65,13 @@ class SeedDMS_View_Calendar extends SeedDMS_Theme_Style {
if($event) { if($event) {
// print_r($event); // print_r($event);
$this->contentHeading(getMLText('edit_event')); $this->contentHeading(getMLText('edit_event'));
$this->contentContainerStart();
?> ?>
<form class="form-horizontal" action="../op/op.EditEvent.php" id="form1" name="form1" method="post"> <form class="form-horizontal" action="../op/op.EditEvent.php" id="form1" name="form1" method="post">
<?php echo createHiddenFieldWithKey('editevent'); ?> <?php echo createHiddenFieldWithKey('editevent'); ?>
<input type="hidden" name="eventid" value="<?php echo (int) $event["id"]; ?>"> <input type="hidden" name="eventid" value="<?php echo (int) $event["id"]; ?>">
<?php <?php
$this->contentContainerStart();
$this->formField( $this->formField(
getMLText("from"), getMLText("from"),
$this->getDateChooser(getReadableDate($event["start"]), "from") $this->getDateChooser(getReadableDate($event["start"]), "from")
@ -100,11 +100,11 @@ class SeedDMS_View_Calendar extends SeedDMS_Theme_Style {
'required'=>$strictformcheck 'required'=>$strictformcheck
) )
); );
$this->contentContainerEnd();
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('save')); $this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('save'));
?> ?>
</form> </form>
<?php <?php
$this->contentContainerEnd();
$this->contentHeading(getMLText('rm_event')); $this->contentHeading(getMLText('rm_event'));
$this->contentContainerStart(); $this->contentContainerStart();
?> ?>

View File

@ -142,8 +142,7 @@ myTA.focus();
$owner = $category->getOwner(); $owner = $category->getOwner();
if($owner->isAdmin()) { if($owner->isAdmin()) {
$lists = $category->getKeywordLists(); $lists = $category->getKeywordLists();
if(count($lists) == 0) print getMLText("no_default_keywords"); if(count($lists)) {
else {
$kw = array(); $kw = array();
foreach ($lists as $list) { foreach ($lists as $list) {
$kw[] = "<a class=\"insertkeyword\" keyword=\"".htmlspecialchars($list["keywords"])."\"><span class=\"badge badge-secondary\">".htmlspecialchars($list["keywords"])."</span></a>"; $kw[] = "<a class=\"insertkeyword\" keyword=\"".htmlspecialchars($list["keywords"])."\"><span class=\"badge badge-secondary\">".htmlspecialchars($list["keywords"])."</span></a>";
@ -180,8 +179,7 @@ myTA.focus();
$owner = $category->getOwner(); $owner = $category->getOwner();
if(!$owner->isAdmin()) { if(!$owner->isAdmin()) {
$lists = $category->getKeywordLists(); $lists = $category->getKeywordLists();
if(count($lists) == 0) print getMLText("no_default_keywords"); if(count($lists)) {
else {
$kw = array(); $kw = array();
foreach ($lists as $list) { foreach ($lists as $list) {
$kw[] = "<a class=\"insertkeyword\" keyword=\"".htmlspecialchars($list["keywords"])."\"><span class=\"badge badge-secondary\">".htmlspecialchars($list["keywords"])."</span></a>"; $kw[] = "<a class=\"insertkeyword\" keyword=\"".htmlspecialchars($list["keywords"])."\"><span class=\"badge badge-secondary\">".htmlspecialchars($list["keywords"])."</span></a>";

View File

@ -1819,7 +1819,7 @@ $(document).ready(function() {
if($users) { if($users) {
$allowempty = $attrdef->getMinValues() == 0; $allowempty = $attrdef->getMinValues() == 0;
$allowmultiple = $attrdef->getMultipleValues(); $allowmultiple = $attrdef->getMultipleValues();
$content .= "<select class=\"chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"".$fieldname."[".$attrdef->getId()."]".($allowmultiple ? '[]' : '')."\"".($allowmultiple ? " multiple" : "")." data-placeholder=\"".getMLText("select_user")."\">"; $content .= "<select class=\"form-control chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"".$fieldname."[".$attrdef->getId()."]".($allowmultiple ? '[]' : '')."\"".($allowmultiple ? " multiple" : "")." data-placeholder=\"".getMLText("select_user")."\">";
if($allowempty) if($allowempty)
$content .= "<option value=\"\"></option>"; $content .= "<option value=\"\"></option>";
foreach($users as $curuser) { foreach($users as $curuser) {
@ -1839,7 +1839,7 @@ $(document).ready(function() {
if($groups) { if($groups) {
$allowempty = $attrdef->getMinValues() == 0; $allowempty = $attrdef->getMinValues() == 0;
$allowmultiple = $attrdef->getMultipleValues(); $allowmultiple = $attrdef->getMultipleValues();
$content .= "<select class=\"chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"".$fieldname."[".$attrdef->getId()."]".($allowmultiple ? '[]' : '')."\"".($allowmultiple ? " multiple" : "")." data-placeholder=\"".getMLText("select_group")."\">"; $content .= "<select class=\"form-control chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"".$fieldname."[".$attrdef->getId()."]".($allowmultiple ? '[]' : '')."\"".($allowmultiple ? " multiple" : "")." data-placeholder=\"".getMLText("select_group")."\">";
if($allowempty) if($allowempty)
$content .= "<option value=\"\"></option>"; $content .= "<option value=\"\"></option>";
foreach($groups as $curgroup) { foreach($groups as $curgroup) {
@ -1862,7 +1862,7 @@ $(document).ready(function() {
} else { } else {
$content .= "\" data-allow-clear=\"true\""; $content .= "\" data-allow-clear=\"true\"";
} }
$content .= "".((!$norequire && $attrdef->getMinValues() > 0) ? ' required' : '')." class=\"chzn-select\" data-placeholder=\"".getMLText("select_value")."\">"; $content .= "".((!$norequire && $attrdef->getMinValues() > 0) ? ' required' : '')." class=\"form-control chzn-select\" data-placeholder=\"".getMLText("select_value")."\">";
if(!$attrdef->getMultipleValues()) { if(!$attrdef->getMultipleValues()) {
$content .= "<option value=\"\"></option>"; $content .= "<option value=\"\"></option>";
} }