Lines 89-95
if ($op eq 'add_form') {
Link Here
|
89 |
#---- if primkey exists, it's a modify action, so read values to modify... |
89 |
#---- if primkey exists, it's a modify action, so read values to modify... |
90 |
my $data; |
90 |
my $data; |
91 |
if ($searchfield) { |
91 |
if ($searchfield) { |
92 |
$sth=$dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,ind1_defaultvalue,ind2_defaultvalue from marc_tag_structure where tagfield=? and frameworkcode=?"); |
92 |
$sth=$dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,important,ind1_defaultvalue,ind2_defaultvalue from marc_tag_structure where tagfield=? and frameworkcode=?"); |
93 |
$sth->execute($searchfield,$frameworkcode); |
93 |
$sth->execute($searchfield,$frameworkcode); |
94 |
$data=$sth->fetchrow_hashref; |
94 |
$data=$sth->fetchrow_hashref; |
95 |
} |
95 |
} |
Lines 108-113
if ($op eq 'add_form') {
Link Here
|
108 |
repeatable => $data->{'repeatable'}, |
108 |
repeatable => $data->{'repeatable'}, |
109 |
mandatory => $data->{'mandatory'}, |
109 |
mandatory => $data->{'mandatory'}, |
110 |
authorised_value => $data->{authorised_value}, |
110 |
authorised_value => $data->{authorised_value}, |
|
|
111 |
important => $data->{'important'}, |
111 |
ind1_defaultvalue => $data->{'ind1_defaultvalue'}, |
112 |
ind1_defaultvalue => $data->{'ind1_defaultvalue'}, |
112 |
ind2_defaultvalue => $data->{'ind2_defaultvalue'}, |
113 |
ind2_defaultvalue => $data->{'ind2_defaultvalue'}, |
113 |
frameworkcode => $frameworkcode, |
114 |
frameworkcode => $frameworkcode, |
Lines 121-137
if ($op eq 'add_form') {
Link Here
|
121 |
my $libopac = $input->param('libopac'); |
122 |
my $libopac = $input->param('libopac'); |
122 |
my $repeatable = $input->param('repeatable') ? 1 : 0; |
123 |
my $repeatable = $input->param('repeatable') ? 1 : 0; |
123 |
my $mandatory = $input->param('mandatory') ? 1 : 0; |
124 |
my $mandatory = $input->param('mandatory') ? 1 : 0; |
|
|
125 |
my $important = $input->param('important') ? 1 : 0; |
124 |
my $authorised_value = $input->param('authorised_value'); |
126 |
my $authorised_value = $input->param('authorised_value'); |
125 |
my $ind1_defaultvalue = $input->param('ind1_defaultvalue'); |
127 |
my $ind1_defaultvalue = $input->param('ind1_defaultvalue'); |
126 |
my $ind2_defaultvalue = $input->param('ind2_defaultvalue'); |
128 |
my $ind2_defaultvalue = $input->param('ind2_defaultvalue'); |
127 |
if ($input->param('modif')) { |
129 |
if ($input->param('modif')) { |
128 |
$sth = $dbh->prepare( |
130 |
$sth = $dbh->prepare( |
129 |
"UPDATE marc_tag_structure SET liblibrarian=? ,libopac=? ,repeatable=? ,mandatory=? ,authorised_value=?, ind1_defaultvalue=?, ind2_defaultvalue=? WHERE frameworkcode=? AND tagfield=?" |
131 |
"UPDATE marc_tag_structure SET liblibrarian=? ,libopac=? ,repeatable=? ,mandatory=? ,important=? ,authorised_value=?, ind1_defaultvalue=?, ind2_defaultvalue=? WHERE frameworkcode=? AND tagfield=?" |
130 |
); |
132 |
); |
131 |
$sth->execute( $liblibrarian, |
133 |
$sth->execute( $liblibrarian, |
132 |
$libopac, |
134 |
$libopac, |
133 |
$repeatable, |
135 |
$repeatable, |
134 |
$mandatory, |
136 |
$mandatory, |
|
|
137 |
$important, |
135 |
$authorised_value, |
138 |
$authorised_value, |
136 |
$ind1_defaultvalue, |
139 |
$ind1_defaultvalue, |
137 |
$ind2_defaultvalue, |
140 |
$ind2_defaultvalue, |
Lines 140-152
if ($op eq 'add_form') {
Link Here
|
140 |
); |
143 |
); |
141 |
} else { |
144 |
} else { |
142 |
$sth = $dbh->prepare( |
145 |
$sth = $dbh->prepare( |
143 |
"INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,ind1_defaultvalue,ind2_defaultvalue,frameworkcode) values (?,?,?,?,?,?,?,?,?)" |
146 |
"INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,important,authorised_value,ind1_defaultvalue,ind2_defaultvalue,frameworkcode) values (?,?,?,?,?,?,?,?,?,?)" |
144 |
); |
147 |
); |
145 |
$sth->execute($tagfield, |
148 |
$sth->execute($tagfield, |
146 |
$liblibrarian, |
149 |
$liblibrarian, |
147 |
$libopac, |
150 |
$libopac, |
148 |
$repeatable, |
151 |
$repeatable, |
149 |
$mandatory, |
152 |
$mandatory, |
|
|
153 |
$important, |
150 |
$authorised_value, |
154 |
$authorised_value, |
151 |
$ind1_defaultvalue, |
155 |
$ind1_defaultvalue, |
152 |
$ind2_defaultvalue, |
156 |
$ind2_defaultvalue, |
Lines 222-227
if ($op eq 'add_form') {
Link Here
|
222 |
marc_tag_structure.libopac as mts_libopac, |
226 |
marc_tag_structure.libopac as mts_libopac, |
223 |
marc_tag_structure.repeatable as mts_repeatable, |
227 |
marc_tag_structure.repeatable as mts_repeatable, |
224 |
marc_tag_structure.mandatory as mts_mandatory, |
228 |
marc_tag_structure.mandatory as mts_mandatory, |
|
|
229 |
marc_tag_structure.important as mts_important, |
225 |
marc_tag_structure.authorised_value as mts_authorized_value, |
230 |
marc_tag_structure.authorised_value as mts_authorized_value, |
226 |
marc_tag_structure.ind1_defaultvalue as mts_ind1_defaultvalue, |
231 |
marc_tag_structure.ind1_defaultvalue as mts_ind1_defaultvalue, |
227 |
marc_tag_structure.ind1_defaultvalue as mts_ind2_defaultvalue, |
232 |
marc_tag_structure.ind1_defaultvalue as mts_ind2_defaultvalue, |
Lines 245-250
if ($op eq 'add_form') {
Link Here
|
245 |
$row_data{liblibrarian} = $results[$i]->{'mts_liblibrarian'}; |
250 |
$row_data{liblibrarian} = $results[$i]->{'mts_liblibrarian'}; |
246 |
$row_data{repeatable} = $results[$i]->{'mts_repeatable'}; |
251 |
$row_data{repeatable} = $results[$i]->{'mts_repeatable'}; |
247 |
$row_data{mandatory} = $results[$i]->{'mts_mandatory'}; |
252 |
$row_data{mandatory} = $results[$i]->{'mts_mandatory'}; |
|
|
253 |
$row_data{important} = $results[$i]->{'mts_important'}; |
248 |
$row_data{authorised_value} = $results[$i]->{'mts_authorised_value'}; |
254 |
$row_data{authorised_value} = $results[$i]->{'mts_authorised_value'}; |
249 |
$row_data{ind1_defaultvalue} = $results[$i]->{'mts_ind1_defaultvalue'}; |
255 |
$row_data{ind1_defaultvalue} = $results[$i]->{'mts_ind1_defaultvalue'}; |
250 |
$row_data{ind2_defaultvalue} = $results[$i]->{'mts_ind2_defaultvalue'}; |
256 |
$row_data{ind2_defaultvalue} = $results[$i]->{'mts_ind2_defaultvalue'}; |
Lines 260-265
if ($op eq 'add_form') {
Link Here
|
260 |
$subfield_data{kohafield} = $results[$j]->{'kohafield'}; |
266 |
$subfield_data{kohafield} = $results[$j]->{'kohafield'}; |
261 |
$subfield_data{repeatable} = $results[$j]->{'repeatable'}; |
267 |
$subfield_data{repeatable} = $results[$j]->{'repeatable'}; |
262 |
$subfield_data{mandatory} = $results[$j]->{'mandatory'}; |
268 |
$subfield_data{mandatory} = $results[$j]->{'mandatory'}; |
|
|
269 |
$subfield_data{important} = $results[$j]->{'important'}; |
263 |
$subfield_data{tab} = $results[$j]->{'tab'}; |
270 |
$subfield_data{tab} = $results[$j]->{'tab'}; |
264 |
$subfield_data{seealso} = $results[$j]->{'seealso'}; |
271 |
$subfield_data{seealso} = $results[$j]->{'seealso'}; |
265 |
$subfield_data{authorised_value} = $results[$j]->{'authorised_value'}; |
272 |
$subfield_data{authorised_value} = $results[$j]->{'authorised_value'}; |
Lines 292-297
if ($op eq 'add_form') {
Link Here
|
292 |
$row_data{liblibrarian} = $results->[$i]{'liblibrarian'}; |
299 |
$row_data{liblibrarian} = $results->[$i]{'liblibrarian'}; |
293 |
$row_data{repeatable} = $results->[$i]{'repeatable'}; |
300 |
$row_data{repeatable} = $results->[$i]{'repeatable'}; |
294 |
$row_data{mandatory} = $results->[$i]{'mandatory'}; |
301 |
$row_data{mandatory} = $results->[$i]{'mandatory'}; |
|
|
302 |
$row_data{important} = $results->[$i]{'important'}; |
295 |
$row_data{authorised_value} = $results->[$i]{'authorised_value'}; |
303 |
$row_data{authorised_value} = $results->[$i]{'authorised_value'}; |
296 |
$row_data{ind1_defaultvalue} = $results->[$i]{'ind1_defaultvalue'}; |
304 |
$row_data{ind1_defaultvalue} = $results->[$i]{'ind1_defaultvalue'}; |
297 |
$row_data{ind2_defaultvalue} = $results->[$i]{'ind2_defaultvalue'}; |
305 |
$row_data{ind2_defaultvalue} = $results->[$i]{'ind2_defaultvalue'}; |
Lines 327-333
output_html_with_http_headers $input, $cookie, $template->output;
Link Here
|
327 |
sub StringSearch { |
335 |
sub StringSearch { |
328 |
my ($searchstring,$frameworkcode)=@_; |
336 |
my ($searchstring,$frameworkcode)=@_; |
329 |
my $sth = C4::Context->dbh->prepare(" |
337 |
my $sth = C4::Context->dbh->prepare(" |
330 |
SELECT tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,ind1_defaultvalue,ind2_defaultvalue |
338 |
SELECT tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,important,ind1_defaultvalue,ind2_defaultvalue |
331 |
FROM marc_tag_structure |
339 |
FROM marc_tag_structure |
332 |
WHERE (tagfield >= ? and frameworkcode=?) |
340 |
WHERE (tagfield >= ? and frameworkcode=?) |
333 |
ORDER BY tagfield |
341 |
ORDER BY tagfield |