What is the glyphicons icon for resetting a form to its original values? - glyphicons

What is the glyphicons icon for resetting a form to its original values? I have looked at the cheat sheet, Bootstrap Glyphicons
The "glyphicon-refresh" icon is the closest one I see.

You can search for icons here: http://glyphicons.com/
This might be what you're looking for: <span class="glyphicon glyphicon-repeat"></span>

There doesn't seem to be one. I'm looking for the same thing myself.

The one I'm using is glyphicon-remove since there isn't a specific one.
<div class="input-group-btn">
<button class="btn btn-default" type="reset"><i class="glyphicon glyphicon-remove"></i></button>
</div>

Related

Laravel not rendering form element, but only the contents inside

I have been stumped on this for a couple hours and can not figure a way around it.
Larvel 8 with Livewire
I have a very basic form.
<form action="/dashboard/payment" method="POST">
#csrf
<button type="submit" class="btn btn-primary my-3 w-100" id="checkout-button">
<span wire:loading>Please Wait</span>
<span wire:loading.remove>Pay - $
<span>100</span>
<br>
<small>Description of payment</small>
</span>
</button>
</form>
But the form tag itself it is not rendering the html. It is only rendering the button inside.
When incrementing a value with another button, the form tag is then rendered into html and the button can be used as expected.
The incrementing button only ++ to a value and updates the database with the new value.
This is the only thing holding me back, I have searched everywhere but cant find any information about form tags not rendering.
Note: Neither the opening tag or the closing tag is rendered until the other button is pressed.
Any ideas or information would be fantastic and greatly appreciated.

Font Awesome icon in language override Joomla 3.8.11

Hello I have been playing with overrides and I decided to make language overrides for pagination Next and Previous Text buttons but the issue is when I make language override using for example:
CODE: SELECT ALL
<i title="Next article" class="fa fa-fast-forward"></i>
or
plain
<i class="fa fa-address-book" aria-hidden="true"></i>
I get the icon but also get "> displayed in front of it.
Screenshot for clarification
What am I doing wrong here?
Thank you!
check your tags and attributes inside the tags if they are properly closed, e.g. there can be some mistake like
<i title="Next article" class="fa fa-fast-forward">"></i>

Bootstrap tooltip issue with Firefox

I just updated Firefox to 48.0.1 from 48.0 and now I'm seeing an issue with the Bootstrap tooltip. Looking at the HTML in Firebug, it appears that Firefox is adding a new <div> at the bottom of the page that is not in the .jsp:
<div id="tooltip404721" class="tooltip fade top in" role="tooltip" style="top: 162.4px; left: 1220.5px; display: block;">
<div class="tooltip-arrow" style="left: 50%;"></div>
<div class="tooltip-inner">Delete</div>
</div>
This only happens if the tooltip is attached to a button - links are not affected. The links and buttons are column elements in a jQuery DataTables table. The tooltip portion of the code for link vs. button is identical.
Link:
<td><a class="btn btn-info btn-xs" href="<c:url value='/recipe/viewRecipe/${recipe.id}'/>"
data-toggle="tooltip" data-placement="top" title="<spring:message code="tooltip.view"></spring:message>">
<span class="glyphicon glyphicon-list-alt"></span></a>
Button:
<td><button class="btn btn-danger btn-xs" type="button" id="delete${recipe.id}" onclick="deleteRecipe(${recipe.id},
'<spring:escapeBody javaScriptEscape="true">${recipe.name}</spring:escapeBody>')"
data-toggle="tooltip" data-placement="top" title="<spring:message code="tooltip.delete"></spring:message>">
<span class="glyphicon glyphicon-remove"></span></button>
This DataTables-specific setting is in a .js file included on the page:
$('[data-toggle="tooltip"]').tooltip({
container : 'body'
});
Removing the above gets rid of the extra <div> but then the tooltip no longer appears with Bootstrap formatting. Adding data-container="body" to the button itself didn't work either.
Any ideas?
EDIT:
Although I just recently noticed the issue I downgraded to 47.0.1 and still see the problem. I will keep downgrading to find out which version this starting appearing in. I don't think it's my code because the production version has the same problem as my dev version. Also, this does not happen in Chrome but it does in Edge.
I found the problem. I have a function that's applied to all pages that sets the input focus for form pages to the first form control. This is because the menu contains a search input and button, which would otherwise get the focus instead of the first form input.
function setInputFocus() {$(':input:visible:enabled:eq(2)').focus();}
For some reason that I don't remember now I moved the code to toggle the tooltip (see question) above this focus code. That meant that the first button in the first row of the datatable ended up getting the focus, hence the tooltip being visible when the page was displayed. Moving the tooltip toggle after this focus code fixed the problem.
Obviously, I should be more careful about site-wide code that is specific to a particular issue but ends up being applied to all pages...

