summaryrefslogtreecommitdiff
path: root/bin/ir.pl
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ir.pl')
-rwxr-xr-xbin/ir.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/ir.pl b/bin/ir.pl
index d892cedd..37fa75fc 100755
--- a/bin/ir.pl
+++ b/bin/ir.pl
@@ -139,14 +139,15 @@ qq|<option value="$_->{projectnumber}--$_->{id}">$_->{projectnumber}\n|;
# departments
if ( @{ $form->{all_department} } ) {
$form->{selectdepartment} = "<option>\n";
- $form->{department} = "$form->{department}--$form->{department_id}"
- if $form->{department_id};
for ( @{ $form->{all_department} } ) {
$form->{selectdepartment} .=
qq|<option value="$_->{description}--$_->{id}">$_->{description}\n|;
}
}
+ $form->{department} = "$form->{department}--$myconfig{department_id}"
+ if $myconfig{department_id};
+
if ( @{ $form->{all_language} } ) {
$form->{selectlanguage} = "<option>\n";
@@ -273,7 +274,7 @@ sub form_header {
for (qw(vendor department)) {
$form->{"select$_"} = $form->unescape( $form->{"select$_"} );
$form->{"select$_"} =~ s/ selected//;
- $form->{"select$_"} =~ s/(<option value="\Q$form->{$_}\E")/$1 selected/;
+ $form->{"select$_"} =~ s/(<option value="[^"]*\Q$form->{$_}\E")/$1 selected/;
}
if ( $form->{selectlanguage} ) {