/** * Renrder the survey div. * * @since 0.1 * * @param Parser $parser * * @return string */ public function render(Parser $parser) { static $loadedJs = false; if (!$loadedJs) { $parser->getOutput()->addModules('ext.survey.tag'); $parser->getOutput()->addHeadItem(Skin::makeVariablesScript(array('wgSurveyDebug' => SurveySettings::get('JSDebug')))); } return Html::element('span', $this->parameters, $this->contents); }
/** * Returns a list of default field values. * field name => field value * * @since 0.1 * * @return array */ public static function getDefaults() { return array('name' => '', 'title' => '', 'enabled' => SurveySettings::get('defaultEnabled') ? '1' : '0', 'header' => 'Thank you for taking this short survey. Please fill out the following questions:', 'footer' => '', 'thanks' => 'Thank you for your responses.', 'user_type' => SurveySettings::get('defaultUserType'), 'namespaces' => SurveySettings::get('defaultNamespaces'), 'ratio' => SurveySettings::get('defaultRatio'), 'expiry' => SurveySettings::get('defaultExpiry'), 'min_pages' => SurveySettings::get('defaultMinPages')); }