aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichaela Brückner <brueckner@data-quest.de>2023-05-25 14:05:36 +0000
committerDavid Siegfried <david.siegfried@uni-vechta.de>2023-05-25 14:05:36 +0000
commit04ad36e3a9845a401d95d35880deda5ea390e9dd (patch)
treea7db552eb2883ec973575ffb535f9b99deb1cf73 /lib
parent6254b44ac006c19bc571d3c411784fef6829a9aa (diff)
closes #1327biest-1310
Closes #1327 Merge request studip/studip!1147
Diffstat (limited to 'lib')
-rw-r--r--lib/models/resources/ResourcePropertyDefinition.class.php23
-rw-r--r--lib/modules/CoreAdmin.class.php7
2 files changed, 14 insertions, 16 deletions
diff --git a/lib/models/resources/ResourcePropertyDefinition.class.php b/lib/models/resources/ResourcePropertyDefinition.class.php
index 37fa89b..c3a84d6 100644
--- a/lib/models/resources/ResourcePropertyDefinition.class.php
+++ b/lib/models/resources/ResourcePropertyDefinition.class.php
@@ -140,7 +140,8 @@ class ResourcePropertyDefinition extends SimpleORMap
$value = '',
$special_name = '',
$with_label = false,
- $allow_boolean_false = true
+ $allow_boolean_false = true,
+ $disabled = false
)
{
$label_html_classes = '';
@@ -155,16 +156,18 @@ class ResourcePropertyDefinition extends SimpleORMap
//whether a false state shall be selectable or not.
if ($allow_boolean_false) {
$input_html = sprintf(
- '<input type="hidden" name="%1$s" value="0" %2$s>'
+ '<input type="hidden" name="%1$s" value="0" %2$s %3$s>'
. '<input type="checkbox" name="%1$s" value="1" %2$s>',
htmlReady($input_name),
- $value ? 'checked="checked"' : ''
+ $value ? 'checked' : '',
+ $disabled ? 'disabled' : ''
);
} else {
$input_html = sprintf(
- '<input type="checkbox" name="%1$s" value="1" %2$s>',
+ '<input type="checkbox" name="%1$s" value="1" %2$s %3$s>',
htmlReady($input_name),
- $value ? 'checked="checked"' : ''
+ $value ? 'checked' : '',
+ $disabled ? 'disabled' : ''
);
}
if ($with_label) {
@@ -254,7 +257,7 @@ class ResourcePropertyDefinition extends SimpleORMap
}
if ($with_label) {
return sprintf(
- '<label %1$s>%5$s<input type="%2$s" name="%3$s" value="%4$s"></label>',
+ '<label %1$s>%5$s<input type="%2$s" name="%3$s" value="%4$s" %5$s></label>',
(
$label_html_classes
? 'class="' . htmlReady($label_html_classes) . '"'
@@ -263,14 +266,16 @@ class ResourcePropertyDefinition extends SimpleORMap
$input_type,
htmlReady($input_name),
$value,
- htmlReady($this->__toString())
+ htmlReady($this->__toString()),
+ $disabled ? 'disabled' : ''
);
} else {
return sprintf(
- '<input type="%1$s" name="%2$s" value="%3$s">',
+ '<input type="%1$s" name="%2$s" value="%3$s" %4$s>',
$input_type,
htmlReady($input_name),
- $value
+ $value,
+ $disabled ? 'disabled' : ''
);
}
}
diff --git a/lib/modules/CoreAdmin.class.php b/lib/modules/CoreAdmin.class.php
index b02cf93..ada2af0 100644
--- a/lib/modules/CoreAdmin.class.php
+++ b/lib/modules/CoreAdmin.class.php
@@ -63,13 +63,6 @@ class CoreAdmin extends CorePlugin implements StudipModule
$item->setDescription(_('Regelmäßige Veranstaltungszeiten, Einzeltermine und Ortsangaben ändern.'));
$navigation->addSubNavigation('dates', $item);
- if (Config::get()->RESOURCES_ENABLE && Config::get()->RESOURCES_ALLOW_ROOM_REQUESTS) {
- $item = new Navigation(_('Raumanfragen'), 'dispatch.php/course/room_requests/index/' . $course_id);
- $item->setImage(Icon::create('resources'));
- $item->setDescription(_('Raumanfragen zu Veranstaltungszeiten verwalten.'));
- $navigation->addSubNavigation('room_requests', $item);
- }
-
$item = new Navigation(_('Zugangsberechtigungen'), 'dispatch.php/course/admission');
$item->setImage(Icon::create('lock-locked'));
$item->setDescription(_('Zugangsbeschränkungen, Anmeldeverfahren oder einen Passwortschutz für diese Veranstaltung einrichten.'));