Add icon before Submit-Button

valle90
Topic Author
Posts: 18
3 years 1 week ago - 3 years 1 week ago #3286 by valle90
Add icon before Submit-Button was created by valle90
Hello Lodder,

since I am a big fan of using icons, is it an option for you to replace input-field with a button element around line 373 like so:
<button name="jjshout[shout]" id="shoutbox-submit" class="<?php echo $button; ?> fullwidth" type="submit" <?php if (($securitytype == 1 && !$siteKey) || ($securitytype == 1 && !$secretKey)) { echo 'disabled="disabled"'; }?>><?php echo JText::_('SHOUT_SUBMITTEXT'); ?>        
 </button>

In order to add icons before "Submit" more easily, by e. g.

- changing the language constant SHOUT_SUBMITTEXT from "Submit" to "<span class="fa fa-paper-plane-o"></span>Submit"
- or using the css-pseudo-element ::before on the shoutbox-submit id.

Thank you.

PS: The Editors-Code Button from the Forum is called "Quote" like the button before and outputs "[ code ][ code ]" instead of "[ code ][ /code ]"

Regards
Last edit: 3 years 1 week ago by valle90.

Please Log in or Create an account to join the conversation.

Lodder
Lodder's Avatar
Posts: 1167
3 years 1 week ago #3287 by Lodder
Replied by Lodder on topic Add icon before Submit-Button
Hi valle90,

By default, I don't want to add any Font icons classes simply because different frameworks use different icons, for example:

Bootstrap >> Glyphicons
UIKit >> FontAwesome (with custom prefix)
Some other templates >> FontAwesome

You can easily create a template override for the Shoutbox view or simply override the language string via the Language Manager if you'd like to add an icon.

Regards,
Lodder

Please Log in or Create an account to join the conversation.

valle90
Topic Author
Posts: 18
3 years 1 week ago - 3 years 1 week ago #3288 by valle90
Replied by valle90 on topic Add icon before Submit-Button
Hello Lodder,

thank you for your reply. You misunderstood me.

I didn't ask to add specific font-icons to the shoutbox-module, only to may change <input/> to <button></button> in order to be able to overwrite the language-string in the lanaguage manager or using a custom css selector ::before. (with input-field both is currently not possible or at least I do not know how to manage it).

But, as you said, I can use a template overrides for mod_shoutbox -> default.php and replace <input/> with <button></button> by myself.

Regards
Last edit: 3 years 1 week ago by valle90.

Please Log in or Create an account to join the conversation.

Lodder
Lodder's Avatar
Posts: 1167
3 years 1 week ago #3289 by Lodder
Replied by Lodder on topic Add icon before Submit-Button
Ahh I see what you mean. Good point.

I'll add this in for the next update

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum