Merge remote branch 'kc/new/pending_qa/enh/bug_3644' into kcmaster
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / error-messages.inc
1 <!-- TMPL_IF NAME="error" -->
2 <script type='text/javascript'>
3 // Gratuitiously copied from http://dhtmlpopups.webarticles.org/basics.php
4 // Determine how much the visitor had scrolled
5
6 var scrolledX, scrolledY;
7 if( self.pageYOffset ) {
8   scrolledX = self.pageXOffset;
9   scrolledY = self.pageYOffset;
10 } else if( document.documentElement && document.documentElement.scrollTop ) {
11   scrolledX = document.documentElement.scrollLeft;
12   scrolledY = document.documentElement.scrollTop;
13 } else if( document.body ) {
14   scrolledX = document.body.scrollLeft;
15   scrolledY = document.body.scrollTop;
16 }
17
18 // Determine the coordinates of the center of the page
19
20 var centerX, centerY;
21 if( self.innerHeight ) {
22   centerX = self.innerWidth;
23   centerY = self.innerHeight;
24 } else if( document.documentElement && document.documentElement.clientHeight ) {
25   centerX = document.documentElement.clientWidth;
26   centerY = document.documentElement.clientHeight;
27 } else if( document.body ) {
28   centerX = document.body.clientWidth;
29   centerY = document.body.clientHeight;
30 }
31
32 function myPopupRelocate() {
33  var scrolledX, scrolledY;
34  if( self.pageYOffset ) {
35    scrolledX = self.pageXOffset;
36    scrolledY = self.pageYOffset;
37  } else if( document.documentElement && document.documentElement.scrollTop ) {
38    scrolledX = document.documentElement.scrollLeft;
39    scrolledY = document.documentElement.scrollTop;
40  } else if( document.body ) {
41    scrolledX = document.body.scrollLeft;
42    scrolledY = document.body.scrollTop;
43  }
44
45  var centerX, centerY;
46  if( self.innerHeight ) {
47    centerX = self.innerWidth;
48    centerY = self.innerHeight;
49  } else if( document.documentElement && document.documentElement.clientHeight ) {
50    centerX = document.documentElement.clientWidth;
51    centerY = document.documentElement.clientHeight;
52  } else if( document.body ) {
53    centerX = document.body.clientWidth;
54    centerY = document.body.clientHeight;
55  }
56
57  var leftOffset = scrolledX + (centerX - 250) / 2;
58  var topOffset = scrolledY + (centerY - 200) / 2;
59
60  document.getElementById("mypopup").style.top = topOffset + "px";
61  document.getElementById("mypopup").style.left = leftOffset + "px";
62 }
63
64 window.onload=function(){
65  myPopupRelocate();
66  document.getElementById("mypopup").style.display = "block";
67  document.body.onscroll = myPopupRelocate;
68  window.onscroll = myPopupRelocate;
69 }
70 </script>
71 <div id='mypopup' name='mypopup' style='position: absolute; width: 400px; height: 131px; display: none; background: #FFC url(/intranet-tmpl/prog/img/alert-bg.gif) repeat-x left 0; border: 1px solid #bcbcbc; right: 0px; top: 500px'>
72     <span id="message" style="position: absolute; top: 5px; left: 5px;">
73     <strong style="color: #900;">WARNING:</strong>
74         <!-- TMPL_IF NAME="101" -->
75         The database returned an error while <!-- TMPL_IF NAME="card_element" -->saving <!-- TMPL_VAR NAME="card_element" --> <!-- TMPL_VAR NAME="element_id" --><!-- TMPL_ELSE -->attempting a save operation<!-- /TMPL_IF -->. Please have your system administrator check the error log for details.
76         <!-- TMPL_ELSIF NAME="102" -->
77         The database returned an error while <!-- TMPL_IF NAME="card_element" -->deleting <!-- TMPL_VAR NAME="card_element" --> <!-- TMPL_VAR NAME="element_id" --><!-- TMPL_ELSIF NAME=image_ids --><!-- TMPL_VAR NAME="image_ids" --><!-- TMPL_ELSE -->attempting a delete operation<!-- /TMPL_IF -->. Please have your system administrator check the error log for details.
78         <!-- TMPL_ELSIF NAME="201" -->
79         An unsupported operation was attempted<!-- TMPL_IF NAME="element_id" --> on <!-- TMPL_VAR NAME="card_element" --> <!-- TMPL_VAR NAME="element_id" --><!-- /TMPL_IF -->. Please have your system administrator check the error log for details.
80         <!-- TMPL_ELSIF NAME="202" -->
81         An error has occurred. Please ask your system administrator to check the error log for more details.
82         <!-- TMPL_ELSIF NAME="203" -->
83         A non-existent or invalid branch code was supplied. Please <a href="/cgi-bin/koha/circ/selectbranchprinter.pl">verify</a> that you have a branch selected.
84         <!-- TMPL_ELSIF NAME="301" -->
85         An error has occurred while attempting to upload the image file. Please ask you system administrator to check the error log for more details.
86         <!-- TMPL_ELSIF NAME="302" -->
87         Image exceeds 500KB. Please resize and import again.
88         <!-- TMPL_ELSIF NAME="303" -->
89         The database image quota currently only allows a maximum of <!-- TMPL_VAR NAME="image_limit" --> images to be stored at any one time. Please delete one or more images to free up quota space.
90         <!-- TMPL_ELSIF NAME="401" -->
91         An error has occurred and the item(s) was not added to batch <!-- TMPL_VAR NAME="batch_id" -->. Please have your system administrator check the error log for details.
92         <!-- TMPL_ELSIF NAME="402" -->
93         The item(s) was not added because the branch is not set. Please set your branch before adding items to a batch.
94         <!-- TMPL_ELSIF NAME="403" -->
95         An error has occurred and the item(s) was not removed from batch <!-- TMPL_VAR NAME="batch_id" -->. Please have your system administrator check the error log for details.
96         <!-- TMPL_ELSIF NAME="404" -->
97         An error has occurred and batch <!-- TMPL_VAR NAME="batch_id" --> was not deleted.  Please have your system administrator check the error log for details.
98         <!-- TMPL_ELSIF NAME="405" -->
99         An error has occurred and batch <!-- TMPL_VAR NAME="batch_id" --> not fully de-duplicated.
100         <!-- TMPL_ELSE -->
101         <!-- /TMPL_IF -->
102     </span>
103     <span id="close" style="position: absolute; top: 100px; left: 175px;">
104         <input type='submit' value='Close' onClick='document.getElementById("mypopup").style.display = "none"'>
105     </span>
106 </div>
107 <!-- /TMPL_IF -->
108