# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
use strict;
+#use warnings; FIXME - Bug 2505
use C4::Output;
use C4::Auth;
use CGI;
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => { parameters => 1 },
+ flagsrequired => { parameters => 'parameters_remaining_permissions' },
debug => 1,
}
);
while ($data =$sth->fetchrow_hashref) {
my %row_data; # get a fresh hash for the row data
+ $row_data{defaultvalue} = $data->{defaultvalue};
$row_data{tab} = CGI::scrolling_list(-name=>'tab',
-id=>"tab$i",
-values =>
$row_data{row} = $i;
push(@loop_data, \%row_data);
}
- $template->param('use-heading-flags-p' => 1);
- $template->param('heading-edit-subfields-p' => 1);
+ $template->param('use_heading_flags_p' => 1);
+ $template->param('heading_edit_subfields_p' => 1);
$template->param(action => "Edit subfields",
tagfield => $tagfield,
tagfieldinput => "<input type=\"hidden\" name=\"tagfield\" value=\"$tagfield\" />",
$template->param(tagfield => "$input->param('tagfield')");
# my $sth=$dbh->prepare("replace auth_subfield_structure (authtypecode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,seealso,authorised_value,frameworkcode,value_builder,hidden,isurl)
# values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
- my $sth_insert = $dbh->prepare("insert into auth_subfield_structure (authtypecode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,seealso,authorised_value,frameworkcode,value_builder,hidden,isurl)
- values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
- my $sth_update = $dbh->prepare("update auth_subfield_structure set authtypecode=?, tagfield=?, tagsubfield=?, liblibrarian=?, libopac=?, repeatable=?, mandatory=?, kohafield=?, tab=?, seealso=?, authorised_value=?, frameworkcode=?, value_builder=?, hidden=?, isurl=?
- where authtypecode=? and tagfield=? and tagsubfield=?");
+ my $sth_insert = $dbh->prepare("insert into auth_subfield_structure (authtypecode,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,seealso,authorised_value,frameworkcode,value_builder,hidden,isurl,defaultvalue)
+ values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
+ my $sth_update = $dbh->prepare("update auth_subfield_structure set authtypecode=?, tagfield=?, tagsubfield=?, liblibrarian=?, libopac=?, repeatable=?, mandatory=?, kohafield=?, tab=?, seealso=?, authorised_value=?, frameworkcode=?, value_builder=?, hidden=?, isurl=?, defaultvalue=?
+ where authtypecode=? and tagfield=? and tagsubfield=?");
my @tagsubfield = $input->param('tagsubfield');
my @liblibrarian = $input->param('liblibrarian');
my @libopac = $input->param('libopac');
my $authtypecode = $input->param('authtypecode');
my @frameworkcodes = $input->param('frameworkcode');
my @value_builder =$input->param('value_builder');
+ my @defaultvalue = $input->param('defaultvalue');
for (my $i=0; $i<= $#tagsubfield ; $i++) {
my $tagfield =$input->param('tagfield');
my $tagsubfield =$tagsubfield[$i];
my $authorised_value =$authorised_values[$i];
my $frameworkcode =$frameworkcodes[$i];
my $value_builder=$value_builder[$i];
+ my $defaultvalue = $defaultvalue[$i];
#my $hidden = $ohidden[$i].$ihidden[$i].$ehidden[$i]; #collate from 3 hiddens;
my $hidden = $ohidden[$i]; #collate from 3 hiddens;
my $isurl = $input->param("isurl$i")?1:0;
$value_builder,
$hidden,
$isurl,
+ $defaultvalue,
(
$authtypecode,
$tagfield,
$value_builder,
$hidden,
$isurl,
+ $defaultvalue,
);
}
}