Bug #16717

input_group_btn on New Host form generates copy of HTML in input field attributes

Added by Dominic Cleal 8 months ago. Updated 8 months ago.

Status:Closed
Priority:Normal
Assigned To:Dominic Cleal
Category:Web Interface
Target version:-
Difficulty: Bugzilla link:
Found in release: Pull request:https://github.com/theforeman/foreman/pull/3897
Story points-
Velocity based estimate-
Release1.14.0Release relationshipAuto

Description

On the New Host form, the Name field has an entire copy of the input_group_btn randomise button HTML stored as an input_group_btn attribute on the input field:

<div class="input-group"><input value="cobalt.example.com" input_group_btn="<a class=&quot;btn btn-default&quot; title=&quot;»Generate new random name. Visit Settings to disable this feature.«&quot; href=&quot;#&quot; onclick=&quot;randomizeName(); return false;&quot;><span class=&quot;glyphicon glyphicon-random &quot;></span> </a>" class="form-control " focus_on_load="true" type="text" name="host[name]" id="host_name"><span class="input-group-btn"><a class="btn btn-default" title="" href="#" onclick="randomizeName(); return false;" data-original-title="»Generate new random name. Visit Settings to disable this feature.«"><span class="glyphicon glyphicon-random "></span> </a></span></div>

The option isn't being deleted from the options hash in the field helper before being passed to the text field generator.

Associated revisions

Revision 9cd2bc6c
Added by Dominic Cleal 8 months ago

fixes #16717 - input_group_btn option no longer added to field

When input_group_btn was passed to text_f (as in the host name field),
it was added as an attribute to the textbox as well as being output.

History

#1 Updated by The Foreman Bot 8 months ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3897 added

#2 Updated by Dominic Cleal 8 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Dominic Cleal 8 months ago

  • Release set to 1.14.0

Also available in: Atom PDF