From f6fbcbadfa78fb8dcc1ee52dbf165d916e4d5141 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 17:35:24 +0200 Subject: [PATCH 1/5] do not show message anymore, if keyword list is empty --- views/bootstrap/class.KeywordChooser.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/views/bootstrap/class.KeywordChooser.php b/views/bootstrap/class.KeywordChooser.php index e73199984..bf0f5d888 100644 --- a/views/bootstrap/class.KeywordChooser.php +++ b/views/bootstrap/class.KeywordChooser.php @@ -142,8 +142,7 @@ myTA.focus(); $owner = $category->getOwner(); if($owner->isAdmin()) { $lists = $category->getKeywordLists(); - if(count($lists) == 0) print getMLText("no_default_keywords"); - else { + if(count($lists)) { $kw = array(); foreach ($lists as $list) { $kw[] = "".htmlspecialchars($list["keywords"]).""; @@ -180,8 +179,7 @@ myTA.focus(); $owner = $category->getOwner(); if(!$owner->isAdmin()) { $lists = $category->getKeywordLists(); - if(count($lists) == 0) print getMLText("no_default_keywords"); - else { + if(count($lists)) { $kw = array(); foreach ($lists as $list) { $kw[] = "".htmlspecialchars($list["keywords"]).""; From 585fa964d576fb6cf2529ed6ab2c4952bb5eb114 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 17:41:21 +0200 Subject: [PATCH 2/5] add class 'form-control' to some select tags --- views/bootstrap4/class.Bootstrap4.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index cd9b50caf..d8209cf9a 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -1780,7 +1780,7 @@ $(document).ready(function() { if($users) { $allowempty = $attrdef->getMinValues() == 0; $allowmultiple = $attrdef->getMultipleValues(); - $content .= "getId()."]".($allowmultiple ? '[]' : '')."\"".($allowmultiple ? " multiple" : "")." data-placeholder=\"".getMLText("select_user")."\">"; if($allowempty) $content .= ""; foreach($users as $curuser) { @@ -1800,7 +1800,7 @@ $(document).ready(function() { if($groups) { $allowempty = $attrdef->getMinValues() == 0; $allowmultiple = $attrdef->getMultipleValues(); - $content .= "getId()."]".($allowmultiple ? '[]' : '')."\"".($allowmultiple ? " multiple" : "")." data-placeholder=\"".getMLText("select_group")."\">"; if($allowempty) $content .= ""; foreach($groups as $curgroup) { @@ -1823,7 +1823,7 @@ $(document).ready(function() { } else { $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()) { $content .= ""; } From b5116e3c1b06e4ce914b377e442dfef4affefcf5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 17:49:36 +0200 Subject: [PATCH 3/5] place submit button outside of contentContainer --- views/bootstrap/class.AddEvent.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.AddEvent.php b/views/bootstrap/class.AddEvent.php index eb7cdebab..b013885d7 100644 --- a/views/bootstrap/class.AddEvent.php +++ b/views/bootstrap/class.AddEvent.php @@ -78,7 +78,6 @@ $(document).ready(function() { $this->pageNavigation("", "calendar"); $this->contentHeading(getMLText("add_event")); - $this->contentContainerStart(); $expdate = getReadableDate(); ?> @@ -87,6 +86,7 @@ $(document).ready(function() { contentContainerStart(); $this->formField( getMLText("from"), $this->getDateChooser($expdate, "from", $this->params['session']->getLanguage()) @@ -114,13 +114,13 @@ $(document).ready(function() { 'cols'=>80 ) ); + $this->contentContainerEnd(); $this->formSubmit(getMLText('add_event')); ?> contentContainerEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ From 073ba8281ccdcf16f86abdac5a7305722e3f4478 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 17:50:18 +0200 Subject: [PATCH 4/5] place submit button outside of contentContainer --- views/bootstrap/class.Calendar.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Calendar.php b/views/bootstrap/class.Calendar.php index ef364f11d..d59f8d1b8 100644 --- a/views/bootstrap/class.Calendar.php +++ b/views/bootstrap/class.Calendar.php @@ -65,13 +65,13 @@ class SeedDMS_View_Calendar extends SeedDMS_Theme_Style { if($event) { // print_r($event); $this->contentHeading(getMLText('edit_event')); - $this->contentContainerStart(); ?>
"> contentContainerStart(); $this->formField( getMLText("from"), $this->getDateChooser(getReadableDate($event["start"]), "from") @@ -100,11 +100,11 @@ class SeedDMS_View_Calendar extends SeedDMS_Theme_Style { 'required'=>$strictformcheck ) ); + $this->contentContainerEnd(); $this->formSubmit(" ".getMLText('save')); ?>
contentContainerEnd(); $this->contentHeading(getMLText('rm_event')); $this->contentContainerStart(); ?> From 22882e2634adbcc3bc76645958f9e7b46b62e688 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 May 2021 17:50:36 +0200 Subject: [PATCH 5/5] pass access object to view --- out/out.AddEvent.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/out/out.AddEvent.php b/out/out.AddEvent.php index 8f8f0d6d9..3f81697bb 100644 --- a/out/out.AddEvent.php +++ b/out/out.AddEvent.php @@ -25,6 +25,7 @@ require_once("inc/inc.Init.php"); require_once("inc/inc.Extension.php"); require_once("inc/inc.DBInit.php"); require_once("inc/inc.ClassUI.php"); +require_once("inc/inc.ClassAccessOperation.php"); require_once("inc/inc.Authentication.php"); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); @@ -34,6 +35,8 @@ if ($user->isGuest()) { UI::exitError(getMLText("edit_event"),getMLText("access_denied")); } +$accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings); + if($view) { $view->setParam('accessobject', $accessop); $view->setParam('strictformcheck', $settings->_strictFormCheck);