$fields = $this->vi_extract_fields();
- $values = $add ? array_fill(0,count($keys),'') : explode($this->param_args_sep,$this->params['args']);
+ $values = ($_SERVER['REQUEST_METHOD'] == 'POST') ? $_POST : explode($this->param_args_sep,$this->params['args']);
+ $values = $add ? array_fill(0,count($keys),'') : $values;
$values = array_combine($keys,$values);
# NB 23.11.17: Handle format for /vi/
$args = $GLOBALS['dbq_args'];
+ if (1) {
$r = ['view' => join(' ',[
'<a class="button select vi" href="'.$this->table->base.'/vi/'.$args.'/">View</a>'
]) ] + $r;
+ } else {
+ $r = ['view' => join(' ',[''
+ .'<form action="'.$this->table->base.'/vi/'.'" method="post">'
+ .'<a class="button select vi" href="'.$this->table->base.'/vi/'.'" onclick="parentNode.submit();return false;">View</a>'
+ .$this->form_hidden($r)
+ .'</form>'
+ ]) ] + $r;
+ }
if ($this->perm < self::DELETE) return;
if ($this->db->type == 'sqlite' and !is_writeable($this->db->host)) return;