Topic on Project:Support desk

TextInputField without button

10
Thirunavukkarasye-Raveendran (talkcontribs)

Hey All,

I'am looking for a kind of TextInputField without any button. For instance the extension mediawiki Extension:Quiz comes with a TextInputField BUT with a button. I would like to youse this TextInputFields (or something similar) as a scratchpad for the language student (for my projects in de:wikibooks and es:wikilibros) - here is some example where I would like to integrate it. The input in the TextInputField must not be evaluated or further processed. it should just be possible for the reader (student) so type his inputs (befor he opens the solution to look for the correct results). Maybe some kind of mw:Extension:InputBox will do the same thing, BUT they all come with a button (that I am not able to suppress. Outside Wikipedia-world some kind of easy HTML-text would do this. Can somebody help me please.

Thanks, -Thiruna

Ciencia Al Poder (talkcontribs)

It's less than optimal, but you can use CSS to hide buttons, for example, adding in MediaWiki:Common.css the following code:

.nobuttons input.searchboxSearchButton {display:none;}

And wrap the code of InputBox inside a div with class="nobuttons", the buttons will be hidden.

That, at least would be easy to do on a WMF wiki where they may not want to add extensions just for this.

Thirunavukkarasye-Raveendran (talkcontribs)

I need this InputBoxes for spanisch wikilibros (and german wikibooks) (). As far as I understand does a CSS-modifikation only function when every user writes it in his CSS. But there are many readers (especially IP-users) who can't do that stuff. Or does not every user have to change his CSS-settings?

Maybe it is possible to implement the Quiz-template from en:Wikiversity to es:Wikilibros and make the modifications that you suggested into the code. (I didn't really understood your code. sorry!) I had asked on es:Wikipedia for migration of the Quiz-template (), but that's a problem too (). (talk)

Ciencia Al Poder (talkcontribs)

If you put that code in MediaWiki:Common.css, every user on the wiki would load it. Of course, you should ask a local sysop on those projects to add this CSS. See Manual:Interface/Stylesheets

Thirunavukkarasye-Raveendran (talkcontribs)

That sounds good. But where can I find a sysop? Do I have to look for a sysop inside es:Wikipedia or inside es:Wikibooks?

Ciencia Al Poder (talkcontribs)
Thirunavukkarasye-Raveendran (talkcontribs)

Now (after one year) there is a new problem. I used these NewInputFields with no problems for instance in conjugación de verbos españoles. But today I created a new pag Lección 033a Curso de Alemán Para Principiantes con audio and suddenly there appear some strange buttons "Buscar por texto completo". Though I have the same code. What is causing this problem? I would like that the strange buttons disappear. I guess it could be connected with the new CirrusSearch. The only difference that I see is that one page was created month ago and the other page only today.

121.220.14.39 (talkcontribs)

It doesn't show up on the old page because it's cached. If you edit it, the buttons will appear.

It's because the button doesn't have the searchboxSearchButton class any more. You can replace the old selector with this one to fix that: .nobuttons input[type="submit"]

Ciencia Al Poder (talkcontribs)

Aaarg! WMF changed the way the extension works. In fact, the old page, if you edit it and preview, will have the same problem, because it's cached.

The CSS code I suggested before should be changed to this one for it to continue working:

.nobuttons input.searchboxSearchButton, .nobuttons input.mw-ui-button {display:none;}

PD: What 121.220 suggests would also work.

Reply to "TextInputField without button"