Skip to content
Permalink
Browse files

Fix for #189: Double-click to add event was not working in assistant …

…mode.
  • Loading branch information
craigk5n committed Feb 28, 2020
1 parent 933dec4 commit 4ae5d84cc00cfe1a15bfec407cba0cfa7d3b84de
Showing with 15 additions and 16 deletions.
  1. +15 −16 edit_entry.php
@@ -415,10 +415,13 @@ function time_selection ( $prefix, $time = '', $trigger = false ) {
else
$hour = $time = -1;

$defusers = getGetValue('defusers');
$defusers_ar = array ();
if ( ! empty ( $defusers ) ) {
$tmp_ar = explode ( ',', $defusers );
for ( $i = 0, $cnt = count ( $tmp_ar ); $i < $cnt; $i++ ) {
$participants[$tmp_ar[$i]] = 1;
$defusers_ar = explode ( ',', $defusers );
for ( $i = 0, $cnt = count ( $defusers_ar ); $i < $cnt; $i++ ) {
$participants[$defusers_ar[$i]] = 1;
echo "adding $defusers_ar[$i] to participants <br>";
}
}

@@ -1023,20 +1026,16 @@ function time_selection ( $prefix, $time = '', $trigger = false ) {
. $f . $q . '</option>';
}
} else {
if ( ! empty ( $defusers ) && ! empty ( $userlist[$l] ) ) {
// Default selection of participants was in the URL.
$myusers .= '
<option value="' . $l . '">'
. $f . $q . '</option>';
}

if ( ! empty ( $user ) && ! empty ( $userlist[$l] ) ) {
// Default selection of participants was in the URL.
$myusers .= '
<option value="' . $l . '">'
if ( empty ( $defusers ) && ! empty ( $user ) && ! empty ( $userlist[$l] ) ) {
// Default selection of participants was in the URL as 'user=XXX'
$myusers .= '<option value="' . $l . '">'
. $f . $q . '</option>';
}
if ( ( $l == $login && ! $is_assistant && ! $is_nonuser_admin ) ||
} else if ( ! empty ( $defusers ) ) {
// Default selection of participants was in the URL as 'defusers=user1,user2'
if ( ! empty ( $participants[$l] ) )
$myusers .= '<option value="' . $l . '">'
. $f . $q . '</option>';
} else if ( ( $l == $login && ! $is_assistant && ! $is_nonuser_admin ) ||
( ! empty ( $user ) && $l == $user ) )
// Default selection of participants is logged in user.
$myusers .= ' <option value="' . $l . '">' . $f . '</option>';

0 comments on commit 4ae5d84

Please sign in to comment.
You can’t perform that action at this time.