Bug 24758 - Allow folding sections in patron edition form
Summary: Allow folding sections in patron edition form
Status: RESOLVED DUPLICATE of bug 3137
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-28 11:59 UTC by Fridolin Somers
Modified: 2020-03-11 12:35 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Screenshot (43.18 KB, image/png)
2020-02-28 12:01 UTC, Fridolin Somers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2020-02-28 11:59:42 UTC
Patron edition form is big and contains several sections : Patron identity, Main address ...
Some of them are often unused so user may want to fold/unfold it to ease edition.
Comment 1 Fridolin Somers 2020-02-28 12:01:36 UTC
Created attachment 99755 [details]
Screenshot

I've managed to add this behavior with JS customisation.

===

$(document).ready(function() {
  if ($('#pat_memberentrygen').size()) {
    // Prepare
    $("fieldset").children("legend")
    .addClass("bl-autorepli")
    .append(' <i class="fa fa-caret-down"><i class="fa fa-caret-right" style="display:none">');
    // Onclick
    $("fieldset legend.bl-autorepli").on("click", function() {
      $(this).siblings("ol,table").toggle();
      $(this).children("i.fa").toggle();
    });
    // Hide by default
    $("fieldset#memberentry_address, fieldset#memberentry_altaddress").children("legend.bl-autorepli").click();
  }
});

===

Needs rework.

Feel free to propose a patch.
Comment 2 Owen Leonard 2020-02-28 12:45:19 UTC
I wonder if this should be considered a duplicate of Bug 3137?
Comment 3 Fridolin Somers 2020-03-11 12:35:18 UTC
Indeed looks a lot like it, thanks a lot Owen

*** This bug has been marked as a duplicate of bug 3137 ***