rolandtoth / AdminOnSteroids

Various ProcessWire admin tweaks to boost productivity.

Home Page:https://processwire.com/talk/topic/13389-adminonsteroids/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Field edit link added twice for radios inputfield

Toutouwai opened this issue · comments

On a Page Reference field using a radios inputfield, the field edit link seems to be added twice. This causes a gap between the inputfield header and content.

2018-06-05_130824

2018-06-05_130945

I've fixed it without further examining the root cause (with a simple strpos if).

The spacing issue was not caused by this but by the uikit css rule *+ul { margin-top: 20px; }. Appending the edit link instead prepending fixed this.

Great, thanks!

I've fixed it without further examining the root cause

I think the cause is that Page Reference fields are a combination of two inputfields: InputfieldPage and whatever inputfield type is selected in the field settings, meaning the method gets called twice for Page Reference fields. So alternatively you could exclude InputfieldPage, but the way you've fixed it is good because that would cover it in case there are any other fields that render more than one inputfield.

Ok, thanks for the explanation. I was thinking something like that but I was lazy to dig deeper.