Example #1
0
 function prepare()
 {
     $grid_tag =& $this->find_parent_by_class('grid_list_tag');
     $grid_tag->set_form_required();
     $this->attributes['type'] = 'button';
     $this->attributes['onclick'] = '';
     if (isset($this->attributes['form_submitted']) && (bool) $this->attributes['form_submitted']) {
         $this->attributes['onclick'] .= "add_form_hidden_parameter(this.form, 'grid_form[submitted]', 1);";
         unset($this->attributes['form_submitted']);
     }
     parent::prepare();
 }
 function prepare()
 {
     parent::prepare();
     if (!isset($this->attributes['type'])) {
         $this->attributes['type'] = 'submit';
     }
     $this->attributes['onclick'] = "add_form_hidden_parameter(this.form, 'action', '{$this->attributes['action']}');";
     if (isset($this->attributes['reload_parent'])) {
         $this->attributes['onclick'] .= "add_form_action_parameter(this.form, 'reload_parent', '1')";
         unset($this->attributes['reload_parent']);
     }
     unset($this->attributes['action']);
 }
 function prepare()
 {
     parent::prepare();
     $form_tag =& $this->find_parent_by_class('form_tag');
     if (!isset($this->attributes['type'])) {
         $this->attributes['type'] = 'submit';
     }
     $this->attributes['onclick'] = "add_form_hidden_parameter('{$form_tag->attributes['id']}', 'action', '{$this->attributes['action']}');";
     if (isset($this->attributes['reload_parent'])) {
         $this->attributes['onclick'] .= "add_form_action_parameter('{$form_tag->attributes['id']}', 'reload_parent', '1')";
         unset($this->attributes['reload_parent']);
     }
     unset($this->attributes['action']);
 }