Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Allow for more types of Input #1

Merged
merged 1 commit into from
Oct 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/messagebox.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,11 +481,13 @@ LoadingOverlay - A jQuery Plugin to replace Javascript's window.alert(), window.
autotrim : definition.autotrim
});

case "text":
case "password":
default:
var validTypes = ["password", "text", "number", "date"];
if (validTypes.indexOf(type) == -1) {
type = "text";
}
return _FormatInput($("<input>", {
"type" : (type === "password") ? "password" : "text",
"type" : type,
"maxlength" : definition.maxlength,
"placeholder" : definition.title,
"value" : definition.defaultValue
Expand Down Expand Up @@ -647,4 +649,4 @@ LoadingOverlay - A jQuery Plugin to replace Javascript's window.alert(), window.
.on("keydown", _Window_KeyDown);
});

}(jQuery));
}(jQuery));