diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc index 2f2a1c23e6..0e4c279c66 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc @@ -77,12 +77,21 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr return $result[0]; }, postCreate: function() { - this.setText( defaultvalue ); + var value = defaultvalue; + var widget = this; + + $.each( authvals, function() { + if ( this.value == widget.text ) { + value = this.value; + } + } ); + + this.setText( value ); $( '' ).appendTo( this.node ); var $node = $( this.node ).find( 'select' ); $.each( authvals, function( undef, authval ) { - $node.append( '' ); + $node.append( '' ); } ); $node.val( this.text );