Actions

Translations

Translations:Plugins - advanced/110/bg

From LimeSurvey Manual

// В init() Yii::app()->formExtensionService->add(

'globalsettings.general',
new TextInput([
'name' => 'myinput', 
'label' => 'Етикет',
'disabled' => true,
'tooltip' => 'Moo moo moo',
'help' => 'Мало помощен текст', 
'save' => function($request, $connection) {
$value = $request->getPost('myinput');
if ($value === 'някоя невалидна стойност') {
throw new SaveFailedException("Could not save custom input 'myinput'");
} else {
SettingGlobal::setSetting('myinput', $value);
}
} ,
'load' => function () {
return getGlobalSetting('myinput');
}
])

); </syntaxhighlight>