[Bug 16763] New: Remove the use of "onclick" from record matching rules form

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 16763] New: Remove the use of "onclick" from record matching rules form

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16763

            Bug ID: 16763
           Summary: Remove the use of "onclick" from record matching rules
                    form
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
               URL: /cgi-bin/koha/admin/matching-rules.pl?op=edit_matching
                    _rule&matcher_id=X
                OS: All
            Status: ASSIGNED
          Severity: enhancement
          Priority: P5 - low
         Component: System Administration
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]
                CC: [hidden email], [hidden email],
                    [hidden email],
                    [hidden email]
        Depends on: 16762
            Status: Needs Signoff
  Patch complexity: Small patch
  Attachment #52499 1
       is obsolete:
                CC: [hidden email]
            Status: Signed Off
            Status: Failed QA
                CC: [hidden email]
            Status: ASSIGNED

There are many uses of "onclick" in the record matching rules edit form. These
should be removed in favor of defining events in JavaScript.

--- Comment #1 from Owen Leonard <[hidden email]> ---
Created attachment 52499
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52499&action=edit
Bug 16763 - Remove the use of "onclick" from record matching rules form

This patch revises the record matching rules edit form to remove the use
of "onclick" in favor of defining events in JavaScript.

Also changed: Custom form validation JS is replaced by use of the
built-in validation plugin; Font Awesome icons are added to 'add' and
'remove' links.

To test, apply the patch and go to Administration -> Record matching
rules.

- When adding or editing a record matching rule, the description, match
  threshold, and record type should be required.
- With both match points and match checks, the "add" and "remove" links
  should work correctly to show a new section with a blank form.
  "Add" and "remove" links should work correctly whether the form is
  in a saved state (i.e. the saved data has just been opened for
  editing), or whether the links have been added to the page as part of
  an "add" operation.
- When adding a match point or a match check, data added in additional
  entries should be saved correctly.
- After removing a match point or match check, the data should be saved
  correctly.

--- Comment #2 from H├ęctor Eduardo Castro Avalos <[hidden email]> ---
Created attachment 53004
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53004&action=edit
[SIGNED-OFF]Bug 16763: Remove the use of "onclick" from record matching rules
form

This patch revises the record matching rules edit form to remove the use
of "onclick" in favor of defining events in JavaScript.

Also changed: Custom form validation JS is replaced by use of the
built-in validation plugin; Font Awesome icons are added to 'add' and
'remove' links.

To test, apply the patch and go to Administration -> Record matching
rules.

- When adding or editing a record matching rule, the description, match
  threshold, and record type should be required.
- With both match points and match checks, the "add" and "remove" links
  should work correctly to show a new section with a blank form.
  "Add" and "remove" links should work correctly whether the form is
  in a saved state (i.e. the saved data has just been opened for
  editing), or whether the links have been added to the page as part of
  an "add" operation.
- When adding a match point or a match check, data added in additional
  entries should be saved correctly.
- After removing a match point or match check, the data should be saved
  correctly.

Signed-off-by: Hector Castro <[hidden email]>
Works as advertised

--- Comment #3 from Jonathan Druart <[hidden email]> ---
Owen, if you add a rule without match point and then edit it again to add one,
clicking on "Add match point" won't display the form.

--- Comment #4 from Owen Leonard <[hidden email]> ---
(In reply to Jonathan Druart from comment #3)
> Owen, if you add a rule without match point and then edit it again to add
> one, clicking on "Add match point" won't display the form.

Is this what you're describing?

1. Click 'New record matching rule'
2. Fill in all the required fields at the top, but no match points or match
checks.
3. Save the rule.
4. Edit the rule you just created.
5. Click the 'Add match point' link --> The Match point 2 form doesn't display?

Step 5 works correctly for me, so I'm not sure I understand the problem.

--- Comment #5 from Jonathan Druart <[hidden email]> ---
Owen,
So yes it is displayed, but at the bottom under the "match checks" block.
Actually the "match checks" block is contained into the "match points" block
when there is no match points.
They are 2 different blocks when you add a new rule or edit a rule with match
points.

--- Comment #6 from Owen Leonard <[hidden email]> ---
Created attachment 54487
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54487&action=edit
Screenshot of step 5 as described in Comment 4

Here's what I see after step 5 as described in Comment 4. Is that what you're
seeing?


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16762
[Bug 16762] Record matching rules: Remove match check link removes too much
--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 16763] Remove the use of "onclick" from record matching rules form

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16763

--- Comment #7 from Jonathan Druart <[hidden email]> ---
can you rebase the patches?

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/