►
From YouTube: TTEOT Training Video - S1E18 - jQuery: Quick Permissions
Description
We give you permission to ooh and aah over this gem of jQuery. We'll show you how to setup quick permission buttons in your user permissions, so you don't have to scramble, trying to remember the same settings you've set for every other staff member. And as an added bonus, a button to copy permissions from one user to another, just to make it that much more exciting and spectacular. Are you drooling yet?
Referenced code: https://wiki.koha-community.org/wiki/JQuery_Library#Add_clear_and_preset_permission_buttons.2C_and_a_copy_button_to_user_permissions_page_.28v20.x.29
Music: https://www.bensound.com
A
B
I'm
christopher
brannon
with
the
coeur
d'alene
public
library
and
the
cooperative
information
network.
So
today
we're
going
to
be
talking
about
quick
permissions.
We've
had
this.
I've
had
this
modification
out
in
the
jquery
library
for
a
while,
and
there
are,
there
were
two
iterations
of
it,
one
for
version
16
of
coha
and
one
for
version
19.
B
B
The
website
is
for
those
of
you
that
haven't
been
here
before
is
coha-us.org,
and
if
you
go
over
to
the
learn
page,
we've
revamped
this
page
a
little
bit
and
condensed
some
things.
So
it's
a
little
easier
to
find
and
you're
not
doing
so
much
scrolling.
But
if
you
go
down
to
the
bottom,
you
can
click
on
watch
koha,
us
original
training,
videos.
A
B
B
B
Okay,
so
I
have
two
buttons
here:
set:
set
basic
circ
and
set
basic
manager.
They
have
different
settings.
B
If
I
click
on
one,
it
will
check
off
the
permissions
that
they
want
if
they
are
in
side
a
section
that
is
collapsed,
it
will
expand
that
section
and
that
way
you
can
see
all
the
settings
that
you
are
checking
off
before
you
click
save
the
basic
manager
has
slightly
different
settings,
so
you
can
see
that
some
of
the
check
boxes
turned
off
and
others
turned
on.
We
also
have
a
clear
all
flags
button.
If
you
are,
you
know,
decommissioning
somebody
that
used
to
work
for
the
library,
yeah.
A
B
B
And
sometimes
sometimes
you
have
settings
unique
to
a
particular
user
like
you
might
have
a
cataloger
that
does
a
couple
different
things
and
they
have
unique
settings
in
addition
to
cataloging
their
usual
catalog
settings.
So
it
might
not
be
a
quick
set
button
that
you
have
that
you
can
right
apply
towards
somebody
else,
but
maybe
somebody
else
is
filling
that
position
and
you
want
to
copy
those
settings.
So
the
copy
feature
allows
you
to
copy
those
settings
over
to
another
user
rather
than
having
to
set
them
and
then
check
one
by
one.
B
What
permission
is
different,
so
in
this
case
I'm
going
to
click
on
copy
permissions
to
nice.
Mobile
comes
up.
It's
asking
for
a
card
number,
my
first
iteration.
I
did
this.
I
was
using
borrower
number,
but
now
I
have
it
set
to
use
a
card
number
which
relies
on
a
report
which
we'll
talk
about.
Okay,
put
the
card
number,
so
we're
in
frost
x014
we're
going
to
copy
this
over
to
frostex024,
I'm
going
to
copy
it.
It
says
copy
and
save.
So
it's
copying
and
it's
going
to
save
the
settings
at
the
same
time.
B
So
a
little
alert
pops
up
there.
It
says
that
the
permissions
were
copied
and
saved,
I'm
in
the
other
account.
I
can
go
into
the
permissions
and
there's
all
those
settings
and
there
they
are
that's
really
cool
yeah.
I'm
really
happy
with
this.
I
knew
I
could
do
this
before
and
prior
to
doing
this,
I
was
doing
it
manually,
basically
what
it
what's
happening.
Let
me
go
ahead
and
clear
these
out
of
this
account
and
we're
going
to
go
back
to
this
one.
B
So,
basically,
what's
happening
with
with
that
we're
getting
a
modal
we're
asking
for
a
card
number
and
then
it
will
when
you,
when
you
click
copy
and
save
it's
checking
a
report.
It's
running
that
card
number
against
the
report
and
getting
back
a
borrower
number.
B
If
I
inspect
the
save
button
right
next
to
the
save
button
are
some
hidden
inputs
and
one
of
them
is
the
borrower
number.
It
knows
what
to
save
it,
to
right.
Here's
the
value
for
that
that
borrower
number
so
we're
borrower
number
14.,
not
a
card
number,
but
a
borrower
number,
and
so
it
grabs
the
borrower
number
that
you
want
from
that
report
and
replaces
that
value.
B
A
A
A
So
you
know
if
you're
only
I
can
see
where,
if
you're
only
one
library
and
there's
only
like
two
employees-
that
this
might
not
be
an
efficient
use
of
your
time
to
add
this
code,
but
for
for
large
libraries
and
for
libraries
that
have
a
lot
of
branches.
This
is,
this
is
a
huge
time
saver
so,
and
the
copy
permissions
is
going
to
be
awesome.
Yeah.
B
Clear
this
out
of
here
and
we're
going
to
look
at
it
like
section
by
section.
B
B
So
the
first
section
is
a
single
line
and
this
section
creates
the
buttons.
So
it
places
these
buttons
in
here
and
so
you're
gonna
see
the
set
basic
manager,
you'll
see
the
set
basic
circ,
the
clear
all
flags
and
then
the
new
one
copy
permissions
permissions.
So
those
are
all
set
and
they
have
their
own
ids.
So
we
can
assign
what
actions
happen
with
those.
So
that's
pretty
straightforward
right.
There.
A
B
A
A
B
So
the
next
two
sections
are
the
the
next
two
buttons,
the
circ
button
settings
and
the
manager
button
settings
and
in
earlier
versions
of
this,
the
first
thing
that
the
button
would
do.
I
I
actually
repeated
these
two
lines
in
both
of
these
buttons
and
recently
I
was
looking
at
that
and
thought
you
know:
that's
just
a
waste
of
code
and
redundant.
If
I
had
to
go
if
they
renamed,
you
know
something:
I'd
have
to
go
and
change
it
in
six
different
places.
A
A
B
So
we
have
to
clear
those,
but
we
have
to
clear
all
that
information
out,
even
if
there's
nothing
there
just
to
make
sure
so
that
you
don't
have
anything
hanging
on
that
you
didn't
want.
If
I
just
applied
the
the
ones
that
were
toggling.
B
If
there
were
other
permissions
that
were
set,
they
would
stay.
So
you
have
to
clear
those
before
you
set
the
new
permissions
that
are
specific
to
that
particular
role
in
there
after
after
it
clears
here's
where
we
set
the
flags.
So
this
is
where
I
identify
each
flag
by
the
id
of
that
checkbox.
So
if
you
go
in
here,
you
want
to
figure
out
what
checkboxes
you
decide.
What
checkboxes,
let's
say
I
wanted
to
have.
B
I
wanted
to
have
manage
plugins,
I
would
ins,
I
would
right
click
and
inspect
it.
It
would
take
me
to
that
input
the
check
box
and
here's
the
id
that
I
would
grab
and
put
in
there.
So
the
plugins
manage
so
in
this
case
set
to
basic
the
first
check
box
that
I
have,
if
I
inspect,
that
is,
that
circulate,
circulate
remaining
permissions
and
there
it
is
right
there.
B
This
is
the
circulate,
circulate
remaining
permissions,
so
you
just
go
down
the
line
and
add,
and
you
separate
with
a
comment
you
make
sure
that
you
put
a
hashtag
in
front
of
each
id
right
and
for
sections
that
if
you
wanted,
like
the
entire
section
like
you,
can
see
that
there
are
several
there's
three
here
in
the
course
reserves.
If
I
just
wanted
all
three,
I
don't
have
to
list
all
three.
I
can
simply
inspect
the
check
box
for
the
entire
group
and
it's
not
as
identifiable
of
a
name.
B
A
B
B
But
one
more
step
in
that
process
is
that
if
it's
inside
of
a
group,
if
I,
if
I
just
tell
it
to
to
click
on
it,
it'll
click
on
it,
but
it
won't
expand
the
group
to
where
you
can
see
it.
So
you
don't
necessarily
see
everything
that
you've
set.
So
in
the
in
the
cases
where
you
know,
I
told
it
to
do
this,
it's
having
to
expand,
expand
the
section
because
things
can
be
selected
and
you
wouldn't
know
it.
B
A
So
this
I've
already
I've
got
the
earlier
version
on
my
system,
which
I
think
is
from
coha16
and
the
one
thing
I
did
differently
is
that
you
know
back
you
know
now.
The
permissions
are
all
in
that
nice
table
nicely
stacked.
It
used
to
just
be
a
list.
Yes,
and
I
always
had
a
hard
time
following
that
on
the
screen.
A
So
that's
one
thing:
I
do
have
that's
a
little
different,
but
you
know
that's
another
thing
that
anybody
can
add.
You
know
you
can
say
you
know
when
you,
you
know
not
only
this
click,
but
this
change
the
css
yep
exactly
and
then
you
would
have
to
add
that
to
the
clear
tree
to
un
to
unhighlight
the
css,
but
there's
you
know
a
lot
of
different
ways.
You
can.
You
can
add
things
to
this,
to
make
it
to
customize
it
for
your
system.
B
First
section
here
this
is
going
to
this-
is
the
copy
permissions
button
modal,
so
you
notice
that
there
was
a
modal
that
popped
up
asking
for
the
card
number
right,
so
this
just
tags
on
a
section
to
the
end
of
the
page
that
is
going
to
be
the
modal
and
then
this
little
section
right
here
is
just
if
you
press
the
enter
key.
It's
going
to
be
the
same
as
if
you
clicked
the
copy
and
save
button,
so
some
people
just
like
to
be
able
to
type
away
and
press
enter.
B
B
B
This
is
going
to
change
the
borrower
number
and
then
save
the
information,
so
this
is
taking
that
card
number
that
you
typed
in
and
putting
it
in
a
a
variable
and
then
we're
using
that
variable
and
and
running
the
report
with
that
card
number.
So
it
can
get
the
borrower
number.
So
here
I
identified
the
report
as
number
55
and
again
these
any
reports
that
you
run
through
jquery
that
you're
grabbing
that
data
from
that
report
has
to
be
public.
B
So
you
have
to
remember
to
do
that,
but
in
this
case
the
report
number
is
number
55.
It
only
asks
for
one
parameter,
which
is
the
card
number
and
it
returns
the
borrower
number
so
inside
this
each.
It
is
just
assigning
the
value
that
that
report
spits
back
and
assigning
it
to
the
variable
user
borrow
number
and
then
it
goes
and
finds
that
value
in
the
code
that
I
had
shown
you
so.
B
It's
literally
going
for
this
line
of
code
looking
for
borrower
number
and
replacing
this
value
with
the
the
borrower
number
that.
B
B
B
B
This
section
right
here
creates
some
alert.
It
puts
an
alert
right
next
to
let
me
close
this
cancel.
It
puts
that
information
hidden
right
next
to
this
area
right
here,
and
then
this
part
determines
okay.
This
this
was
this.
Was
this
took
me
a
little
bit
of
time
to
figure
out,
because
I
wanted
to
get
this
just
right.
I
didn't
want
this
message
just
appearing
anytime.
B
You
hit
saved
on
on
permissions,
so
I
have
it
looking
up
where
you
came
from
what
page
you
came
from
so
in
this
case,
you're,
coming
from
your
referring
page,
was
the
flags
page
where
you're
setting
permissions
and
then
it's
looking
at
what
page
you're
on
right
now.
So
what's
in
your
url,
the
address
bar
and
it
is
getting
the
borrower
number
that
is
in
the
so
when
you,
when
you
end
up
here,
it's
it's
grabbing
this
borrower
number
here,
it's
looking
at
this
borrower
number
and
comparing
it
to
the
borrower
number
from.
B
That
you
were
just
at
comparing
them.
If
you
came
from
the
members
members
dash
flag
page
and
the
borrower
numbers
don't
match,
it
is
going
to
reveal
that
message
saying
that
that
the
permissions
have
been
copied
to
the
new
user
wow
so
yeah.
That
was
that
that
was
quite
a
hurdle
to
to
jump
over,
because
it's
like,
I
was
trying
to
save
things
in
variables,
just
to
make
it
a
little.
You
know
easy
and
it's
like
no
there's
no
easy
way
to
do
it.
B
A
B
Well,
it
you
know
it's
fun
doing
this
stuff,
because
you
learn
all
sorts
of
things
that
you
can
do
neat
little
tricks,
and
this
was
just
another
thing
that
I've
learned
that
I
can
do.
I
can
look
at
referring
pages
and
the
current
page
and
compare
and
get
the
the
information
that
I
wanted
so
that
I
could
do
it
just
in
the
moment
that
I
wanted
not.
B
You
know
just
generically
flashing,
this
message
whenever
you
go
to
a
page
or
you
know,
push
a
button,
so
I
wanted
it
very
specific
and
I
and
I
was
able
to
get
it
cool
so
anyways.
That
is
it.
Let
me
let
me
jump
over
here,
real
quick
to
the
report.
This
is
the
report.
It's
getting
so
the
report
was
number
55
up
here
in
this
case.
A
So
that
was
that
I
think
that'd
be
important
to
remind
everybody
if
you're
going
to
add
this
to
your
own
system,
you
have
to
make
sure
that
the
report
number
when
you
put
this
report
on
your
system,
you
have
to
make
sure
that
the
report
number
matches
what
you
put
in
the
jquery.
Otherwise,
it's
not
going
to
work
exactly.
B
Very
basic
report:
you're
reporting
back
the
borrower
number
out
of
the
borrower's
table
based
off
of
the
card
number
right
and
again
you
have
to
make
sure
that
this
is
a
public
report
and
I
would
label
the
report.
So
you
know
exactly
what
it
was
for,
so
you
don't,
you
know
arbitrarily
delete
it.
You
might
put
it
in
a
special
group,
but
all
of
this
is
on
the
jquery
library.
As
I
said,
there
were
two
other
previous
iterations
there's
a
version.
16.
B
version
19
changed
because
a
lot
of
references
changed
and
they
made
that
nice
new
table
layout
for
the
permissions,
and
I
have
not
tested
this
in
an
earlier
version.
So
that's
why
I'm
saying
that
this
is
version
20.
If
somebody
wants
to
test
it
in
other
versions
they're
welcome
to,
but
I
did
add
the
instructions
about
the
report
to
make
sure
that
you
change.
You
update
the
number
to
match
your
report.
Number
cool.
The
jquery
is
all
here
and
the
sequel
is
here.