Allow custom values in dropdowns to persist (only select properties
will be able to have custom values in dropdowns, currently only settable via
advanced customization)
Patch by fu.
diffs (22 lines):
diff -r e9a5878c4c11 -r d6aff629eebf cgi-bin/LJ/Widget/S2PropGroup.pm
--- a/cgi-bin/LJ/Widget/S2PropGroup.pm Mon Nov 22 14:24:23 2010 +0800
+++ b/cgi-bin/LJ/Widget/S2PropGroup.pm Mon Nov 22 14:28:32 2010 +0800
@@ -414,11 +414,17 @@ sub output_prop_element {
}
} elsif ( $prop->{values} ) {
$ret .= "<td class='prop-input'>" unless $is_group;
+
+ # take the list of allowed values
+ # and prepend custom values (set through the layer editor) if allowed
+ my %vals = split( /\|/, $prop->{values} );
+ $vals{$override} = "Custom: " . $override unless $vals{$override};
+
$ret .= $class->html_select(
{ name => $name,
disabled => ! $can_use,
selected => $override, },
- split(/\|/, $prop->{values})
+ %vals,
);
$ret .= " <label>" . LJ::eall( $prop->{des} ) . "</label>" if
$is_group && $prop->{des};
$ret .= "</td>" unless $is_group;
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog