[Web] Do not use hard-coded params in imapsync jobs
[Web] Allow custom parameters in imapsync
This commit is contained in:
@@ -80,11 +80,11 @@ $(document).ready(function() {
|
||||
// If clicked element #edit_selected is in a form with the same data-id as the button,
|
||||
// we merge all input fields by {"name":"value"} into api-attr
|
||||
if ($(this).closest("form").data('id') == id) {
|
||||
var req_empty = false;
|
||||
var invalid = false;
|
||||
$(this).closest("form").find('select, textarea, input').each(function() {
|
||||
if ($(this).prop('required')) {
|
||||
if (!$(this).val() && $(this).prop('disabled') === false) {
|
||||
req_empty = true;
|
||||
invalid = true;
|
||||
$(this).addClass('inputMissingAttr');
|
||||
} else {
|
||||
$(this).removeClass('inputMissingAttr');
|
||||
@@ -106,7 +106,7 @@ $(document).ready(function() {
|
||||
}
|
||||
}
|
||||
});
|
||||
if (!req_empty) {
|
||||
if (!invalid) {
|
||||
var attr_to_merge = $(this).closest("form").serializeObject();
|
||||
var api_attr = $.extend(api_attr, attr_to_merge)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user