summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebflo2011-12-15 10:46:25 (GMT)
committer Jose Reyero2011-12-15 10:46:25 (GMT)
commit8cb3b6cc81d9be18749be53d13b9e8392bcabe7d (patch)
treee4ac707f86b6b0125faec30337f25390285031d1
parent4c097885821454829dd31109e4f42c42939bc86e (diff)
Issue #1366204 by webflo: Fixed empty_value() removed from select field.
-rw-r--r--i18n_field/i18n_field.module5
1 files changed, 4 insertions, 1 deletions
diff --git a/i18n_field/i18n_field.module b/i18n_field/i18n_field.module
index 20e6e11..18fcaf9 100644
--- a/i18n_field/i18n_field.module
+++ b/i18n_field/i18n_field.module
@@ -251,7 +251,10 @@ function i18n_field_field_widget_form(&$form, &$form_state, $field, $instance, $
// Translate list options
if (($translate = i18n_field_type_info($field['type'], 'translate_options')) && !empty($field['settings']['allowed_values'])) {
$element['#options'] = $translate($field, $i18n_langcode);
-
+ if ($element['#properties']['empty_option']) {
+ $label = theme('options_none', array('instance' => $instance, 'option' => $element['#properties']['empty_option']));
+ $element['#options'] = array('_none' => $label) + $element['#options'];
+ }
if ($field['type'] == 'list_boolean' && !empty($element['#on_value'])) {
$on_value = $element['#on_value'];
$element['#title'] = $element['#options'][$on_value];