use strict; use Pos::Webtop::Toolbox (); use Pos::Policy::LayeredBurrito (); use Pos::Webtop::Web::ContentModule::UserPrefs::PrefModule (); # derived class package Pos::Webtop::Web::ContentModule::UserPrefs::PrefModule::IntranetAccessMethod; my $className = "Pos::Webtop::Web::ContentModule::UserPrefs::PrefModule::IntranetAccessMethod"; our @ISA = qw( Pos::Webtop::Web::ContentModule::UserPrefs::PrefModule ); sub new { my $this = shift; my $class = ref($this) || $this; my ($self) = @{{@_}}{qw/self/}; if ( not defined $self ) { $self = {}; bless($self,$class); } my %args = @_; $args{'self'} = $self; Pos::Webtop::Web::ContentModule::UserPrefs::PrefModule->new( %args ); $self->setPreferenceName( preferenceName=> "Intranet Access Method" ); $self->setPolicyTypeId( policyTypeId=> 521 ); return $self; } sub getEmbeddedHtml { my $self = shift; my $tb = $self->getToolBox(); my $client = $tb->getClient(); my $cgi = $tb->getCgi(); my $pdb = $tb->getPolicyDb(); my $dbr = $tb->getWebtopDbReader(); my $value = 'Standard'; my $policyValues = $self->getPolicyValues(); foreach my $val ( @{ $policyValues } ) { $value = $val->{'policyValue'}; last; } my $ret = ""; $ret .= $self->getEmbeddedHeader(); my $action = $cgi->param('action'); if (not defined($action)) { $action = ''; } if ($action eq 'save') { my $cancel = $cgi->param('cancel'); if (defined($cancel)) { $self->setDone(); return ""; } else { my $method = $cgi->param('method'); if ($method eq 'Standard') { $self->setPolicyValues( values => [ { type => "DEFAULT", value => 'Standard' } ]); } elsif ($method eq 'Enhanced') { $self->setPolicyValues( values => [ { type => "DEFAULT", value => 'Enhanced' } ]); } else { $self->setPolicyValues( values => [ { type => "DEFAULT", value => 'Compatible' } ]); } $self->setDone(); return ""; } } else { $ret .= "
Standard Uses Internet Explorer ActiveX technology to provide a full-featured browsing experience along with Remote Desktop and Standard Application Tunnels. If Internet Explorer is unavailable, the user will automatically roll over to the Compatible method. (default)
Enhanced Includes all of the Standard functionality, plus it enables access to the most complex web sites, such as those with Java, as well as many client/server applications with Dynamic Application Tunnels. Enhanced Mode is also available on Safari Mac with Java.
Compatible Allows access only to file shares, simple web sites, and web-based email, but is fully compatible with virtually any web browser.

Note: You must sign off and sign back on for the newly selected Intranet Access Method to take effect.

 
" . $client->getFormInputs(values => [ { name => 'action', value => '' } ]) . "
"; } $ret .= $self->getEmbeddedFooter(); return $ret; } sub getPreviewText { my $self = shift; my $policyValues = $self->getPolicyValues(); my $value = ""; my $tb = $self->getToolBox(); my $client = $tb->getClient(); my @info; foreach my $val ( @{ $policyValues } ) { $value = $val->{'policyValue'}; last; } if ($value eq '' or $value eq 'Standard') { push @info, "Standard"; } elsif ($value eq 'Enhanced') { push @info, "Enhanced"; } else { push @info, "Compatible"; } return join(", ", @info); } 1;