+ $nas ||= $nas_export->default_nas;
+ $svc_x->set($_, $nas->$_) foreach fields('nas');
+
+ # duplicates the fields in httemplate/edit/nas.html (mostly)
+ push @$fields,
+ { type => 'tablebreak-tr-title',
+ #value => 'Attached NAS',
+ value => $nas_export->exportname,
+ colspan => 2,
+ },
+ { field=>'nasnum', type=>'hidden', },
+ { field=>'shortname', size=>16, maxlength=>32 },
+ { field=>'secret', size=>40, maxlength=>60, required=>1 },
+ { field=>'type', type=>'select',
+ options=>[qw( cisco computone livingston max40xx multitech netserver
+ pathras patton portslave tc usrhiper other )],
+ },
+ { field=>'ports', size=>5 },
+ { field=>'server', size=>40, maxlength=>64 },
+ { field=>'community', size=>40, maxlength=>50 },
+ ;
+
+ $opt->{'labels'}{'shortname'} = 'Short name';
+ $opt->{'labels'}{'secret'} = 'Shared secret';
+ $opt->{'labels'}{'type'} = 'Type';
+ $opt->{'labels'}{'ports'} = 'Ports';
+ $opt->{'labels'}{'server'} = 'Server';
+ $opt->{'labels'}{'community'} = 'Community';
+ }
+};