1 <?php
3 class aclroletab extends tabs
4 {
6 function aclroletab($config, $data, $dn)
7 {
8 $data = array(array("CLASS" => "aclrole" , "NAME" => _("ACL Templates")));
9 tabs::tabs($config, $data, $dn,"acl");
10 }
12 function save($ignore_account= FALSE)
13 {
14 $baseobject= $this->by_object['aclrole'];
16 /* Check for new 'dn', in order to propagate the
17 'dn' to all plugins */
18 $new_dn= 'cn='.$baseobject->cn.",".get_ou('aclroleou').$baseobject->base;
20 if ($this->dn != $new_dn){
22 /* Write entry on new 'dn' */
23 if ($this->dn != "new"){
24 $baseobject->move($this->dn, $new_dn);
25 $this->by_object['aclrole']= $baseobject;
26 }
28 /* Happen to use the new one */
29 $this->dn= $new_dn;
30 }
32 $ret= tabs::save();
34 return $ret;
35 }
37 function save_object($ignore_account= FALSE)
38 {
39 tabs::save_object();
40 }
42 function execute()
43 {
44 $display= tabs::execute();
45 if(!$this->by_object['aclrole']->dialog){
46 $display.= "<p style=\"text-align:right\">\n";
47 $display.= " <input type=submit name=\"edit_finish\" style=\"width:80px\" value=\""._("Ok")."\">\n";
48 $display.= " \n";
49 $display.= " <input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
50 $display.= "</p>";
51 }
52 return($display);
53 }
55 }
56 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
57 ?>