1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-28 03:06:20 -04:00

[form] added default

This commit is contained in:
Witold Filipczyk 2022-01-28 15:44:49 +01:00
parent 86f18c2079
commit 5b0ec2c4f2
3 changed files with 13 additions and 0 deletions

View File

@ -259,6 +259,7 @@ html_input_format(struct html_context *html_context, char *a,
case FC_TEXTAREA:
case FC_SELECT:
case FC_HIDDEN:
default:
INTERNAL("bad control type");
}
pop_html_element(html_context);

View File

@ -1502,6 +1502,9 @@ new_link(struct html_context *html_context, char *name, int namelen)
case FC_BUTTON:
case FC_HIDDEN:
link->type = LINK_BUTTON;
break;
default:
break;
}
link->data.form_control = fc;
/* At this point, elformat.form might already be set but

View File

@ -233,6 +233,8 @@ init_form_state(struct document_view *doc_view,
/* We don't want to recode hidden fields. */
fs->value = stracpy(fc->default_value);
break;
default:
break;
}
}
@ -655,6 +657,7 @@ drew_char:
case FC_RESET:
case FC_BUTTON:
case FC_HIDDEN:
default:
break;
}
}
@ -763,6 +766,9 @@ add_submitted_value_to_list(struct el_form_control *fc,
if (sub) add_to_list(*list, sub);
break;
default:
break;
}
}
@ -1938,6 +1944,8 @@ get_form_label(struct el_form_control *fc)
return N_("File upload");
case FC_PASSWORD:
return N_("Password field");
default:
break;
}
return NULL;
@ -2075,6 +2083,7 @@ get_form_info(struct session *ses, struct document_view *doc_view)
case FC_RESET:
case FC_BUTTON:
case FC_SELECT:
default:
break;
}