Not able to click on dropdown through xpath or CSS?

This is a dropdown which I am not able to click through xpath or CSS selector.
My HTML code:-
<button class="userInfo dropdown-toggle btn btn-default" data-reactid=".0.0.0.1:$=11:$1.1" type="button"> <span class="sr-only" data-reactid=".0.0.0.1:$=11:$1.1.0">Toggle dropdown</span> <span class="caret" data-reactid=".0.0.0.1:$=11:$1.1.1"/> <span data-reactid=".0.0.0.1:$=11:$1.1.2" style="letter-spacing:-.3em;"/>
Code I have tried:-
driver.findElement(By.xpath(".//*[#data-reactid='.0.0.0.1:$=11:$1.1']")).click()‌​;
but I am getting error says:-
it can not find such xpath
There may be a possiblity of iframe:-
driver.switchTo().frame("provide frame name or location");
Refer below for more info regarding switch on frame:-
http://toolsqa.com/selenium-webdriver/handling-iframes-using-selenium-webdriver/
OR
There is a possiblity that your xpath is not fine or returning more than 1 element to selenium. In this condition selenium will be confuse that on which element selenium should click . so check your xpath again
Hope it will help you :)

Mechanize click on element

I have following html code. And I want to using Ruby Mechanize select dropdown element wit specific text (I want to click on it). Example Chinese. My question is how to do this? I am new in Mechanize.
<form class="form-inline search search-large" action="/translate" method="get">
<input id="q" name="q" type="text" placeholder="Search" class="input-large" value="" autofocus="autofocus" data-pons-redirect-input="true" data-pons-autofocus="true" autocomplete="off">
<div class="btn-group source open" data-pons-lang="de">
<button class="btn btn-large dropdown-toggle" data-toggle="dropdown">
<span class="text">Chinese</span>
<i class="icon-angle-down"></i>
</button>
<ul class="dropdown-menu">
<li>
<a href="#" class="language">
<span class="text">Chinese</span>
<span class="flag flag_zh"></span>
</a>
</li>
<li>
<a href="#" class="language">
<span class="text">Elvish</span>
<span class="flag flag_lb"></span>
</a>
</li>
</ul>
</div>
</form>
Bad News
As far as I see, your example page is too involved to let mechanize interface it with e.g. a .click method. Actually it will be able to follow the links (""), but I guess this will not help you much, because it seems there is some javascript or other black magic involved.
You can try first to see if the page will work nicely (not guaranteed) with mechanize by disabling JavaScript in your browser.
Good News
Anyway, at the end you will want mechanize to do certain kinds of HTTP requests - triggered by JS or not does not matter. That you will be able to do with mechanize (although it might not necessarily be the best choice for all scenarios).
Tips
I encourage you to use your browsers developer thing (often fired up by pressing F12) and see what is really happening, e.g. which form gets submitted with which values. And don't forget to check if its the same when used with and without javascript (mechanize will not execute JavaScript as far as i know).
Also, when developing your mechanize code, use irb or another repl like pry to try your code live. Your mechanize agent or page will have a method save or save_as or similar with which you can always save the current page and review it in your browser or favorite text editor. And remember _ in irb gives you your last return value.

Resources