/** * Get the form to upload a logo. * I chose a separate form because logo stuff can be separated from other settings. * This prevents accidantal deletion of icons in case of pressing return (or else this button has to be last). * @param WC_Site $site * @param unknown_type $is_admin * @return unknown_type */ public function getFormLogo(WC_Site $site, $is_admin) { $data = array(); $buttons = array(); if ($site->hasLogo()) { $buttons['rem_logo'] = $this->module->lang('btn_rem_logo'); $data['current_logo'] = array(GWF_Form::HEADLINE, $site->displayLogo(), $this->module->lang('th_site_logo')); } $buttons['set_logo'] = $this->module->lang('btn_set_logo'); $data['new_logo'] = array(GWF_Form::FILE, '', $this->module->lang('th_site_new_logo')); $data['cmd'] = array(GWF_Form::SUBMITS, $buttons); return new GWF_Form($this, $data); }