feature: use datepicker in metabox for alarm time and end time#443
feature: use datepicker in metabox for alarm time and end time#443marvger wants to merge 5 commits into
Conversation
Removed Codecov upload steps for unit and integration tests from the CI workflow.
abrain
left a comment
There was a problem hiding this comment.
Danke für deine erste Contribution.
| - name: Upload code coverage to Codecov (unit) | ||
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 | ||
| with: | ||
| fail_ci_if_error: true | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| disable_search: true | ||
| files: ${{github.workspace}}/build/logs/clover.xml | ||
| flags: unit | ||
|
|
||
| - name: Upload code coverage to Codecov (integration) | ||
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 | ||
| with: | ||
| fail_ci_if_error: true | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| disable_search: true | ||
| files: ${{github.workspace}}/build/logs/clover-integration.xml | ||
| flags: integration | ||
|
|
||
|
|
There was a problem hiding this comment.
Diese Änderung war vermutlich ein Versehen? Hängt zumindest nicht mit dem Kern des PR zusammen.
| * @param string $value Feldwert | ||
| * @param string $placeholder Platzhalter | ||
| */ | ||
| protected function echoInputDateTime(string $label, string $name, string $value, string $placeholder = '') |
There was a problem hiding this comment.
Das placeholder-Attribut bitte entfernen, bei Datumsfeldern gibt es das nicht. Siehe https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes
| jQuery(function () { | ||
| const datumsregex = /^(19|20)\d{2}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01]) ([01][0-9]|2[0-3]):([0-5][0-9])$/; | ||
| const datumsregex = /^(19|20)\d{2}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9])$/; | ||
| const hinweistext = __('Please use the following format: YYYY-MM-DD hh:mm', 'einsatzverwaltung'); |
There was a problem hiding this comment.
Das Format hat der User nicht mehr selbst in der Hand, daher könnte der Hinweis jetzt etwas allgemeiner formuliert sein, dass das Datum nicht vollständig oder korrekt ist.
Beim Einsatzende ist die Prüfung vermutlich wirkungslos, da bei einem unvollständig oder falsch eingegebenem Datum der Wert "" sein wird und das nicht von einem bewussten Weglassen der Angabe zu unterscheiden ist.
Am saubersten wäre es wohl, die JavaScript-Prüfung wegzulassen und mit der CSS-Pseudoklasse :invalid eine ungültige Eingabe anzuzeigen.
Hi Andreas (@abrain),
ich habe hier einmal ein kleines "Feature" - ein Date-Picker anstatt des plain-text Feldes für die Auswahl der Alarm- und Endzeit.
In Zukunft werde ich vermutlich häufiger mal contributen! ;)
Diese Changes setzen #272 um.