1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-01-03 14:57:44 -05:00

html_button(): improve the logic.

This commit is contained in:
Laurent MONIN 2005-12-04 12:27:22 +01:00 committed by Laurent MONIN
parent 2df9c06c46
commit e222bb733c

View File

@ -169,12 +169,14 @@ no_type_attr:
fc->name = get_attr_val(a, "name", html_context->options); fc->name = get_attr_val(a, "name", html_context->options);
fc->default_value = get_attr_val(a, "value", html_context->options); fc->default_value = get_attr_val(a, "value", html_context->options);
if (!fc->default_value && fc->type == FC_SUBMIT) if (!fc->default_value) {
if (fc->type == FC_SUBMIT)
fc->default_value = stracpy("Submit"); fc->default_value = stracpy("Submit");
if (!fc->default_value && fc->type == FC_RESET) else if (fc->type == FC_RESET)
fc->default_value = stracpy("Reset"); fc->default_value = stracpy("Reset");
if (!fc->default_value && fc->type == FC_BUTTON) else if (fc->type == FC_BUTTON)
fc->default_value = stracpy("Button"); fc->default_value = stracpy("Button");
}
if (!fc->default_value) if (!fc->default_value)
fc->default_value = stracpy(""); fc->default_value = stracpy("");