aboutsummaryrefslogtreecommitdiff
path: root/lib/models/resources
diff options
context:
space:
mode:
authorMoritz Strohm <strohm@data-quest.de>2023-11-23 15:19:10 +0000
committerMoritz Strohm <strohm@data-quest.de>2023-11-23 15:19:10 +0000
commit9cbde5e91c0061cd8893a563abd02f258688f4f8 (patch)
treea57f1e126f61c0ede8ce14d50d9b64946ca425a4 /lib/models/resources
parent54e6a1d0caf1474544fe789ed401f55cbc3cc5b3 (diff)
allow unsetting assigned persons for resource properties of type "user" re #988
Merge request studip/studip!2020
Diffstat (limited to 'lib/models/resources')
-rw-r--r--lib/models/resources/ResourcePropertyDefinition.class.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/models/resources/ResourcePropertyDefinition.class.php b/lib/models/resources/ResourcePropertyDefinition.class.php
index 3525e41..04c4924 100644
--- a/lib/models/resources/ResourcePropertyDefinition.class.php
+++ b/lib/models/resources/ResourcePropertyDefinition.class.php
@@ -244,14 +244,23 @@ class ResourcePropertyDefinition extends SimpleORMap
$search = new QuickSearch($input_name, new StandardSearch('user_id'));
$search->defaultValue($value, ($value ? get_fullname($value, 'full_rev_username') : ''));
return sprintf(
- '<label %1$s>%2$s%3$s</label>',
+ '<label %1$s>%2$s<div class="assigned-user-search-wrapper flex-row">%3$s%4$s</div></label>',
(
$label_html_classes
? 'class="' . htmlReady($label_html_classes) . '"'
: ''
),
$this->__toString(),
- $search->render()
+ $search->render(),
+ Icon::create('refresh')->asImg(
+ [
+ 'class' => 'delete-assigned-user-icon enter-accessible',
+ 'data-input-name' => $input_name,
+ 'title' => _('Zuorndung entfernen'),
+ 'tabindex' => '0',
+ 'aria-role' => 'button'
+ ]
+ )
);
} else {
$input_type = 'text';