View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
08915 | Bug reports | Plugins | public | 2014-03-28 13:36 | 2020-03-13 18:46 |
Reporter | ResearchOnBlogs | Assigned To | ollehar | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | open | ||
Product Version | 2.05+ | ||||
Summary | 08915: Textfield for Plugin Settings has not default value | ||||
Description | Textfield for Plugin Settings has not default value. The select field one.. Attached a patch. | ||||
Tags | No tags attached. | ||||
Attached Files | LS_SettingsWidget_defaultvalue_Text.patch (863 bytes)
Index: application/extensions/SettingsWidget/SettingsWidget.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- application/extensions/SettingsWidget/SettingsWidget.php (date 1395741640000) +++ application/extensions/SettingsWidget/SettingsWidget.php (revision ) @@ -366,7 +366,7 @@ { $out = ''; $id = $name; - $value = isset($metaData['current']) ? $metaData['current'] : ''; + $value = isset($metaData['current']) ? $metaData['current'] : (isset($metaData['default']) ? $metaData['default'] : null); // default value $readOnly = isset($metaData['readOnly']) ? $metaData['readOnly'] : false; if (isset($metaData['label'])) { \ No newline at end of file | ||||
Bug heat | 10 | ||||
Complete LimeSurvey version number (& build) | 140320 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | xx | ||||
Server OS (if known) | xxxx | ||||
Webserver software & version (if known) | xx | ||||
PHP Version | xx | ||||
Are you sure ? I use with success |
|
Mhm.. 'my_subject' => array( I think the input of the patch is missing. Take a look on the part of the select-type. There you find the same, to handle current and default value. |
|
Yes, i look at it, but don't look before use 'defautlt'=>'wp_' ??? See strange it's work, but maybe set elsewwhere. Sam : its' needed ? |
|
Current sets the current value, this is not the same as the default value. The base plugins fills the current value when getPluginSettings is called. This is different from default. Also this allows you to use the defaults like this: |
|
what about my patch? do you agree with it? I did simply the same as in line 334: public function renderSelect($name, array $metaData, $form = null) of the settingsWidget.PHP |
|
Two year old issue for 2.05 (not 2.50). Still relevant? |
|
Please give feedback. |
|
@olle : think it's more a different usage .... In fact : It's OK for "global plugi settinsg" : default value is set when call plugin manager Actually : i don't care :). I always enforce default value if needed (because it must be set to default when get settings) |
|
This version of LimeSurvey is not longer supported. Please check so that the issue is fixed in a more recent version of LimeSurvey. If it's not, please reopen this bug report. Thank you. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2014-03-28 13:36 | ResearchOnBlogs | New Issue | |
2014-03-28 13:36 | ResearchOnBlogs | File Added: LS_SettingsWidget_defaultvalue_Text.patch | |
2014-03-28 19:28 | DenisChenu | Note Added: 29592 | |
2014-03-28 20:07 | ResearchOnBlogs | Note Added: 29594 | |
2014-03-28 20:17 | ResearchOnBlogs | Note Edited: 29594 | |
2014-03-29 10:45 | DenisChenu | Note Added: 29598 | |
2014-03-29 10:45 | DenisChenu | Assigned To | => sammousa |
2014-03-29 10:45 | DenisChenu | Status | new => assigned |
2014-04-08 14:19 | sammousa | Note Added: 29692 | |
2014-04-14 15:57 | ResearchOnBlogs | Note Added: 29745 | |
2016-01-20 10:59 | sammousa | Assigned To | sammousa => |
2016-01-21 09:11 | DenisChenu | Status | assigned => new |
2016-08-25 12:25 | c_schmitz | Assigned To | => ollehar |
2016-08-25 12:25 | c_schmitz | Status | new => assigned |
2016-08-25 12:28 | ollehar | Note Added: 40492 | |
2016-10-26 12:24 | ollehar | Status | assigned => feedback |
2016-10-26 12:24 | ollehar | Note Added: 41553 | |
2016-10-26 12:37 | DenisChenu | Note Added: 41554 | |
2020-03-13 18:46 | c_schmitz | Note Added: 56474 | |
2020-03-13 18:46 | c_schmitz | Status | feedback => closed |