From 5fc55d1cc0a62857f80bc40b798d41eec57368f4 Mon Sep 17 00:00:00 2001
From: Ere Maijala <ere.maijala@helsinki.fi>
Date: Fri, 22 Feb 2019 12:22:34 +0200
Subject: [PATCH] Bug 21280: Unify field types

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
---
 Koha/MarcEditor.pm                                       | 4 ++--
 koha-tmpl/intranet-tmpl/prog/en/includes/marc_editor.inc | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Koha/MarcEditor.pm b/Koha/MarcEditor.pm
index 85d6c20cec..a71fd3a33e 100644
--- a/Koha/MarcEditor.pm
+++ b/Koha/MarcEditor.pm
@@ -505,7 +505,7 @@ sub _create_input {
         my $is_readonly = $self->{type} eq $Koha::MarcEditor::EDITOR_BIBLIO && !C4::Context->preference("BiblioAddsAuthorities");
 
         $subfield_data{marc_value} = {
-            type      => $self->{type} eq $Koha::MarcEditor::EDITOR_AUTHORITY ? 'text1' : 'text',
+            type      => 'text',
             id        => $subfield_data{id},
             name      => $subfield_data{id},
             value     => $value,
@@ -526,7 +526,7 @@ sub _create_input {
         $plugin->build( $pars );
         if( !$plugin->errstr ) {
             $subfield_data{marc_value} = {
-                type           => $self->{type} eq $Koha::MarcEditor::EDITOR_AUTHORITY ? 'text2' : 'text_complex',
+                type           => 'text_complex',
                 id             => $subfield_data{id},
                 name           => $subfield_data{id},
                 value          => $value,
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/marc_editor.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/marc_editor.inc
index e3abb8dddd..9255dfb1d8 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/marc_editor.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/marc_editor.inc
@@ -338,7 +338,7 @@ function Check(){
                 [% END %]
 
                 [% SET mv = subfield_loo.marc_value %]
-                [% IF ( mv.type == 'text' or mv.type == 'text1' ) %]
+                [% IF ( mv.type == 'text' ) %]
                     [% IF ( mv.readonly == 1 ) %]
                     <input type="text" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" value="[%- mv.value | html -%]" class="input_marceditor readonly" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" readonly="readonly" />
                     [% ELSE %]
@@ -347,7 +347,7 @@ function Check(){
                     [% IF ( mv.authtype ) %]
                     <span class="subfield_controls"><a href="#" class="buttonDot tag_editor" onclick="openAuth(this.parentNode.parentNode.getElementsByTagName('input')[1].id,'[%- mv.authtype | html -%]','biblio'); return false;" tabindex="1" title="Tag editor">Tag editor</a></span>
                     [% END %]
-                [% ELSIF ( mv.type == 'text_complex' or mv.type == 'text2' ) %]
+                [% ELSIF ( mv.type == 'text_complex' ) %]
                     <input type="text" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" value="[%- mv.value | html -%]" class="input_marceditor framework_plugin" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" />
                     <span class="subfield_controls">
                         [% IF mv.noclick %]
-- 
2.11.0