Actions

Translations

Translations:Plugins - advanced/110/sl

From LimeSurvey Manual

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

'globalsettings.general',
new TextInput([
'name' => 'myinput', 
'label' => 'Oznaka',
'disabled' => res,
'tooltip' => 'Moo moo moo',
'help' => 'Nekaj besedila pomoči', 
'save' => function($request, $connection) {
$value = $request->getPost('myinput');
if ($value === 'nekatera neveljavna vrednost') {
throw new SaveFailedException("Ni bilo mogoče shraniti vnosa po meri 'myinput'");
} else {
SettingGlobal::setSetting('myinput', $value);
}
} ,
'load' => function () {
return getGlobalSetting('myinput');
}
])

); </syntaxhighlight>