Subversion Repositories VORC

Rev

Rev 245 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 245 Rev 252
Line 27... Line 27...
27
my $change = param ('change');
27
my $change = param ('change');
28
my $RCid   = param ('RCid') // $user->{RCid};
28
my $RCid   = param ('RCid') // $user->{RCid};
29
my $id     = param ('id');
29
my $id     = param ('id');
30
my $role   = param ('role') // "";
30
my $role   = param ('role') // "";
31
my $noshow = param ('noshow');
31
my $noshow = param ('noshow');
32
my $department = ($id =~ /^\d+$/) ? getShiftDepartment ($role ? $id."-".$role : $id) : "CLA";
32
my $department = ($id =~ /^\d+$/) ? getShiftDepartment ($role ? $id."-".$role : $id) : ($id =~ /^SEM/) ? "SEM" : "CLA";
Line 33... Line 33...
33
 
33
 
Line 34... Line 34...
34
print start_html (-title => "vORC Make Shift Change", -style => {'src' => "/style.css"}), $h->open ("body");
34
print start_html (-title => "vORC Make Shift Change", -style => {'src' => "/style.css"}), $h->open ("body");
Line 47... Line 47...
47
    
47
    
48
  print $WARNING, $h->form ({ action=>url }, [
48
  print $WARNING, $h->form ({ action=>url }, [
49
    $h->input ({ type=>"hidden", name=>"change", value=>"add" }),
49
    $h->input ({ type=>"hidden", name=>"change", value=>"add" }),
50
    $h->input ({ type=>"hidden", name=>"id", value=>$id }),
50
    $h->input ({ type=>"hidden", name=>"id", value=>$id }),
51
    $h->input ({ type=>"hidden", name=>"role", value=>$role }),
51
    $h->input ({ type=>"hidden", name=>"role", value=>$role }),
52
    $department eq "CLA" ? $h->p ("Add User to Class ($id):") : $h->p ("Add User to Shift ($id):"),
52
    $department eq "CLA" ? $h->p ("Add User to Class ($id):") : ($department eq "SEM") ? $h->p ("Add User to Seminar ($id):") : $h->p ("Add User to Shift ($id):"),
53
    $h->input ({ name => "RCid-picker", id=>"pickname", list => "eligibleusers" }).$h->tag ("datalist", { id => "eligibleusers" }, [$options]),
53
    $h->input ({ name => "RCid-picker", id=>"pickname", list => "eligibleusers" }).$h->tag ("datalist", { id => "eligibleusers" }, [$options]),
54
    $h->input ({ type=>"hidden", name=>"RCid", id=>"pickname-hidden" }),
54
    $h->input ({ type=>"hidden", name=>"RCid", id=>"pickname-hidden" }),
55
    $h->input ({ type=>"submit", value=>"Save", onClick=>"if (isInt(document.getElementById('pickname').value)) { return false } else { return isInt(document.getElementById('pickname-hidden').value) };" }),
55
    $h->input ({ type=>"submit", value=>"Save", onClick=>"if (isInt(document.getElementById('pickname').value)) { return false } else { return isInt(document.getElementById('pickname-hidden').value) };" }),
56
    $h->button ({ onClick=>"window.close();" }, "Cancel")
56
    $h->button ({ onClick=>"window.close();" }, "Cancel")