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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod.tt (+14 lines)
Lines 43-53 Link Here
43
                                </ol>
43
                                </ol>
44
                            </fieldset>
44
                            </fieldset>
45
                            <input type="hidden" name="op" value="show" />
45
                            <input type="hidden" name="op" value="show" />
46
47
                            <fieldset class="rows">
48
                                <legend>Use default values</legend>
49
                                <ol class="radio">
50
                                    <li>
51
                                        <label>
52
                                            <input type="checkbox" name="use_default_values" id="use_default_values" />
53
                                            Populate fields with default values from default framework
54
                                        </label>
55
                                    </li>
56
                                </ol>
57
                            </fieldset>
58
46
                            [% IF ( del ) %]<input type="hidden" name="del" value="1" />[% END %]
59
                            [% IF ( del ) %]<input type="hidden" name="del" value="1" />[% END %]
47
                            <fieldset class="action">
60
                            <fieldset class="action">
48
                                <input type="submit" value="Continue" class="button" />
61
                                <input type="submit" value="Continue" class="button" />
49
				<a class="cancel" href="/cgi-bin/koha/tools/tools-home.pl">Cancel</a>
62
				<a class="cancel" href="/cgi-bin/koha/tools/tools-home.pl">Cancel</a>
50
                            </fieldset>
63
                            </fieldset>
64
51
                        </form>
65
                        </form>
52
                    </div>
66
                    </div>
53
		    </div>
67
		    </div>
(-)a/tools/batchMod.pl (-5 / +3 lines)
Lines 47-53 my $del_records = $input->param('del_records'); Link Here
47
my $completedJobID = $input->param('completedJobID');
47
my $completedJobID = $input->param('completedJobID');
48
my $runinbackground = $input->param('runinbackground');
48
my $runinbackground = $input->param('runinbackground');
49
my $src          = $input->param('src');
49
my $src          = $input->param('src');
50
50
my $use_default_values = $input->param('use_default_values');
51
51
52
my $template_name;
52
my $template_name;
53
my $template_flag;
53
my $template_flag;
Lines 78-85 my $itemrecord; Link Here
78
my $nextop="";
78
my $nextop="";
79
my @errors; # store errors found while checking data BEFORE saving item.
79
my @errors; # store errors found while checking data BEFORE saving item.
80
my $items_display_hashref;
80
my $items_display_hashref;
81
my $frameworkcode="";
81
my $tagslib = &GetMarcStructure(1);
82
my $tagslib = &GetMarcStructure(1,$frameworkcode);
83
82
84
my $deleted_items = 0;     # Number of deleted items
83
my $deleted_items = 0;     # Number of deleted items
85
my $deleted_records = 0;   # Number of deleted records ( with no items attached )
84
my $deleted_records = 0;   # Number of deleted records ( with no items attached )
Lines 309-315 foreach my $tag (sort keys %{$tagslib}) { Link Here
309
	$subfield_data{repeatable} = $tagslib->{$tag}->{$subfield}->{repeatable};
308
	$subfield_data{repeatable} = $tagslib->{$tag}->{$subfield}->{repeatable};
310
	my ($x,$value);
309
	my ($x,$value);
311
	$value =~ s/"/&quot;/g;
310
	$value =~ s/"/&quot;/g;
312
	unless ($value) {
311
   if ( !$value && $use_default_values) {
313
	    $value = $tagslib->{$tag}->{$subfield}->{defaultvalue};
312
	    $value = $tagslib->{$tag}->{$subfield}->{defaultvalue};
314
	    # get today date & replace YYYY, MM, DD if provided in the default value
313
	    # get today date & replace YYYY, MM, DD if provided in the default value
315
	    my ( $year, $month, $day ) = split ',', $today_iso;     # FIXME: iso dates don't have commas!
314
	    my ( $year, $month, $day ) = split ',', $today_iso;     # FIXME: iso dates don't have commas!
316
- 

Return to bug 9533