Page MenuHomePhabricator

Enhance InputBox to support location change for the button
Open, Needs TriagePublicFeature

Description

Currently Extension:InputBox allows for only 2 locations of the button(s) relative to the textbox, the default one where the button is at the bottom of the box and on the right of it which can be activated by setting break=no. The documentation at MediaWiki rightly says so:

The “Submit” button can be moved to the right by using the line break parameter to eliminate the line break between the box and the button: break=no.

Nowhere on it is explained how the button can be moved to the left. That's because that can't be achieved currently. I was looking for a way to do precisely that in a page in my homewiki and I was surprised to find out there was no way to achieve that beside utilizing CSS.

Given the vast general use cases that extension can have it should support more than 2 modes and allow for "full" location change of the button relative to the textbox. This can be achieved by adding a new "buttonlocation" parameter that can accept values such as "left", "right", "top", "bottom". (The name of the parameter shouldn't necessarily be like that and not all values proposed should necessarily be accepted considering that some of them are already possible or considered default states.)

Many projects can benefit from this from an UI perspective, especially RTL language ones.