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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt (-8 / +8 lines)
Lines 193-199 Link Here
193
      }
193
      }
194
    }
194
    }
195
195
196
    function addNewField() {
196
    function addNewField( link ) {
197
      var form_field = $('div.form-field-select-text').last();
197
      var form_field = $('div.form-field-select-text').last();
198
      var copy = form_field.clone(true);
198
      var copy = form_field.clone(true);
199
      copy.find('input,select').not('[type="hidden"]').each(function() {
199
      copy.find('input,select').not('[type="hidden"]').each(function() {
Lines 201-206 Link Here
201
      });
201
      });
202
      copy.find('.form-field-conjunction').prop('disabled', false);
202
      copy.find('.form-field-conjunction').prop('disabled', false);
203
      form_field.after(copy);
203
      form_field.after(copy);
204
        link.remove();
204
      copy.find('select.form-field-column').change();
205
      copy.find('select.form-field-column').change();
205
    }
206
    }
206
207
Lines 358-369 Link Here
358
      // Add the "New field" link.
359
      // Add the "New field" link.
359
      var form_field = $('div.form-field-select-text').last()
360
      var form_field = $('div.form-field-select-text').last()
360
      var NEW_FIELD = _("New field");
361
      var NEW_FIELD = _("New field");
361
      var button_field_new = $('<a href="#" class="button-field-new" title="Add a new field">' + NEW_FIELD + '</a>');
362
        var button_field_new = $('<a href="#" class="button-field-new" title="Add a new field"><i class="fa fa-plus"></i> ' + NEW_FIELD + '</a>');
362
      button_field_new.click(function() {
363
        button_field_new.click(function(e) {
363
        addNewField();
364
            e.preventDefault();
364
        return false;
365
            addNewField( $(this) );
365
      });
366
        });
366
      form_field.after(button_field_new);
367
        form_field.append(button_field_new);
367
368
368
      // If a field is linked to an authorised values list, display the list.
369
      // If a field is linked to an authorised values list, display the list.
369
      $('div.form-field-select-text select').change(function() {
370
      $('div.form-field-select-text select').change(function() {
370
- 

Return to bug 18542