mirror of
https://github.com/hrfee/jellyfin-accounts.git
synced 2024-12-23 01:20:12 +00:00
Harvey Tindall
db3b992857
multi-use invites will have a set limit of how many times they can be used. They can also be set to have no limit. An additional menu is planned for multi use invites to see when they have been used, and by who.
27 lines
755 B
JavaScript
27 lines
755 B
JavaScript
function serializeForm(id) {
|
|
var form = document.getElementById(id);
|
|
var formData = {};
|
|
for (var i = 0; i < form.elements.length; i++) {
|
|
var el = form.elements[i];
|
|
if (el.type != 'submit') {
|
|
var name = el.name;
|
|
if (name == '') {
|
|
name = el.id;
|
|
};
|
|
switch (el.type) {
|
|
case 'checkbox':
|
|
formData[name] = el.checked;
|
|
break;
|
|
case 'text':
|
|
case 'password':
|
|
case 'select-one':
|
|
case 'email':
|
|
case 'number':
|
|
formData[name] = el.value;
|
|
break;
|
|
};
|
|
};
|
|
};
|
|
return formData;
|
|
};
|