protected function save_fields_post() { if ($this->post->title == '') { echo 'No field name entered!'; return; } $data = array('fieldid' => $this->post->fieldid, 'title' => $this->post->title, 'value' => $this->post->value, 'type' => $this->post->type, 'public' => $this->post->public, 'showinregistration' => $this->post->showinregistration); if ($data['public'] == 'yes') { $data['public'] = true; } else { $data['public'] = false; } if ($data['showinregistration'] == 'yes') { $data['showinregistration'] = true; } else { $data['showinregistration'] = false; } $ret = SettingsData::EditField($data); if (DB::errno() != 0) { $this->set('message', 'There was an error saving the settings: ' . DB::error()); $this->render('core_error.tpl'); } else { LogData::addLog(Auth::$userinfo->pilotid, 'Edited custom registration field "' . $this->post->title . '"'); $this->set('message', 'Edited custom registration field "' . $this->post->title . '"'); $this->render('core_success.tpl'); } }