d08d9e3fb7
Adding New Systempreference AddPatronLists This systempreference allow administrator to choose if patrons are created on categorycode lists or category_type ones. Overloading GetBorrowerCategory so that if no parameter provided, it returns the list of category records Changing memberentry.pl in order to use the categorycode when provided. Bug Fixing Circulation.pl so that doesnot come up with Error 500 with no category selected for GetBorrowerCategory Signed-off-by: Joshua Ferraro <jmf@liblime.com>
52 lines
1.7 KiB
PHP
52 lines
1.7 KiB
PHP
<div id="toolbar">
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
|
|
// prepare DOM for YUI Toolbar
|
|
|
|
$(document).ready(function() {
|
|
<!--TMPL_IF Name="AddPatronLists_categorycode"-->
|
|
<!--TMPL_ELSE-->
|
|
$("#addchild").parent().remove();
|
|
$("#addprofessional").parent().remove();
|
|
$("#addorganisation").parent().remove();
|
|
$("#addstaff").parent().remove();
|
|
$("#addstatistical").parent().remove();
|
|
<!--/TMPL_IF-->
|
|
$("#newmenuc").empty();
|
|
yuiToolbar();
|
|
});
|
|
|
|
// YUI Toolbar Functions
|
|
|
|
function yuiToolbar() {
|
|
|
|
var newmenu = [
|
|
<!--TMPL_IF Name="AddPatronLists_categorycode"-->
|
|
<!--TMPL_LOOP Name="categories"-->{ text: "<!--TMPL_VAR Name="description"-->", url: "/cgi-bin/koha/members/memberentry.pl?op=add&categorycode=<!--TMPL_VAR Name="categorycode"-->" },<!--/TMPL_LOOP-->
|
|
<!--TMPL_ELSE-->
|
|
{ text: _("Adult Patron"), url: "/cgi-bin/koha/members/memberentry.pl?op=add&category_type=A" },
|
|
{ text: _("Child Patron"), url: "/cgi-bin/koha/members/memberentry.pl?op=add&category_type=C" },
|
|
{ text: _("Professional Patron"), url: "/cgi-bin/koha/members/memberentry.pl?op=add&category_type=P" },
|
|
{ text: _("Organisation"), url: "/cgi-bin/koha/members/memberentry.pl?op=add&category_type=I" },
|
|
{ text: _("Staff"), url: "/cgi-bin/koha/members/memberentry.pl?op=add&category_type=S" },
|
|
{ text: _("Statistical"), url: "/cgi-bin/koha/members/memberentry.pl?op=add&category_type=X" },
|
|
<!--/TMPL_IF-->
|
|
]
|
|
|
|
new YAHOO.widget.Button({
|
|
type: "menu",
|
|
label: _("New"),
|
|
name: "newmenubutton",
|
|
menu: newmenu,
|
|
container: "newmenuc"
|
|
});
|
|
|
|
}
|
|
|
|
//]]>
|
|
</script>
|
|
<ul class="toolbar">
|
|
<li id="newmenuc"></li>
|
|
</ul>
|
|
</div>
|