1 # display args for pam_mail.so.pl
3 # display_args(&service, &module, &args)
4 sub display_module_args
6 print &ui_table_row($text{'mail_nopen'},
7 &ui_radio("noopen", defined($_[2]->{'nopen'}) ? 1 : 0,
8 [ [ 0, $text{'yes'} ], [ 1, $text{'no'} ] ]));
10 print &ui_table_row($text{'mail_close'},
11 &ui_radio("noopen", defined($_[2]->{'close'}) ? 1 : 0,
12 [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]));
14 print &ui_table_row($text{'mail_empty'},
15 &ui_radio("noopen", defined($_[2]->{'empty'}) ? 1 : 0,
16 [ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]));
18 print &ui_table_row($text{'mail_noenv'},
19 &ui_radio("noopen", defined($_[2]->{'noenv'}) ? 1 : 0,
20 [ [ 0, $text{'yes'} ], [ 1, $text{'no'} ] ]));
22 print &ui_table_row($text{'mail_dir'},
23 &ui_opt_textbox("dir", $_[2]->{'dir'}, 50, $text{'default'})." ".
24 &file_chooser_button("dir"), 3);
27 # parse_module_args(&service, &module, &args)
30 if ($in{'nopen'}) { $_[2]->{'nopen'} = ''; }
31 else { delete($_[2]->{'nopen'}); }
33 if ($in{'close'}) { $_[2]->{'close'} = ''; }
34 else { delete($_[2]->{'close'}); }
36 if ($in{'empty'}) { $_[2]->{'empty'} = ''; }
37 else { delete($_[2]->{'empty'}); }
39 if ($in{'noenv'}) { $_[2]->{'noenv'} = ''; }
40 else { delete($_[2]->{'noenv'}); }
42 if ($in{'dir_def'}) { delete($_[2]->{'dir'}); }
44 -d $in{'dir'} || &error($text{'mail_edir'});
45 $_[2]->{'dir'} = $in{'dir'};