Main Koha release repository https://koha-community.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

710 lines
34 KiB

[% USE Koha %]
[% USE raw %]
[% USE Asset %]
[% SET footerjs = 1 %]
[% USE TablesSettings %]
[%- USE KohaSpan -%]
[% INCLUDE 'doc-head-open.inc' %]
[% IF library %][% SET OpacLibraryInfo = library.opac_info( lang => lang ) %][% END %]
<title>
[% IF op == 'add_form' %]
[% IF library %]
Modify library
[% ELSE %]
New library [% library.branchcode | html %]
[% END %] &rsaquo; [% ELSIF op == 'delete_confirm' %]
Confirm deletion of library '[% library.branchcode | html %]' &rsaquo; [% END %]
Libraries &rsaquo; Administration &rsaquo; Koha
</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="admin_branches" class="admin">
[% WRAPPER 'header.inc' %]
[% INCLUDE 'prefs-admin-search.inc' %]
[% END %]
[% WRAPPER 'sub-header.inc' %]
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
<ol>
<li>
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
</li>
<li>
<a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
</li>
[% IF op == 'add_form' %]
<li>
<a href="/cgi-bin/koha/admin/branches.pl">Libraries</a>
</li>
[% IF library %]
<li>
<a href="#" aria-current="page">
Modify library
</a>
</li>
[% ELSE %]
<li>
<a href="#" aria-current="page">
New library [% library.branchcode | html %]
</a>
</li>
[% END %]
[% ELSIF op == 'delete_confirm' %]
<li>
<a href="/cgi-bin/koha/admin/branches.pl">Libraries</a>
</li>
<li>
<a href="#" aria-current="page">
Confirm deletion of library '[% library.branchcode | html %]'
</a>
</li>
[% ELSIF op == 'view' %]
<li>
<a href="/cgi-bin/koha/admin/branches.pl">Libraries</a>
</li>
<li>
<a href="#" aria-current="page">
[% library.branchname | html %]
</a>
</li>
[% ELSE %]
<li>
<a href="#" aria-current="page">
Libraries
</a>
</li>
[% END %]
</ol>
</nav>
[% END %]
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<main>
[% FOREACH m IN messages %]
<div class="dialog [% m.type | html %]">
[% SWITCH m.code %]
[% CASE 'error_on_update' %]
<span>An error occurred when updating this library. Perhaps it already exists.</span>
[% CASE 'error_on_insert' %]
<span>An error occurred when adding this library. The branchcode might already exist.</span>
[% CASE 'error_on_delete' %]
<span>An error occurred when deleting this library. Check the logs.</span>
[% CASE 'success_on_update' %]
<span>Library updated successfully.</span>
[% CASE 'success_on_insert' %]
<span>Library added successfully.</span>
[% CASE 'success_on_delete' %]
<span>Library deleted successfully.</span>
[% CASE 'cannot_delete_library' %]
<span>This library cannot be deleted. Patrons or items are still using it</span>
[% IF m.data.patrons_count and m.data.items_count %]
<span>([% m.data.patrons_count | html %] patrons and [% m.data.items_count | html %] items).</span>
[% ELSIF m.data.patrons_count %]
<span>([% m.data.patrons_count | html %] patrons).</span>
[% ELSIF m.data.items_count %]
<span>([% m.data.items_count | html %] items).</span>
[% END %]
[% CASE %]
<span>[% m.code | html %]</span>
[% END %]
</div>
[% END %]
[% IF op == 'list' || op == 'view' %]
<div id="toolbar" class="btn-toolbar">
<a class="btn btn-default" id="newbranch" href="/cgi-bin/koha/admin/branches.pl?op=add_form"><i class="fa fa-plus"></i> New library</a>
[% IF op == 'view' && library %]
<a class="btn btn-default" id="editbranch" href="/cgi-bin/koha/admin/branches.pl?op=add_form&branchcode=[% library.branchcode | uri %]"><i class="fa fa-pencil"></i> Edit library</a>
[% END %]
</div>
[% END %]
[% IF op == 'add_form' %]
<h1>[% IF library %]Modify library[% ELSE %]New library[% END %]</h1>
<form action="/cgi-bin/koha/admin/branches.pl" id="Aform" name="Aform" class="validated" method="post">
<fieldset class="rows">
<input type="hidden" name="op" value="add_validate" />
[% IF library %]
<input type="hidden" name="is_a_modif" value="1" />
[% END %]
<ol>
<li>
[% IF library %]
<span class="label">Library code: </span>
<input type="hidden" name="branchcode" value="[% library.branchcode | html %]" />
[% library.branchcode | html %]
[% ELSE %]
<label for="branchcode" class="required">Library code: </label>
<input type="text" name="branchcode" id="branchcode" size="10" maxlength="10" value="[% library.branchcode | html %]" class="required focus" required="required" />
<span class="required">Required</span>
[% END %]
</li>
<li>
<label for="branchname" class="required">Name: </label>
[% IF library %]
<input type="text" name="branchname" id="branchname" size="80" value="[% library.branchname | html %]" class="required focus" required="required" />
[% ELSE %]
<input type="text" name="branchname" id="branchname" size="80" value="[% library.branchname | html %]" class="required" required="required" />
[% END %]
<span class="required">Required</span>
</li>
</ol>
</fieldset>
[% IF categories %]
<fieldset class="rows"><legend>Group(s):</legend>
<ol>
[% FOREACH category IN categories %]
<li>
<label for="[% category.categorycode | html %]">[% category.categoryname | html %]: </label>
[% IF category and selected_categorycodes.grep(category.categorycode).size %]
<input type="checkbox" id="[% category.categorycode | html %]" name="selected_categorycode_[% category.categorycode | html %]" checked="checked" />
[% ELSE %]
<input type="checkbox" id="[% category.categorycode | html %]" name="selected_categorycode_[% category.categorycode | html %]" />
[% END %]
<div class="hint">[% category.codedescription | html %]</div>
</li>
[% END %]
</ol>
</fieldset>
[% END %]
<fieldset class="rows">
<ol>
<li><label for="branchaddress1">Address line 1: </label><input type="text" name="branchaddress1" id="branchaddress1" size="60" value="[% library.branchaddress1 | html %]" /></li>
<li><label for="branchaddress2">Address line 2: </label><input type="text" name="branchaddress2" id="branchaddress2" size="60" value="[% library.branchaddress2 | html %]" /></li>
<li><label for="branchaddress3">Address line 3: </label><input type="text" name="branchaddress3" id="branchaddress3" size="60" value="[% library.branchaddress3 | html %]" /></li>
<li><label for="branchcity">City: </label><input type="text" name="branchcity" id="branchcity" size="60" value="[% library.branchcity | html %]" /></li>
<li><label for="branchstate">State: </label><input type="text" name="branchstate" id="branchstate" size="60" value="[% library.branchstate | html %]" /></li>
<li><label for="branchzip">ZIP/Postal code: </label><input type="text" name="branchzip" id="branchzip" size="25" maxlength="25" value="[% library.branchzip | html %]" /></li>
<li><label for="branchcountry">Country: </label><input type="text" name="branchcountry" id="branchcountry" size="60" value="[% library.branchcountry | html %]" /></li>
<li><label for="branchphone">Phone: </label><input type="text" name="branchphone" id="branchphone" size="60" value="[% library.branchphone | html %]" /></li>
<li><label for="branchfax">Fax: </label><input type="text" name="branchfax" id="branchfax" size="60" value="[% library.branchfax | html %]" /></li>
<li><label for="branchemail">Email: </label><input type="text" name="branchemail" id="branchemail" class="email" size="80" value="[% library.branchemail | html %]" /></li>
[% IF (Koha.Preference('ILLModule')) %]
<li>
<label for="branchillemail">ILL staff email: </label>
<input type="text" name="branchillemail" id="branchillemail" class="email" size="80" value="[% library.branchillemail | html %]" />
<div class="hint">
[% IF ( CAN_user_parameters_manage_sysprefs ) %]
[% pref_ILLDefaultStaffEmail_link = BLOCK %]<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ILLDefaultStaffEmail">ILLDefaultStaffEmail</a>[% END %]
Default: [% pref_ILLDefaultStaffEmail_link | $raw | $KohaSpan %] system preference
[% ELSE %]
Default: ILLDefaultStaffEmail system preference
[% END %]
</div>
</li>
[% END %]
<li>
<label for="branchreplyto">Reply-To: </label>
<input type="text" name="branchreplyto" id="branchreplyto" class="email" size="80" value="[% library.branchreplyto | html %]" />
<div class="hint">
[% IF ( CAN_user_parameters_manage_sysprefs ) %]
[% pref_ReplyToDefault_link = BLOCK %]<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ReplyToDefault">ReplyToDefault</a>[% END %]
Default: [% pref_ReplyToDefault_link | $raw | $KohaSpan %] system preference
[% ELSE %]
Default: ReplyToDefault system preference
[% END %]
</div>
</li>
<li>
<label for="branchreturnpath">Return-Path: </label>
<input type="text" name="branchreturnpath" id="branchreturnpath" class="email" size="80" value="[% library.branchreturnpath | html %]" />
<div class="hint">
[% IF ( CAN_user_parameters_manage_sysprefs ) %]
[% pref_ReturnpathDefault_link = BLOCK %]<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ReturnpathDefault">ReturnpathDefault</a>[% END %]
Default: [% pref_ReturnpathDefault_link | $raw | $KohaSpan %] system preference
[% ELSE %]
Default: ReturnpathDefault system preference
[% END %]
</div>
</li>
<li><label for="smtp_server">SMTP server: </label>
<select name="smtp_server" id="smtp_server">
[% IF library AND library.smtp_server.is_system_default %]
<option value="*" selected="selected">Default</option>
[% ELSE %]
<option value="*">Default</option>
[% END %]
[% FOREACH smtp_server IN smtp_servers %]
[% IF library AND smtp_server.id == library.smtp_server.id %]
<option value="[% smtp_server.id | html %]" selected="selected">[% smtp_server.name | html %]</option>
[% ELSE %]
<option value="[% smtp_server.id | html %]">[% smtp_server.name | html %]</option>
[% END %]
[% END %]
</select>
</li>
<li><label for="branchurl">URL: </label><input type="text" name="branchurl" id="branchurl" size="80" value="[% library.branchurl | html %]" class="url" /></li>
<li><label for="opac_info">OPAC info: </label>
[% IF OpacLibraryInfo %]<!-- opac_info -->
<div>[% OpacLibraryInfo.content | $raw %]</div>
<div class="hint"><a href="/cgi-bin/koha/tools/additional-contents.pl?category=html_customizations&op=add_form&id=[% OpacLibraryInfo.id | $raw %]&editmode=wysiwyg" target="_blank">Edit HTML content</a></div>
[% ELSE %]
<a href="/cgi-bin/koha/tools/additional-contents.pl?category=html_customizations&op=add_form&editmode=wysiwyg" target="_blank">Add HTML content</a>
[% END %]
</li>
<li>
<label for="branchip">IP: </label>
<input type="text" name="branchip" id="branchip" size="15" maxlength="15" value="[% library.branchip | html %]" />
<div class="hint">Can be entered as a single IP, or a subnet such as 192.168.1.*</div>
</li>
<li>
<label for="marcorgcode">MARC organization code</label>
<input type="text" name="marcorgcode" id="marcorgcode" size="16" maxlength="16" value="[% library.marcorgcode | html %]" />
<div class="hint">
[% IF ( CAN_user_parameters_manage_sysprefs ) %]
[% pref_MARCOrgCode_link = BLOCK %]<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=MARCOrgCode">MARCOrgCode</a>[% END %]
If not filled in defaults to system preference [% pref_MARCOrgCode_link | $raw | $KohaSpan %].
[% ELSE %]
If not filled in defaults to system preference MARCOrgCode.
[% END %]
You can obtain your code from <a href="http://www.loc.gov/marc/organizations/orgshome.html" target="_blank">Library of Congress</a>.
</div>
</li>
<li><label for="branchnotes">Notes: </label><input type="text" name="branchnotes" id="branchnotes" size="80" value="[% library.branchnotes | html %]" /></li>
<li><label for="pickup_location">Pickup location: </label>
<select name="pickup_location" id="pickup_location">
[% IF !library || library.pickup_location == 1 %]
<option value="1" selected="selected">Yes</option>
<option value="0">No</option>
[% ELSE %]
<option value="1">Yes</option>
<option value="0" selected="selected">No</option>
[% END %]
</select>
</li>
<li><label for="public">Public: </label>
<select name="public" id="public">
[% IF !library || library.public == 1 %]
<option value="1" selected="selected">Yes</option>
<option value="0">No</option>
[% ELSE %]
<option value="1">Yes</option>
<option value="0" selected="selected">No</option>
[% END %]
</select>
<div class="hint">Set to 'yes' to show this library as a search option and on the Libraries page in the OPAC.</div>
</li>
</ol>
</fieldset>
<fieldset class="action">
<input type="submit" class="btn btn-primary" value="Submit" />
<a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a>
</fieldset>
</form>
[% END %]
[% IF op == 'delete_confirm' and not ( items_count or patrons_count )%]
<div class="dialog alert">
<form action="/cgi-bin/koha/admin/branches.pl" method="post">
<h1>Are you sure you want to delete [% library.branchname | html %] ([% library.branchcode | html %])?</h1>
<input type="hidden" name="op" value="delete_confirmed" />
<input type="hidden" name="branchcode" value="[% library.branchcode | html %]" />
<input type="hidden" name="branchname" value="[% library.branchname | html %]">
<button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
</form>
<form action="/cgi-bin/koha/admin/branches.pl" method="get">
<button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
</form>
</div>
[% END %]
[% IF op == 'list' %]
<h1>Libraries</h1>
[% IF libraries_count > 0 %]
<div class="page-section">
<table id="libraries">
<thead>
<tr>
<th>Name</th>
<th>Code</th>
<th>Address</th>
<th>MARC organization code</th>
<th>IP</th>
<th>Pickup location</th>
<th>Public</th>
<th>SMTP server</th>
<th data-class-name="actions noExport">Actions</th>
</tr>
</thead>
</table>
</div>
[% ELSE %]
<div class="dialog message">There are no libraries defined. <a href="/cgi-bin/koha/admin/branches.pl?op=add_form">Start defining libraries</a>.</div>
[% END %]
[% END %]
[% IF op == 'view' && library %]
<h1>[% library.branchname | html %]</h1>
<div class="center-block row page-section">
<div class="col-sm-6">
<div class="rows">
<ol>
<li>
<span class="label">Library code: </span>
[% library.branchcode | html %]
</li>
<li>
<span class="label">Name: </span>
[% library.branchname | html %]
</li>
<li>
<span class="label">Category:</span>
[% category.categoryname | html %]
</li>
<li>
<span class="label">Address line 1: </span>
[% library.branchaddress1 | html %]
</li>
<li>
<span class="label">Address line 2: </span>
[% library.branchaddress2 | html %]
</li>
<li>
<span class="label">Address line 3: </span>
[% library.branchaddress3 | html %]
</li>
<li>
<span class="label">City: </span>
[% library.branchcity | html %]
</li>
<li>
<span class="label">State: </span>
[% library.branchstate | html %]
</li>
<li>
<span class="label">ZIP/Postal code: </span>
[% library.branchzip | html %]
</li>
<li>
<span class="label">Country: </span>
[% library.branchcountry | html %]
</li>
<li>
<span class="label">Phone: </span>
[% library.branchphone | html %]
</li>
<li>
<span class="label">Fax: </span>
[% library.branchfax | html %]
</li>
</ol>
</div>
</div>
<div class="col-sm-6">
<div class="rows">
<ol>
<li>
<span class="label">Email: </span>
[% IF ( library.branchemail ) %]
<a href="mailto:[% library.branchemail | url %]">[% library.branchemail | html %]</a>
[% END %]
</li>
<li>
<span class="label">ILL staff email: </span>
[% IF ( library.branchillemail ) %]
<a href="mailto:[% library.branchillemail | url %]">[% library.branchillemail | html %]</a>
[% END %]
</li>
<li>
<span class="label">Reply-To: </span>
[% IF ( library.branchreplyto ) %]
<a href="mailto:[% library.branchreplyto | url %]">[% library.branchreplyto | html %]</a>
[% END %]
</li>
<li>
<span class="label">Return-Path: </span>
[% library.branchreturnpath | html %]
</li>
<li>
<span class="label">SMTP server: </span>
[% smtp_server.name | html %]
</li>
<li>
<span class="label">URL: </span>
[% IF ( library.branchurl ) %]
<a href="[% library.branchurl | url %]" target="_blank">[% library.branchurl | html %]</a>
[% END %]
</li>
<li>
<span class="label">IP: </span>
[% library.branchip | html %]
</li>
<li>
<span class="label">MARC organization code</span>
[% library.marcorgcode | html %]
</li>
<li>
<span class="label">Notes: </span>
[% library.branchnotes | html %]
</li>
<li>
<span class="label">Pickup location: </span>
[% IF ( library.pickup_location ) %]
<span>Yes</span>
[% ELSE %]
<span>No</span>
[% END %]
</li>
<li>
<span class="label">Public: </span>
[% IF ( library.public ) %]
<span>Yes</span>
[% ELSE %]
<span>No</span>
[% END %]
</li>
</ol>
</div> <!-- /.rows -->
</div> <!-- /.col-sm-6 -->
</div> <!-- /.row -->
[% IF OpacLibraryInfo %]<!-- opac_info -->
<div class="row page-section">
<div class="col-sm-12">
<h2>OPAC information</h2>
<div>[% OpacLibraryInfo.content | $raw %]</div>
</div>
</div>
[% END %]
[% ELSIF op == 'view' %]
<div>This library does not exist.</div>
[% END %]
</main>
</div> <!-- /.col-sm-10.col-sm-push-2 -->
<div class="col-sm-2 col-sm-pull-10">
<aside>
[% INCLUDE 'admin-menu.inc' %]
</aside>
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div> <!-- /.row -->
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/admin-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'columns_settings.inc' %]
[% Asset.js("lib/tiny_mce/tinymce.min.js") | $raw %]
[% INCLUDE 'str/tinymce_i18n.inc' %]
<script>
var table_settings = [% TablesSettings.GetTableSettings( 'admin', 'libraries', 'libraries', 'json' ) | $raw %];
var saved_table = localStorage.getItem("DataTables_libraries_/cgi-bin/koha/admin/branches.pl");
var updated_settings = get_columns_saved_state(saved_table, table_settings);
$(document).ready(function() {
var libraries_url = '/api/v1/libraries';
var libraries = $("#libraries").kohaTable({
"ajax": {
"url": libraries_url
},
'embed': [ 'smtp_server' ],
'emptyTable': '<div class="dialog message">'+_("There are no libraries defined.")+' <a href="/cgi-bin/koha/admin/branches.pl?op=add_form">'+_("Start defining libraries")+'</a>.</div>',
"stateSave": true,
"columnDefs": [ {
"targets": [0,1,3,4,7,9,10,11,12,13,14,15,16],
"render": function (data, type, row, meta) {
if ( type == 'display' ) {
if ( data != null ) {
return data.escapeHtml();
}
else {
return "";
}
}
return data;
}
} ],
"columns": [
{
"data": "name",
"searchable": true,
"orderable": true,
"render": function( data, type, row, meta ) {
return "<a href=\"/cgi-bin/koha/admin/branches.pl?op=view&branchcode=" + encodeURIComponent( row.library_id ) + "\">" + row.name.escapeHtml() + "</a>";
}
},
{
"data": "library_id",
"searchable": true,
"orderable": true
},
{
"data": function( row, type, val, meta ) {
const library_info = [];
if ( row.address1 != null ) library_info.push(row.address1.escapeHtml());
if ( row.address2 != null ) library_info.push(row.address2.escapeHtml());
if ( row.address3 != null ) library_info.push(row.address3.escapeHtml());
// geographical_location = city, state postal_code
const locations = [];
if ( row.city != null ) locations.push(row.city.escapeHtml());
if ( row.state != null ) locations.push(row.state.escapeHtml());
const geographical_location = locations.join(', ');
if ( geographical_location != '' && row.postal_code != null) {
library_info.push(geographical_location+' '+row.postal_code.escapeHtml());
}
else {
library_info.push(geographical_location);
}
if ( row.country != null ) library_info.push(row.country.escapeHtml());
if ( row.phone != null ) library_info.push(_("Ph: ") + row.phone.escapeHtml());
if ( row.fax != null ) library_info.push(_("Fax: ") + row.fax.escapeHtml());
if ( row.email != null ) library_info.push('<a href="mailto:'+encodeURIComponent(row.email)+'">'+row.email.escapeHtml()+'</a>');
if ( row.url != null ) library_info.push('<a href="'+encodeURIComponent(row.url)+'">'+row.url.escapeHtml()+'</a>');
if ( row.notes != null ) library_info.push(_("Notes")+': '+row.notes.escapeHtml());
return library_info.join('<br/>');
},
"searchable": false,
"orderable": false
},
{
"data": "marc_org_code",
"searchable": true,
"orderable": true
},
{
"data": "ip",
"searchable": true,
"orderable": true
},
{
"data": "pickup_location",
"searchable": true,
"orderable": true,
"render": function( data, type, row, meta ) {
return (data) ? _("Yes") : _("No");
}
},
{
"data": "public",
"searchable": true,
"orderable": true,
"render": function( data, type, row, meta ) {
return (data) ? _("Yes") : _("No");
}
},
{
"data": "smtp_server",
"render": function( data, type, row, meta ) {
if ( data.smtp_server_id ) {
return '<a href="/cgi-bin/koha/admin/smtp_servers.pl?op=edit_form&smtp_server_id='+encodeURIComponent(data.smtp_server_id)+'">'+data.name.escapeHtml()+'</a>';
}
else {
return _("Default");
}
},
"searchable": false,
"visible": true,
"orderable": false
},
{
"data": function( row, type, val, meta ) {
var result = '<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/branches.pl?op=add_form&amp;branchcode='+encodeURIComponent(row.library_id)+'" role="button"><i class="fa fa-pencil" aria-hidden="true"></i> '+_("Edit")+'</a>';
result += '<form action="/cgi-bin/koha/admin/branches.pl" method="post">';
result += '<input type="hidden" name="branchcode" value="'+row.library_id.escapeHtml()+'" />'+"\n";
result += '<input type="hidden" name="op" value="delete_confirm" />';
result += '<button type="submit" id="delete_library_'+row.library_id.escapeHtml()+'" class="btn btn-default btn-xs" role="button"><i class="fa fa-trash" aria-hidden="true"></i> '+_("Delete")+'</button></form>';
return result;
},
"searchable": false,
"orderable": false
},
{
"data": "address1",
"searchable": true,
"visible": false,
"orderable": false
},
{
"data": "address2",
"searchable": true,
"visible": false,
"orderable": false
},
{
"data": "address3",
"searchable": true,
"visible": false,
"orderable": false
},
{
"data": "city",
"searchable": true,
"visible": false,
"orderable": false
},
{
"data": "state",
"searchable": true,
"visible": false,
"orderable": false
},
{
"data": "postal_code",
"searchable": true,
"visible": false,
"orderable": false
},
{
"data": "country",
"searchable": true,
"visible": false,
"orderable": false
},
{
"data": function( row, type, val, meta ) {
return ''; // provisional placeholder for opac_info
},
"searchable": false,
"visible": false,
"orderable": false
},
{
"data": "notes",
"searchable": true,
"visible": false,
"orderable": false
}
]
}, updated_settings);
[% UNLESS library %]
$("#Aform").on("submit", function( event ) {
if ( $("#branchcode").val().match(/\s/) ) {
event.preventDefault();
alert(_("The library code entered contains whitespace characters. Please remove any whitespace characters from the library code"));
return false;
} else {
return true;
}
});
[% END %]
});
tinyMCE.init({
branding : false,
relative_urls : false,
content_css : "[% interface | html %]/[% theme | html %]/css/tinymce.css",
menubar : "file edit view insert format tools table",
mode : "specific_textareas",
plugins : "autoresize table hr link image charmap lists code emoticons",
toolbar : [
"formatselect | bold italic | cut copy paste | alignleft aligncenter alignright | outdent indent | image link unlink anchor cleanup hr",
"table | bullist numlist | undo redo | removeformat | emoticons charmap | forecolor backcolor | code"
],
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]