From: hickert Date: Mon, 27 Jun 2005 07:46:59 +0000 (+0000) Subject: Added PIN field X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=066fdcea2d4d31c9d92474c17186366de9e62dde;p=gosa.git Added PIN field git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@865 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc index 8b7fdca06..a3a489ba6 100644 --- a/plugins/gofon/phoneaccount/class_phoneAccount.inc +++ b/plugins/gofon/phoneaccount/class_phoneAccount.inc @@ -330,6 +330,7 @@ class phoneAccount extends plugin /* Transfer ACL's */ foreach($this->attributes as $val){ $smarty->assign($val."ACL", chkacl($this->acl, "$val")); + $smarty->assign($val,$this->$val); } /* Fill arrays */ @@ -453,6 +454,16 @@ class phoneAccount extends plugin $message[]= sprintf(_("You need to specify at least one phone number!")); } + if(($this->goFonPIN)==""){ + $this->goFonPIN = array(); + }else{ + if(strcmp ((int)($this->goFonPIN),($this->goFonPIN))){ + $message[] = sprintf(_("The given PIN is not valid, only numbers are allowed for this type.")); + }elseif(strlen($this->goFonPIN) < 4){ + $message[] = sprintf(_("The given PIN is too short")); + } + + } /* Check timestamps and phonenumbers */ foreach ($this->forwarders as $fw){ diff --git a/plugins/gofon/phoneaccount/generic.tpl b/plugins/gofon/phoneaccount/generic.tpl index 34e5c1744..4375af155 100644 --- a/plugins/gofon/phoneaccount/generic.tpl +++ b/plugins/gofon/phoneaccount/generic.tpl @@ -48,20 +48,38 @@ + +   + + + +
+ + + + +
 {t}Phone macro{/t} + + +
+
+ {$macrotab} + + + + + + + +
+ {t}Telefon PIN{/t} + + +
+ + -

 

-
- - - - -
 {t}Phone macro{/t} - - -
-
-{$macrotab}