public function configure() { $ui = new FormUI('staticfront'); $page = $ui->append('select', 'page', 'staticfront__page', _t('The page to show for the home page: ', 'staticfront')); $page->options['none'] = _t('Show Normal Posts', 'staticfront'); foreach ($this->get_all_pages() as $post) { $page->options[$post->slug] = $post->title; } $blog_index = $ui->append('text', 'blog_index', 'staticfront__blog_index', sprintf(_t('Show normal posts at this URL: <b>%s</b>', 'staticfront'), Site::get_url('habari', true))); $blog_index->add_validator('validate_required'); $keep_pages = $ui->append('checkbox', 'keep_pages', 'staticfront__keep_pages', _t('Show static pages at base url: ', 'staticfront')); $ui->append('submit', 'save', _t('Save')); $ui->success(array($this, 'updated_config')); return $ui; }