index 0fac333facd739f0c5c01e62f83e8c5a7523ec48..b0b48dbbce4dfcca9730c7cdcaee1373d0cd5441 100644 (file)
* If it was possible to save it, remove dialog object.
* If it wasn't possible, show errors and keep dialog.
*/
- if((isset($_POST['edit_finish'])) && (isset($this->dialog->config))){
+ if((isset($_POST['edit_finish']) || isset($_POST['edit_apply'])) && (isset($this->dialog->config))){
$this->dialog->save_object();
- if(count($this->dialog->check())!=0){
- foreach($this->dialog->check() as $msg){
+ $msgs= $this->dialog->check();
+ if(count($msgs)!=0){
+ foreach($msgs as $msg){
print_red($msg);
}
}else{
- del_lock ($this->dn);
$this->dialog->save();
- unset($this->dialog);
- $this->dialog=NULL;
- $this->is_dialog=false;
- unset($_SESSION['objectinfo']);
+ if (!isset($_POST['edit_apply'])){
+ del_lock ($this->dn);
+ unset($this->dialog);
+ $this->dialog=NULL;
+ $this->is_dialog=false;
+ unset($_SESSION['objectinfo']);
+ }
}
}
}elseif(((isset($this->dialog->current))&&(!$this->dialog->by_object[$this->dialog->current]->is_dialog))){
$display.= "<p style=\"text-align:right\">\n";
- $display.= "<input type=\"submit\" name=\"edit_finish\" value=\""._("Save")."\">\n";
+ $display.= "<input type=\"submit\" name=\"edit_finish\" style=\"width:80px\" value=\""._("Ok")."\">\n";
$display.= " \n";
+ if ($this->dn != "new"){
+ $display.= "<input type=submit name=\"edit_apply\" value=\""._("Apply")."\">\n";
+ $display.= " \n";
+ }
$display.= "<input type=\"submit\" name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
$display.= "</p>";
}elseif(!isset($this->dialog->current)){