Merge branch 'bug_9693' into 3.12-master

This commit is contained in:
Jared Camins-Esakov 2013-03-07 10:03:48 -05:00
commit fe85b19ac6

View file

@ -35,58 +35,12 @@
alert(_("Please select image(s) to ") + op + "."); alert(_("Please select image(s) to ") + op + ".");
return (-1); return (-1);
}; };
function showHideLayers(element, time, action) {
setTimeout("changeVisibility('" + element + "','" + action + "')", time)
}
function changeVisibility(element, action) {
document.getElementById(element).style.display=action;
}
</script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() { $(document).ready(function() {
$("#upload_cancel").empty(); $("#delete").click(function(){
$("#delete_cancel").empty(); return DeleteConfirm();
$("#upload").empty(); });
$("#delete").empty();
buildButtons();
showHideLayers('dialog', 5000, 'none')
}); });
//]]>
function buildButtons() {
new YAHOO.widget.Button({
type: "link",
label: _("Cancel"),
id: "cancelul",
href: "/cgi-bin/koha/patroncards/home.pl",
container: "upload_cancel"
});
new YAHOO.widget.Button({
type: "link",
label: _("Cancel"),
id: "canceldel",
href: "/cgi-bin/koha/patroncards/home.pl",
container: "delete_cancel"
});
new YAHOO.widget.Button({
type: "submit",
label: _("Upload"),
id: "uploadsb",
value: "upload",
container: "upload"
});
var deleteButton = new YAHOO.widget.Button({
type: "link",
onclick: {fn: DeleteConfirm},
label: _("Delete"),
id: "deletesb",
value: "delete",
container: "delete",
});
}
</script> </script>
</head> </head>
<body id="pcard_image-manage" class="tools pcard"> <body id="pcard_image-manage" class="tools pcard">
@ -108,9 +62,9 @@
<h1>Upload Images</h1> <h1>Upload Images</h1>
[% IF ( IMPORT_SUCCESSFUL ) %] [% IF ( IMPORT_SUCCESSFUL ) %]
<div id="dialog" class="dialog message"> <div id="dialog" class="dialog message">
<li><h3>Image successfully uploaded.</h3></li> <h3>Image successfully uploaded</h3>
<li>File: [% SOURCE_FILE %]</li> <ul><li>File: [% SOURCE_FILE %]</li>
<li>Image name: [% IMAGE_NAME %]</li> <li>Image name: [% IMAGE_NAME %]</li></ul>
</div> </div>
[% END %] [% END %]
<form name="upload_images" method="post" action="/cgi-bin/koha/patroncards/image-manage.pl" enctype="multipart/form-data"> <form name="upload_images" method="post" action="/cgi-bin/koha/patroncards/image-manage.pl" enctype="multipart/form-data">
@ -118,6 +72,7 @@
<div class="hint"> <div class="hint">
<b>NOTE:</b> Only PNG, GIF, JPEG, XPM formats are supported. Images <b>must</b> be less than 500KB. <b>NOTE:</b> Only PNG, GIF, JPEG, XPM formats are supported. Images <b>must</b> be less than 500KB.
</div> </div>
<ol>
<li> <li>
<label for="uploadfile">Select the file to upload: </label> <label for="uploadfile">Select the file to upload: </label>
<input type="file" id="uploadfile" name="uploadfile" /> <input type="file" id="uploadfile" name="uploadfile" />
@ -130,11 +85,12 @@
</div> </div>
<input type="text" id="image_name" name="image_name" size="20" /> <input type="text" id="image_name" name="image_name" size="20" />
</li> </li>
</ol>
</fieldset> </fieldset>
<fieldset class="action"> <fieldset class="action">
<input type="hidden" name="op" value="upload" /> <input type="hidden" name="op" value="upload" />
<span id="upload"><input id="uploadsu" type="submit" value="upload" class="submit" /></span> <input id="uploadsu" type="submit" value="Upload" />
<span id="upload_cancel"><a id="cancelul" href="/cgi-bin/koha/patroncards/home.pl" class="cancel">Cancel</a></span> <a id="cancelul" href="/cgi-bin/koha/patroncards/home.pl" class="cancel">Cancel</a>
</fieldset> </fieldset>
</form> </form>
</div> </div>
@ -142,7 +98,7 @@
<h1>Delete Images</h1> <h1>Delete Images</h1>
[% IF ( DELETE_SUCCESSFULL ) %] [% IF ( DELETE_SUCCESSFULL ) %]
<div id="dialog" class="dialog message"> <div id="dialog" class="dialog message">
<li><h3>Image(s) successfully deleted.</h3></li> <h3>Image(s) successfully deleted</h3>
</div> </div>
[% END %] [% END %]
[% IF ( TABLE ) %] [% IF ( TABLE ) %]
@ -151,7 +107,6 @@
<div class="hint"> <div class="hint">
Select one or more images to delete. Select one or more images to delete.
</div> </div>
<li>
<table> <table>
[% FOREACH TABL IN TABLE %] [% FOREACH TABL IN TABLE %]
[% IF ( TABL.header_fields ) %] [% IF ( TABL.header_fields ) %]
@ -175,12 +130,11 @@
[% END %] [% END %]
[% END %] [% END %]
</table> </table>
</li>
</fieldset> </fieldset>
<fieldset class="action"> <fieldset class="action">
<input type="hidden" name="op" value="delete" /> <input type="hidden" name="op" value="delete" />
<span id="delete"><input id="deletesu" type="button" id="delete" onclick="DeleteConfirm()" value="Delete image(s)" /></span> <input type="button" id="delete" value="Delete" />
<span id="delete_cancel"><a id="canceldel" href="/cgi-bin/koha/patroncards/home.pl" class="cancel">Cancel</a></span> <a id="canceldel" href="/cgi-bin/koha/patroncards/home.pl" class="cancel">Cancel</a>
</fieldset> </fieldset>
</form> </form>
[% ELSE %] [% ELSE %]