From 9b10d4ceb4be5246d5045bb7655c3d53ffeb3a56 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 17 Aug 2005 07:15:33 +0000 Subject: [PATCH] phonePIN is disabled if chkbox is not set git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1161 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../gofon/conference/class_phoneConferenceGeneric.inc | 11 ++++++++++- plugins/gofon/conference/generic.tpl | 5 +++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/plugins/gofon/conference/class_phoneConferenceGeneric.inc b/plugins/gofon/conference/class_phoneConferenceGeneric.inc index 2b882da6b..25e158d5b 100644 --- a/plugins/gofon/conference/class_phoneConferenceGeneric.inc +++ b/plugins/gofon/conference/class_phoneConferenceGeneric.inc @@ -121,6 +121,12 @@ class conference extends plugin $smarty->assign($val."CHK", " checked "); } } + + if($this->goFonConferenceOption_P != "P"){ + $smarty->assign("goFonPINACL"," disabled "); + $smarty->assign("goFonPIN",""); + } + return($smarty->fetch (get_template_path('generic.tpl', TRUE))); } @@ -141,7 +147,7 @@ class conference extends plugin plugin::save_object(); if(isset($_POST['cn'])){ foreach(array("goFonConferenceOption_P","goFonConferenceOption_r","goFonConferenceOption_M","goFonConferenceOption_s", - "goFonConferenceOption_i","goFonConferenceOption_c","goFonConferenceOption_D") as $attrs){ + "goFonConferenceOption_i","goFonConferenceOption_c","goFonConferenceOption_D","goFonPIN") as $attrs){ if(isset($_POST[$attrs])){ $this->$attrs = $_POST[$attrs]; }else{ @@ -378,6 +384,9 @@ class conference extends plugin $this->SQL_remove_me(true); $this->SQL_add_me(true); + if(empty($this->goFonConferenceOption_P)){ + $this->attrs['goFonPIN']=array(); + } $this->attrs['goFonConferenceOption']=""; foreach(array("goFonConferenceOption_P","goFonConferenceOption_r","goFonConferenceOption_M","goFonConferenceOption_s", "goFonConferenceOption_i","goFonConferenceOption_c","goFonConferenceOption_D","goFonConferenceOptionFormat") as $attrs){ diff --git a/plugins/gofon/conference/generic.tpl b/plugins/gofon/conference/generic.tpl index b46b78259..47d044978 100644 --- a/plugins/gofon/conference/generic.tpl +++ b/plugins/gofon/conference/generic.tpl @@ -87,7 +87,8 @@ @@ -96,7 +97,7 @@   {t}PIN{/t} -- 2.30.2
- + {t}preset PIN{/t}
- +