mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
html_button(): improve the logic.
This commit is contained in:
parent
2df9c06c46
commit
e222bb733c
@ -169,12 +169,14 @@ no_type_attr:
|
||||
|
||||
fc->name = get_attr_val(a, "name", html_context->options);
|
||||
fc->default_value = get_attr_val(a, "value", html_context->options);
|
||||
if (!fc->default_value && fc->type == FC_SUBMIT)
|
||||
fc->default_value = stracpy("Submit");
|
||||
if (!fc->default_value && fc->type == FC_RESET)
|
||||
fc->default_value = stracpy("Reset");
|
||||
if (!fc->default_value && fc->type == FC_BUTTON)
|
||||
fc->default_value = stracpy("Button");
|
||||
if (!fc->default_value) {
|
||||
if (fc->type == FC_SUBMIT)
|
||||
fc->default_value = stracpy("Submit");
|
||||
else if (fc->type == FC_RESET)
|
||||
fc->default_value = stracpy("Reset");
|
||||
else if (fc->type == FC_BUTTON)
|
||||
fc->default_value = stracpy("Button");
|
||||
}
|
||||
if (!fc->default_value)
|
||||
fc->default_value = stracpy("");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user