diff options
author | Angelo Naselli <anaselli@linux.it> | 2014-07-03 22:00:14 +0200 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2014-07-03 22:00:14 +0200 |
commit | e9af6497a3ac181c7a8c6074513a389c7463109c (patch) | |
tree | dc92ed4c915c97f93bfcc2d9388e8bdd6da57371 | |
parent | 595fe5cc698aade027bac6edafaee93a758de486 (diff) | |
parent | e4219cd3279c896d85d5e7b52d25208153d8d4a8 (diff) | |
download | colin-keep-e9af6497a3ac181c7a8c6074513a389c7463109c.tar colin-keep-e9af6497a3ac181c7a8c6074513a389c7463109c.tar.gz colin-keep-e9af6497a3ac181c7a8c6074513a389c7463109c.tar.bz2 colin-keep-e9af6497a3ac181c7a8c6074513a389c7463109c.tar.xz colin-keep-e9af6497a3ac181c7a8c6074513a389c7463109c.zip |
Merge branch 'master' of ssh://git.mageia.org/software/adminpanel
-rw-r--r-- | lib/AdminPanel/Module/Proxy.pm | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/lib/AdminPanel/Module/Proxy.pm b/lib/AdminPanel/Module/Proxy.pm index 4e6b96e..98d3105 100644 --- a/lib/AdminPanel/Module/Proxy.pm +++ b/lib/AdminPanel/Module/Proxy.pm @@ -158,7 +158,6 @@ sub validate { sub _manageProxyDialog { my $self = shift; - my $httpsProxyEqualToHttpProxy = 0; ## TODO fix for adminpanel my $appTitle = yui::YUI::app()->applicationTitle(); my $appIcon = yui::YUI::app()->applicationIcon(); @@ -173,18 +172,19 @@ sub _manageProxyDialog { my $inputfield_width = 45; # getVarsFromSh returns an empty hash if no vars are defined my $proxy_curr_settings = { getVarsFromSh('/etc/profile.d/proxy.sh') }; + my $httpsProxyEqualToHttpProxy = 1 if(($proxy_curr_settings->{http_proxy} eq $proxy_curr_settings->{https_proxy})&&($proxy_curr_settings->{http_proxy} ne "")); # # @layout # - # +--------------------------------+ - # | HEADER | - # |--------------------------------+ - # | CONTENT | - # |--------------------------------+ - # | OTHER OPTIONS | - # | | - # +--------------------------------+ + # +------------------------------+ + # | +------------+-------------+ | + # | |LABELS | VALUES | | + # | | | | | + # | | | | | + # | | | | | + # | +------------+-------------+ | + # +------------------------------+ $self->dialog($factory->createMainDialog()); my $layout = $factory->createVBox($self->dialog); @@ -214,7 +214,8 @@ sub _manageProxyDialog { $http_proxy->setWeight($yui::YD_HORIZ, 30); # flag to setup the https proxy with the same value of the http proxy - $factory->createCheckBox($vbox_labels_flags, "Use HTTP proxy for HTTPS connections",$httpsProxyEqualToHttpProxy); + my $ckbHttpEqHttps = $factory->createCheckBox($vbox_labels_flags, "Use HTTP proxy for HTTPS connections",$httpsProxyEqualToHttpProxy); + $ckbHttpEqHttps->setNotify(1); # add a spacing as we have $factory->createLabel($factory->createHBox($vbox_inputfields)," "); @@ -288,6 +289,8 @@ sub _manageProxyDialog { } # validation failed next; + }elsif ($widget == $ckbHttpEqHttps){ + $https_proxy->setEnabled(!$ckbHttpEqHttps->isChecked()); } } } |