aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AdminPanel/Module
diff options
context:
space:
mode:
authormatteo <matteo.pasotti@gmail.com>2014-07-03 21:32:56 +0300
committermatteo <matteo.pasotti@gmail.com>2014-07-03 21:32:56 +0300
commite4219cd3279c896d85d5e7b52d25208153d8d4a8 (patch)
tree5f55544607c9831077e34791710801476e131e83 /lib/AdminPanel/Module
parentaf11621493db7a32c9177762709d88877af93c87 (diff)
downloadcolin-keep-e4219cd3279c896d85d5e7b52d25208153d8d4a8.tar
colin-keep-e4219cd3279c896d85d5e7b52d25208153d8d4a8.tar.gz
colin-keep-e4219cd3279c896d85d5e7b52d25208153d8d4a8.tar.bz2
colin-keep-e4219cd3279c896d85d5e7b52d25208153d8d4a8.tar.xz
colin-keep-e4219cd3279c896d85d5e7b52d25208153d8d4a8.zip
fixed checkbox behaviour
Diffstat (limited to 'lib/AdminPanel/Module')
-rw-r--r--lib/AdminPanel/Module/Proxy.pm23
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());
}
}
}