From 3024ac0b41794016362c552844260b232334dd1e Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Fri, 4 Nov 2011 19:46:45 +1300 Subject: [PATCH] Sorry pushed this by mistake when trying to fix Pauls permissions Revert "Fix for Bug 5974 - Bogus auth check for "StaffMember" role" This reverts commit a867bfcff7201a7fa3b56bee4dd484a49ece35e3. (cherry picked from commit 7a82e508f020aed3691222e08695a0f7cfd86b48) Signed-off-by: Chris Nighswonger --- .../prog/en/includes/circ-toolbar.inc | 30 +++++++++++++++---- .../prog/en/includes/members-toolbar.inc | 8 +++-- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc index 972393d448..503f9547bc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc @@ -63,9 +63,13 @@ function update_child() { var moremenu = [ { text: _("Renew Patron"), onclick: { fn: confirm_reregistration } }, - { text: _("Set Permissions"), url: "/cgi-bin/koha/members/member-flags.pl?member=[% borrowernumber %]"[% UNLESS CAN_user_permissions %], disabled: true[% END %]}, - { text: _("Delete"), [% UNLESS CAN_user_borrowers %]disabled: true, [% END %] onclick: { fn: confirm_deletion } }, - { text: _("Update Child to Adult Patron") , onclick: { fn: update_child }[% UNLESS is_child" %], disabled: true[% END %]} + { text: _("Set Permissions"), url: "/cgi-bin/koha/members/member-flags.pl?member=[% borrowernumber %]" + [% IF ( CAN_user_permissions ) %][% IF ( StaffMember ) %] + [% UNLESS ( CAN_user_staffaccess ) %], disabled: true[% END %] + [% ELSE %][% END %] + [% ELSE %], disabled: true[% END %]}, + { text: _("Delete"), [% IF ( StaffMember ) %][% UNLESS ( CAN_user_staffaccess ) %]disabled: true, [% END %][% ELSE %][% UNLESS ( CAN_user_borrowers ) %]disabled: true, [% END %][% END %] onclick: { fn: confirm_deletion } }, + { text: _("Update Child to Adult Patron") , onclick: { fn: update_child }[% UNLESS ( is_child ) %], disabled: true[% END %]} ]; new YAHOO.widget.Button({ @@ -93,9 +97,23 @@ function update_child() { [% IF ( adultborrower ) %]new YAHOO.widget.Button("addchild");[% END %] new YAHOO.widget.Button("editpatron"); new YAHOO.widget.Button("addnote"); - [% IF CAN_user_staffaccess %] new YAHOO.widget.Button("changepassword"); [% END %] + [% IF ( StaffMember ) %][% IF ( CAN_user_staffaccess ) %] new YAHOO.widget.Button("changepassword"); [% END %] + [% ELSE %] new YAHOO.widget.Button("changepassword"); [% END %] + new YAHOO.widget.Button("duplicate"); new YAHOO.widget.Button("printslip"); new YAHOO.widget.Button("printpage"); + new YAHOO.widget.Button("renewpatron"); + [% IF ( CAN_user_permissions ) %] + [% IF ( StaffMember ) %] + [% IF ( CAN_user_staffaccess ) %] + new YAHOO.widget.Button("patronflags"); + [% END %] + [% ELSE %] + new YAHOO.widget.Button("patronflags"); + [% END %] + [% END %] + [% IF ( StaffMember ) %][% UNLESS ( CAN_user_staffaccess ) %]new YAHOO.widget.Button("deletepatron");[% END %] + [% ELSE %]new YAHOO.widget.Button("deletepatron");[% END %] } //]]> @@ -118,7 +136,9 @@ function update_child() { [% END %] [% IF ( CAN_user_borrowers ) %] [% IF ( adultborrower ) %]
  • Add child
  • [% END %] - [% CAN_user_staffaccess %]
  • Change Password
  • [% END %] +[% IF ( StaffMember ) %][% IF ( CAN_user_staffaccess ) %]
  • Change Password
  • [% END %] + [% ELSE %]
  • Change Password
  • [% END %] + [% END %]
  • Duplicate
  • Print Page
  • Print Slip
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc index bc3e920af3..afad863ce8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc @@ -91,10 +91,14 @@ function update_child() { [% IF ( adultborrower ) %]new YAHOO.widget.Button("addchild");[% END %] new YAHOO.widget.Button("editpatron"); new YAHOO.widget.Button("addnote"); - [% IF CAN_user_staffaccess %]new YAHOO.widget.Button("changepassword"); [% END %] + new YAHOO.widget.Button("changepassword"); new YAHOO.widget.Button("duplicate"); new YAHOO.widget.Button("printslip"); new YAHOO.widget.Button("printpage"); + new YAHOO.widget.Button("renewpatron"); + new YAHOO.widget.Button("patronflags"); + new YAHOO.widget.Button("deletepatron"); + new YAHOO.widget.Button("updatechild"); } //]]> @@ -115,7 +119,7 @@ function update_child() { [% END %] [% END %] [% IF ( adultborrower ) %]
  • Add child
  • [% END %] - [% IF CAN_user_staffaccess %]
  • Change Password
  • [% END %] +
  • Change Password
  • Duplicate
  • Print Page
  • Print Slip
  • -- 2.39.5