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

(-)a/installer/data/mysql/atomicupdate/bug-8643-add_important_constraint.sql (-1 / +1 lines)
Lines 4-10 ALTER TABLE marc_tag_structure ADD COLUMN important TINYINT(4) NOT NULL DEFAULT Link Here
4
-- $DBversion = "3.23.00.XXX";
4
-- $DBversion = "3.23.00.XXX";
5
-- if ( CheckVersion($DBversion) ) {
5
-- if ( CheckVersion($DBversion) ) {
6
--     $dbh->do("ALTER TABLE marc_subfield_structure ADD COLUMN important TINYINT(4) NOT NULL DEFAULT 0  AFTER mandatory");
6
--     $dbh->do("ALTER TABLE marc_subfield_structure ADD COLUMN important TINYINT(4) NOT NULL DEFAULT 0  AFTER mandatory");
7
--     $dbh->do("ALTER TABLE marc_tag_structure ADD COLUMN important TINYINT(4) NOT NULL DEFAULT 0  AFTER frameworkcode");
7
--     $dbh->do("ALTER TABLE marc_tag_structure ADD COLUMN important TINYINT(4) NOT NULL DEFAULT 0  AFTER mandatory");
8
--     print "Upgrade to $DBversion done (Bug 8643 - Add important constraint to marc subfields)\n";
8
--     print "Upgrade to $DBversion done (Bug 8643 - Add important constraint to marc subfields)\n";
9
--     SetVersion($DBversion);
9
--     SetVersion($DBversion);
10
-- }
10
-- }
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 1141-1151 CREATE TABLE `marc_tag_structure` ( Link Here
1141
  `libopac` varchar(255) NOT NULL default '',
1141
  `libopac` varchar(255) NOT NULL default '',
1142
  `repeatable` tinyint(4) NOT NULL default 0,
1142
  `repeatable` tinyint(4) NOT NULL default 0,
1143
  `mandatory` tinyint(4) NOT NULL default 0,
1143
  `mandatory` tinyint(4) NOT NULL default 0,
1144
  `important` tinyint(4) NOT NULL DEFAULT '0',
1144
  `authorised_value` varchar(10) default NULL,
1145
  `authorised_value` varchar(10) default NULL,
1145
  `ind1_defaultvalue` varchar(1) NOT NULL default '',
1146
  `ind1_defaultvalue` varchar(1) NOT NULL default '',
1146
  `ind2_defaultvalue` varchar(1) NOT NULL default '',
1147
  `ind2_defaultvalue` varchar(1) NOT NULL default '',
1147
  `frameworkcode` varchar(4) NOT NULL default '',
1148
  `frameworkcode` varchar(4) NOT NULL default '',
1148
  `important` tinyint(4) NOT NULL DEFAULT '0',
1149
  PRIMARY KEY  (`frameworkcode`,`tagfield`)
1149
  PRIMARY KEY  (`frameworkcode`,`tagfield`)
1150
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1150
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1151
1151
(-)a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css (+4 lines)
Lines 899-904 fieldset.rows .inputnote { Link Here
899
.subfield_not_filled {
899
.subfield_not_filled {
900
	background-color : #FFFF99;
900
	background-color : #FFFF99;
901
}
901
}
902
903
.important_subfield_not_filled {
904
	background-color : #FFFFCC;
905
}
902
.content_hidden {
906
.content_hidden {
903
    visibility:hidden; /* you propably don't need to change this one */
907
    visibility:hidden; /* you propably don't need to change this one */
904
    display:none;
908
    display:none;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt (-2 / +1 lines)
Lines 400-406 function AreImportantsNotOk(){ Link Here
400
        tabflag[tag+subfield+tagnumber][0]=0;
400
        tabflag[tag+subfield+tagnumber][0]=0;
401
        if( ! document.getElementById(importants[i]).value){
401
        if( ! document.getElementById(importants[i]).value){
402
            tabflag[tag+subfield+tagnumber][0] = 0 + tabflag[tag+subfield+tagnumber] ;
402
            tabflag[tag+subfield+tagnumber][0] = 0 + tabflag[tag+subfield+tagnumber] ;
403
            document.getElementById(importants[i]).setAttribute('class','subfield_not_filled');
403
            document.getElementById(importants[i]).setAttribute('class','important_subfield_not_filled');
404
            document.getElementById(importants[i]).focus();
404
            document.getElementById(importants[i]).focus();
405
            tabflag[tag+subfield+tagnumber][1]=label[i];
405
            tabflag[tag+subfield+tagnumber][1]=label[i];
406
            tabflag[tag+subfield+tagnumber][2]=tab[i];
406
            tabflag[tag+subfield+tagnumber][2]=tab[i];
407
- 

Return to bug 8643