From 119a02e2c3259cb41b66bf1123793e10ef38f690 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 9 Jul 2019 13:00:13 +0000 Subject: [PATCH] Move webcam interface into modal https://bugs.koha-community.org/show_bug.cgi?id=6815 Signed-off-by: Christopher Brannon --- .../intranet-tmpl/prog/en/includes/circ-menu.inc | 7 ++ .../prog/en/includes/intranet-bottom.inc | 18 --- .../prog/en/modules/members/member-webcam.tt | 140 +++++---------------- .../prog/en/modules/members/moremember.tt | 11 +- .../intranet-tmpl/prog/js/pages/patron-webcam.js | 113 +++++++++++++++++ 5 files changed, 161 insertions(+), 128 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/js/pages/patron-webcam.js diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc index a12be5e07f..790fae6836 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -159,6 +159,13 @@ +
+ + + + + +
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc index b363800134..e0bce02522 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc @@ -68,24 +68,6 @@ [% END %] [% END %] - - - [% IF ( footerjs ) %] [% INCLUDE js_includes.inc %] [% jsinclude | $raw # Parse the page template's JavaScript block if necessary %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-webcam.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-webcam.tt index 7c254e2654..3189ee2d1e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-webcam.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-webcam.tt @@ -1,107 +1,33 @@ - - - - - - Koha Patron Image Via Webcam - - - - -

Koha Patron Image Taker

-

Ask the patron to face the webcam to take their picture.

-

WARNING: If your machine does not have a webcam, - your browser is not allowed camera access, your operating - system blocks the browser app from accessing the camera, - or your browser does not support the javascript used - in this page, this may not work and likely looks like - a empty page. If this is working you will see a video - playing of what the webcam sees.

- - -
- - - - - - - - - - - - - +[% INCLUDE 'doc-head-open.inc' %] +Koha › Patrons › Capture patron image +[% INCLUDE 'doc-head-close.inc' %] + + + + +[% INCLUDE 'header.inc' %] +[% INCLUDE 'patron-search.inc' %] + + + +
+
+
+

Capture patron image

+
+

Ask the patron to face the webcam to take their picture.

+ + +
+ + + + + + +
+
+
+
+ +[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 1c65cfabdb..d7f69941ff 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -17,6 +17,7 @@ [% END %] [% INCLUDE 'doc-head-close.inc' %] + @@ -306,7 +307,7 @@ [% ELSE %]
-

Upload patron image

+

Add patron image

Add
[% END %] @@ -332,9 +333,9 @@ Cancel -
+

Take patron image

- Take + Take
[% # /div#manage-patron-image %] [% END %] @@ -879,6 +880,9 @@ [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %] [% INCLUDE 'timepicker.inc' %] + [% IF ( Koha.Preference('patronimages') ) %] + [% Asset.js("js/pages/patron-webcam.js") %] + [% END %]