Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Unbeantwortet
Rückfrage Funktion befüllen / Feldvalidierung deaktivieren


Hallo Jan,

das class Attribut required musst du nicht entfernen. Wenn mann die Benutzereingaben simuliert scheint es zu klappen.
Es gibt jeweils noch ein verstecktes Feld welches den eigentlichen Benutzernamen hält welches auch gefüllt sein muss.

function addPopupListener() {
    document.addEventListener("DOMNodeInserted", (event) => {
        if (event.target?.classList?.contains("jr-step-action-layer")) {
            reshapeControlsForStepActions(event);
        }
    })
}

function reshapeControlsForStepActions(event) {
    if (!event?.target) {
        console.warn("No event target?");
        return;
    }

    const action = event.target.querySelector(".jr-step-action-layer-content form")?.name;
    const username = "Jan";
    const notice = "This is just a test";

    if (!action && action !== "assign" && action !== "request") {
        console.warn("Unkown step action form");
        return;
    }

    let radio = "";
    if (action === "assign") {
        radio = "id_popup_assign_job"
    }

    if (action === "request") {
        radio = "id_popup_request_jobfunction";
    }

    event.target.querySelector(`label[for='${radio}']`).getElementsByClassName.display = "none";
    jr_set_value(`display_user_${action}`, username);
    jr_set_value(`user_${action}`, username);
    jr_set_value(`jr_${action}_notice`, notice);

    setTimeout(() => {
        document.getElementById(`display_user_${action}`).dispatchEvent(new Event('change'));
        setTimeout(() => {
            document.getElementById(`jr_${action}_notice`).focus();
        }, 1);
    }, 1);
}
1
1
Gepostet vor 3 Jahren
624 Ansichten
0 Antworten
vor 3 Jahren
vor 3 Jahren