forked from virtualmin/virtualmin-registrar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_form.cgi
executable file
·34 lines (27 loc) · 942 Bytes
/
create_form.cgi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/local/bin/perl
# Show a form for creating a new registrar account
use strict;
no strict 'refs';
use warnings;
our (%access, %text, %in);
our $account;
require './virtualmin-registrar-lib.pl';
$access{'registrar'} || &error($text{'create_ecannot'});
&ReadParse();
&ui_print_header(undef, $text{'create_title'}, "", "create");
my $reg = $in{'registrar'};
print &ui_form_start("create.cgi", "post");
print &ui_hidden("registrar", $in{'registrar'});
print &ui_table_start($text{'create_header'}, undef, 2);
# Registrar type
my $dfunc = "type_".$reg."_desc";
print &ui_table_row($text{'edit_registrar'}, &$dfunc($account));
# Description
print &ui_table_row($text{'edit_desc'},
&ui_textbox("desc", $account->{'desc'}, 60));
# Registrar-specific inputs
my $cfunc = "type_".$reg."_create_inputs";
print &$cfunc();
print &ui_table_end();
print &ui_form_end([ [ undef, $text{'create'} ] ]);
&ui_print_footer("", $text{'index_return'});