示例#1
0
  public function prepare()
  {
    $grid_tag = $this->findParentByClass('grid_list_tag');
    $grid_tag->setFormRequired();

    $this->attributes['type'] = 'button';

    $this->attributes['onclick'] = '';

    if(isset($this->attributes['form_submitted']) &&  (boolean)$this->attributes['form_submitted'])
    {
      $this->attributes['onclick'] .= "add_form_hidden_parameter(this.form, 'grid_form[submitted]', 1);";
    unset($this->attributes['form_submitted']);
    }

    parent :: prepare();
  }
  public function prepare()
  {
    parent :: prepare();

    if(!isset($this->attributes['type']))
      $this->attributes['type'] = 'submit';

    $this->attributes['onclick'] = "addFormHiddenParameter(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']);
  }