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

(-)a/admin/aqbookfund.pl (-3 / +2 lines)
Lines 126-132 if ($op eq 'add_form') { Link Here
126
elsif ($op eq 'add_validate') {
126
elsif ($op eq 'add_validate') {
127
    my $bookfundname = $input->param('bookfundname');
127
    my $bookfundname = $input->param('bookfundname');
128
    my $branchcode   = $input->param('branchcode') || undef;
128
    my $branchcode   = $input->param('branchcode') || undef;
129
    my $number = Countbookfund($bookfundid,$branchcodeid);
129
    my $number = Countbookfund($bookfundid);
130
    if ($number == 0 ) {
130
    if ($number == 0 ) {
131
        NewBookFund(
131
        NewBookFund(
132
            $bookfundid,
132
            $bookfundid,
Lines 134-141 elsif ($op eq 'add_validate') { Link Here
134
            $input->param('branchcode')||''
134
            $input->param('branchcode')||''
135
        );
135
        );
136
    }
136
    }
137
    print $input->redirect('aqbookfund.pl');    # FIXME: unnecessary redirect
137
    $template->param(error_bookfundid_exist   => $number);
138
    exit;
139
# END $OP eq ADD_VALIDATE
138
# END $OP eq ADD_VALIDATE
140
}
139
}
141
140
(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (+4 lines)
Lines 1670-1672 span.permissiondesc { Link Here
1670
	color: black;
1670
	color: black;
1671
}
1671
}
1672
1672
1673
.error-adding-fund {
1674
    color: red;
1675
}
1676
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbookfund.tmpl (-5 / +12 lines)
Lines 152-161 Link Here
152
<!-- /TMPL_IF --> <!-- add_form -->
152
<!-- /TMPL_IF --> <!-- add_form -->
153
153
154
<!-- TMPL_IF name="add_validate" -->
154
<!-- TMPL_IF name="add_validate" -->
155
<h3>Fund added</h3>
155
    <!-- TMPL_UNLESS NAME="error_bookfundid_exist" -->
156
<p>
156
    <h3>Fund added</h3>
157
  <a href="<!-- TMPL_VAR name="action" -->">Return to fund list</a>
157
    <p>
158
</p>
158
        <a href="<!-- TMPL_VAR name="action" -->">Return to fund list</a>
159
    </p>
160
    <!-- TMPL_ELSE -->
161
    <h3>Cannot adding this fund</h3>
162
    <p class="error-adding-fund">This fund code already exist and can't be added</p>
163
    <p>
164
        <a href="<!-- TMPL_VAR name="action" -->">Return to fund list</a>
165
    </p>
166
    <!-- /TMPL_UNLESS -->
159
<!-- TMPL_ELSIF name="mod_validate" -->
167
<!-- TMPL_ELSIF name="mod_validate" -->
160
<h3>Fund modified</h3>
168
<h3>Fund modified</h3>
161
<p>
169
<p>
162
- 

Return to bug 4531