View | Details | Raw Unified | Return to bug 10516
Collapse All | Expand All

(-)a/admin/z3950servers.pl (-1 / +2 lines)
Lines 104-115 if ($op eq 'add_form') { Link Here
104
################## ADD_VALIDATE ##################################
104
################## ADD_VALIDATE ##################################
105
# called by add_form, used to insert/modify data in DB
105
# called by add_form, used to insert/modify data in DB
106
} elsif ($op eq 'add_validate') {
106
} elsif ($op eq 'add_validate') {
107
	$template->param(add_validate => 1);
108
	my $dbh=C4::Context->dbh;
107
	my $dbh=C4::Context->dbh;
109
	my $sth=$dbh->prepare("select * from z3950servers where name=?");
108
	my $sth=$dbh->prepare("select * from z3950servers where name=?");
110
	$sth->execute($input->param('searchfield'));
109
	$sth->execute($input->param('searchfield'));
111
	my $checked = $input->param('checked') ? 1 : 0;
110
	my $checked = $input->param('checked') ? 1 : 0;
112
	if ($sth->rows) {
111
	if ($sth->rows) {
112
        $template->param(confirm_update => 1);
113
		$sth=$dbh->prepare("update z3950servers set host=?, port=?, db=?, userid=?, password=?, name=?, checked=?, rank=?,syntax=?,encoding=?,timeout=? where name=?");
113
		$sth=$dbh->prepare("update z3950servers set host=?, port=?, db=?, userid=?, password=?, name=?, checked=?, rank=?,syntax=?,encoding=?,timeout=? where name=?");
114
		$sth->execute($input->param('host'),
114
		$sth->execute($input->param('host'),
115
		      $input->param('port'),
115
		      $input->param('port'),
Lines 126-131 if ($op eq 'add_form') { Link Here
126
		      );
126
		      );
127
	} 
127
	} 
128
	else {
128
	else {
129
        $template->param(confirm_add => 1);
129
		$sth=$dbh->prepare(
130
		$sth=$dbh->prepare(
130
		  "INSERT INTO z3950servers " .
131
		  "INSERT INTO z3950servers " .
131
		  "(host,port,db,userid,password,name,checked,rank,syntax,encoding,timeout) " .
132
		  "(host,port,db,userid,password,name,checked,rank,syntax,encoding,timeout) " .
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt (-4 / +13 lines)
Lines 2-8 Link Here
2
<title>Koha &rsaquo; Administration &rsaquo; [% IF ( else ) %]Z39.50 servers[% END %]
2
<title>Koha &rsaquo; Administration &rsaquo; [% IF ( else ) %]Z39.50 servers[% END %]
3
[% IF ( add_form ) %] Z39.50 servers &rsaquo; [% IF ( searchfield ) %]Modify Z39.50 server [% searchfield %][% ELSE %]New Z39.50 server[% END %][% END %]
3
[% IF ( add_form ) %] Z39.50 servers &rsaquo; [% IF ( searchfield ) %]Modify Z39.50 server [% searchfield %][% ELSE %]New Z39.50 server[% END %][% END %]
4
[% IF ( delete_confirm ) %]Z39.50 servers &rsaquo; Confirm deletion[% END %]
4
[% IF ( delete_confirm ) %]Z39.50 servers &rsaquo; Confirm deletion[% END %]
5
[% IF ( add_validate ) %]Z39.50 servers &rsaquo; Z39.50 server added[% END %]
5
[% IF ( confirm_add ) %] Z39.50 servers &rsaquo; Z39.50 server added[% END %]
6
[% IF ( confirm_update ) %] Z39.50 servers &rsaquo; Z39.50 server updated[% END %]
6
[% IF ( delete_confirmed ) %]Z39.50 servers &rsaquo; Z39.50 server deleted[% END %]</title>
7
[% IF ( delete_confirmed ) %]Z39.50 servers &rsaquo; Z39.50 server deleted[% END %]</title>
7
[% INCLUDE 'doc-head-close.inc' %]
8
[% INCLUDE 'doc-head-close.inc' %]
8
[% IF ( else ) %]
9
[% IF ( else ) %]
Lines 94-100 Link Here
94
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; [% IF ( else ) %]Z39.50 servers[% END %]
95
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; [% IF ( else ) %]Z39.50 servers[% END %]
95
[% IF ( add_form ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; [% IF ( searchfield ) %]Modify Z39.50 server [% searchfield %][% ELSE %]New Z39.50 server[% END %][% END %]
96
[% IF ( add_form ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; [% IF ( searchfield ) %]Modify Z39.50 server [% searchfield %][% ELSE %]New Z39.50 server[% END %][% END %]
96
[% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; Confirm deletion[% END %]
97
[% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; Confirm deletion[% END %]
97
[% IF ( add_validate ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; Z39.50 server added[% END %]
98
[% IF ( confirm_add ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; Z39.50 server added[% END %]
99
[% IF ( confirm_update ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; Z39.50 server updated[% END %]
100
98
[% IF ( delete_confirmed ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; Z39.50 server deleted[% END %]</div>
101
[% IF ( delete_confirmed ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; Z39.50 server deleted[% END %]</div>
99
102
100
<div id="doc3" class="yui-t2">
103
<div id="doc3" class="yui-t2">
Lines 244-256 Link Here
244
        </form>
247
        </form>
245
[% END %]
248
[% END %]
246
249
247
[% IF ( add_validate ) %]
250
[% IF ( confirm_add ) %]
248
<h3>Z39.50 server added</h3>
251
<h3>Z39.50 server added</h3>
249
<form action="[% script_name %]" method="post">
252
<form action="[% script_name %]" method="post">
250
        <input type="submit" value="OK" />
253
        <input type="submit" value="OK" />
251
        </form>
254
        </form>
252
[% END %]
255
[% END %]
253
256
257
[% IF ( confirm_update ) %]
258
<h3>Z39.50 server updated</h3>
259
<form action="[% script_name %]" method="post">
260
        <input type="submit" value="OK" />
261
        </form>
262
[% END %]
263
254
[% IF ( delete_confirm ) %]
264
[% IF ( delete_confirm ) %]
255
	[% reqsel %]
265
	[% reqsel %]
256
<h3>Confirm deletion of server [% searchfield %]</h3>
266
<h3>Confirm deletion of server [% searchfield %]</h3>
257
- 

Return to bug 10516