|
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,important,authorised_value,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 107-112
if ($op eq 'add_form') {
Link Here
|
| 107 |
libopac => $data->{'libopac'}, |
107 |
libopac => $data->{'libopac'}, |
| 108 |
repeatable => $data->{'repeatable'}, |
108 |
repeatable => $data->{'repeatable'}, |
| 109 |
mandatory => $data->{'mandatory'}, |
109 |
mandatory => $data->{'mandatory'}, |
|
|
110 |
important => $data->{'important'}, |
| 110 |
authorised_value => $data->{authorised_value}, |
111 |
authorised_value => $data->{authorised_value}, |
| 111 |
ind1_defaultvalue => $data->{'ind1_defaultvalue'}, |
112 |
ind1_defaultvalue => $data->{'ind1_defaultvalue'}, |
| 112 |
ind2_defaultvalue => $data->{'ind2_defaultvalue'} |
113 |
ind2_defaultvalue => $data->{'ind2_defaultvalue'} |
|
Lines 120-136
if ($op eq 'add_form') {
Link Here
|
| 120 |
my $libopac = $input->param('libopac'); |
121 |
my $libopac = $input->param('libopac'); |
| 121 |
my $repeatable = $input->param('repeatable') ? 1 : 0; |
122 |
my $repeatable = $input->param('repeatable') ? 1 : 0; |
| 122 |
my $mandatory = $input->param('mandatory') ? 1 : 0; |
123 |
my $mandatory = $input->param('mandatory') ? 1 : 0; |
|
|
124 |
my $important = $input->param('important') ? 1 : 0; |
| 123 |
my $authorised_value = $input->param('authorised_value'); |
125 |
my $authorised_value = $input->param('authorised_value'); |
| 124 |
my $ind1_defaultvalue = $input->param('ind1_defaultvalue'); |
126 |
my $ind1_defaultvalue = $input->param('ind1_defaultvalue'); |
| 125 |
my $ind2_defaultvalue = $input->param('ind2_defaultvalue'); |
127 |
my $ind2_defaultvalue = $input->param('ind2_defaultvalue'); |
| 126 |
if ($input->param('modif')) { |
128 |
if ($input->param('modif')) { |
| 127 |
$sth = $dbh->prepare( |
129 |
$sth = $dbh->prepare( |
| 128 |
"UPDATE marc_tag_structure SET liblibrarian=? ,libopac=? ,repeatable=? ,mandatory=? ,authorised_value=?, ind1_defaultvalue=?, ind2_defaultvalue=? WHERE frameworkcode=? AND tagfield=?" |
130 |
"UPDATE marc_tag_structure SET liblibrarian=? ,libopac=? ,repeatable=? ,mandatory=? ,important=? ,authorised_value=?, ind1_defaultvalue=?, ind2_defaultvalue=? WHERE frameworkcode=? AND tagfield=?" |
| 129 |
); |
131 |
); |
| 130 |
$sth->execute( $liblibrarian, |
132 |
$sth->execute( $liblibrarian, |
| 131 |
$libopac, |
133 |
$libopac, |
| 132 |
$repeatable, |
134 |
$repeatable, |
| 133 |
$mandatory, |
135 |
$mandatory, |
|
|
136 |
$important, |
| 134 |
$authorised_value, |
137 |
$authorised_value, |
| 135 |
$ind1_defaultvalue, |
138 |
$ind1_defaultvalue, |
| 136 |
$ind2_defaultvalue, |
139 |
$ind2_defaultvalue, |
|
Lines 139-151
if ($op eq 'add_form') {
Link Here
|
| 139 |
); |
142 |
); |
| 140 |
} else { |
143 |
} else { |
| 141 |
$sth = $dbh->prepare( |
144 |
$sth = $dbh->prepare( |
| 142 |
"INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,ind1_defaultvalue,ind2_defaultvalue,frameworkcode) values (?,?,?,?,?,?,?,?,?)" |
145 |
"INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,important,authorised_value,ind1_defaultvalue,ind2_defaultvalue,frameworkcode) values (?,?,?,?,?,?,?,?,?,?)" |
| 143 |
); |
146 |
); |
| 144 |
$sth->execute($tagfield, |
147 |
$sth->execute($tagfield, |
| 145 |
$liblibrarian, |
148 |
$liblibrarian, |
| 146 |
$libopac, |
149 |
$libopac, |
| 147 |
$repeatable, |
150 |
$repeatable, |
| 148 |
$mandatory, |
151 |
$mandatory, |
|
|
152 |
$important, |
| 149 |
$authorised_value, |
153 |
$authorised_value, |
| 150 |
$ind1_defaultvalue, |
154 |
$ind1_defaultvalue, |
| 151 |
$ind2_defaultvalue, |
155 |
$ind2_defaultvalue, |
|
Lines 216-221
if ($op eq 'add_form') {
Link Here
|
| 216 |
marc_tag_structure.libopac as mts_libopac, |
220 |
marc_tag_structure.libopac as mts_libopac, |
| 217 |
marc_tag_structure.repeatable as mts_repeatable, |
221 |
marc_tag_structure.repeatable as mts_repeatable, |
| 218 |
marc_tag_structure.mandatory as mts_mandatory, |
222 |
marc_tag_structure.mandatory as mts_mandatory, |
|
|
223 |
marc_tag_structure.important as mts_important, |
| 219 |
marc_tag_structure.authorised_value as mts_authorized_value, |
224 |
marc_tag_structure.authorised_value as mts_authorized_value, |
| 220 |
marc_tag_structure.ind1_defaultvalue as mts_ind1_defaultvalue, |
225 |
marc_tag_structure.ind1_defaultvalue as mts_ind1_defaultvalue, |
| 221 |
marc_tag_structure.ind1_defaultvalue as mts_ind2_defaultvalue, |
226 |
marc_tag_structure.ind1_defaultvalue as mts_ind2_defaultvalue, |
|
Lines 239-244
if ($op eq 'add_form') {
Link Here
|
| 239 |
$row_data{liblibrarian} = $results[$i]->{'mts_liblibrarian'}; |
244 |
$row_data{liblibrarian} = $results[$i]->{'mts_liblibrarian'}; |
| 240 |
$row_data{repeatable} = $results[$i]->{'mts_repeatable'}; |
245 |
$row_data{repeatable} = $results[$i]->{'mts_repeatable'}; |
| 241 |
$row_data{mandatory} = $results[$i]->{'mts_mandatory'}; |
246 |
$row_data{mandatory} = $results[$i]->{'mts_mandatory'}; |
|
|
247 |
$row_data{important} = $results[$i]->{'mts_important'}; |
| 242 |
$row_data{authorised_value} = $results[$i]->{'mts_authorised_value'}; |
248 |
$row_data{authorised_value} = $results[$i]->{'mts_authorised_value'}; |
| 243 |
$row_data{ind1_defaultvalue} = $results[$i]->{'mts_ind1_defaultvalue'}; |
249 |
$row_data{ind1_defaultvalue} = $results[$i]->{'mts_ind1_defaultvalue'}; |
| 244 |
$row_data{ind2_defaultvalue} = $results[$i]->{'mts_ind2_defaultvalue'}; |
250 |
$row_data{ind2_defaultvalue} = $results[$i]->{'mts_ind2_defaultvalue'}; |
|
Lines 251-256
if ($op eq 'add_form') {
Link Here
|
| 251 |
$subfield_data{kohafield} = $results[$j]->{'kohafield'}; |
257 |
$subfield_data{kohafield} = $results[$j]->{'kohafield'}; |
| 252 |
$subfield_data{repeatable} = $results[$j]->{'repeatable'}; |
258 |
$subfield_data{repeatable} = $results[$j]->{'repeatable'}; |
| 253 |
$subfield_data{mandatory} = $results[$j]->{'mandatory'}; |
259 |
$subfield_data{mandatory} = $results[$j]->{'mandatory'}; |
|
|
260 |
$subfield_data{important} = $results[$j]->{'important'}; |
| 254 |
$subfield_data{tab} = $results[$j]->{'tab'}; |
261 |
$subfield_data{tab} = $results[$j]->{'tab'}; |
| 255 |
$subfield_data{seealso} = $results[$j]->{'seealso'}; |
262 |
$subfield_data{seealso} = $results[$j]->{'seealso'}; |
| 256 |
$subfield_data{authorised_value} = $results[$j]->{'authorised_value'}; |
263 |
$subfield_data{authorised_value} = $results[$j]->{'authorised_value'}; |
|
Lines 283-288
if ($op eq 'add_form') {
Link Here
|
| 283 |
$row_data{liblibrarian} = $results->[$i]{'liblibrarian'}; |
290 |
$row_data{liblibrarian} = $results->[$i]{'liblibrarian'}; |
| 284 |
$row_data{repeatable} = $results->[$i]{'repeatable'}; |
291 |
$row_data{repeatable} = $results->[$i]{'repeatable'}; |
| 285 |
$row_data{mandatory} = $results->[$i]{'mandatory'}; |
292 |
$row_data{mandatory} = $results->[$i]{'mandatory'}; |
|
|
293 |
$row_data{important} = $results->[$i]{'important'}; |
| 286 |
$row_data{authorised_value} = $results->[$i]{'authorised_value'}; |
294 |
$row_data{authorised_value} = $results->[$i]{'authorised_value'}; |
| 287 |
$row_data{ind1_defaultvalue} = $results->[$i]{'ind1_defaultvalue'}; |
295 |
$row_data{ind1_defaultvalue} = $results->[$i]{'ind1_defaultvalue'}; |
| 288 |
$row_data{ind2_defaultvalue} = $results->[$i]{'ind2_defaultvalue'}; |
296 |
$row_data{ind2_defaultvalue} = $results->[$i]{'ind2_defaultvalue'}; |
|
Lines 313-319
output_html_with_http_headers $input, $cookie, $template->output;
Link Here
|
| 313 |
sub StringSearch { |
321 |
sub StringSearch { |
| 314 |
my ($searchstring,$frameworkcode)=@_; |
322 |
my ($searchstring,$frameworkcode)=@_; |
| 315 |
my $sth = C4::Context->dbh->prepare(" |
323 |
my $sth = C4::Context->dbh->prepare(" |
| 316 |
SELECT tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,ind1_defaultvalue,ind2_defaultvalue |
324 |
SELECT tagfield,liblibrarian,libopac,repeatable,mandatory,important,authorised_value,ind1_defaultvalue,ind2_defaultvalue |
| 317 |
FROM marc_tag_structure |
325 |
FROM marc_tag_structure |
| 318 |
WHERE (tagfield >= ? and frameworkcode=?) |
326 |
WHERE (tagfield >= ? and frameworkcode=?) |
| 319 |
ORDER BY tagfield |
327 |
ORDER BY tagfield |