27 protected $post_cancel =
'edit_cancel';
28 protected $post_finish =
'edit_finish';
38 if (isset($_POST[$this->post_cancel])) {
39 $this->handleCancel();
40 } elseif (isset($_POST[$this->post_finish])) {
41 $this->handleFinish();
45 protected function handleFinish ()
47 $msgs = $this->
check();
49 msg_dialog::displayChecks($msgs);
52 $errors = $this->
save();
54 msg_dialog::displayChecks($errors);
57 $this->parent->removeLocks();
58 $this->parent->closeDialogs();
63 protected function handleCancel ()
65 $this->parent->removeLocks();
66 $this->parent->closeDialogs();
71 return parent::render().$this->getFooter();
79 if (!$this->displayPlugin) {
82 return '<p class="plugbottom">'.
84 ' <input type="submit" formnovalidate="formnovalidate" name="'.$this->post_cancel.
'" value="'.
msgPool::cancelButton().
'"/>'.
$parent
Reference to parent object.
This class is made for easy plugin creation for editing LDAP attributes.
$dn
dn of the opened object
save()
This function saves the object in the LDAP.
$mainTab
Is this plugin the main tab, the one that handle the object itself.
getFooter()
Returns the plugin footer (save cancel), displayed in the template.
render()
Render the dialog and returns the HTML code.
static cancelButton($escape=TRUE)
Text for a cancel button.
static saveButton($escape=TRUE)
Text for a save button.
$attributesInfo
This attribute store all information about attributes.
readPost()
Interpret POST content.
check()
This function checks the attributes values and yell if something is wrong.