Bug 21049: Fix value of material select for Rancor 007 widget
The material type is selected in accordance with position 0 of 007 Test plan: 1. Create a new record using the advanced editor 2. Select a material type for field 007 and set at least the position 0 of this field 3. Save the record and reload the page 4. The material type should remain selected 5. Try with all available material types Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
d522d80c5c
commit
e85294a738
|
|
@ -222,6 +222,26 @@ require( [ 'koha-backend', 'widget', 'text-marc' ], function( KohaBackend, Widge
|
|||
|
||||
return $result[0];
|
||||
},
|
||||
materialTypeMapping: {
|
||||
a: 'MPS',
|
||||
c: 'ER',
|
||||
d: 'GL',
|
||||
f: 'TM',
|
||||
g: 'PG',
|
||||
h: 'MF',
|
||||
k: 'NG',
|
||||
m: 'MP',
|
||||
o: 'KT',
|
||||
q: 'NM',
|
||||
r: 'RI',
|
||||
s: 'SR',
|
||||
t: 'TC',
|
||||
v: 'VR',
|
||||
z: 'UN'
|
||||
},
|
||||
getMaterial: function () {
|
||||
return this.materialTypeMapping[this.text.substring(0, 1)];
|
||||
},
|
||||
postCreate: function( node, mark ) {
|
||||
this.createFromXML( 'marc21/xml/007' );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue