mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
html_input(): improve the test logic and simplify the code.
This commit is contained in:
parent
e222bb733c
commit
1223850567
@ -220,14 +220,16 @@ no_type_attr:
|
||||
if (fc->type != FC_FILE)
|
||||
fc->default_value = get_attr_val(a, "value",
|
||||
html_context->options);
|
||||
if (!fc->default_value && fc->type == FC_CHECKBOX)
|
||||
fc->default_value = stracpy("on");
|
||||
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_CHECKBOX)
|
||||
fc->default_value = stracpy("on");
|
||||
else 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…
x
Reference in New Issue
Block a user