I am trying to make a basic log in system. I am mixing and matching bootstrap. Signing in layout is done. When I click on sign up, it takes me to another form field and it also works. For some reason when I click on forgot password, it should take me to forgot password page but it does not and nothing happens. I have the "forgotten password" page an ID but whenever I put that ID, the sign in stops working and format messes up.
Here is my code. I added js/css bootstrap code also.
http://jsfiddle.net/8cjrj118/1/
Here is my part of my code for the forgotten password form. I took off the id of "forgotten home" from main page because it was messing everything up.
<div style="display: none;" id="form-olvidado">
<h4 class="">
Forgot your password?
</h4>
<form accept-charset="UTF-8" role="form" id="login-recordar" method="post">
<fieldset>
<span class="help-block">
Email address you use to log in to your account
<br>
We'll send you an email with instructions to choose a new password.
</span>
<div class="form-group input-group">
<span class="input-group-addon">
#
</span>
<input class="form-control" placeholder="Email" name="email" type="email" required="">
</div>
<button type="submit" class="btn btn-primary btn-block" id="btn-olvidado">
Continue
</button>
<p class="help-block">
<a class="text-muted" href="#" id="acceso"><small>Account Access</small></a>
</p>
</fieldset>
</form>
Try this:
Forgot password?
DEMO
DEMO
$('#forgot').click(function(){
$('#form-olvidado').css(
"display","block"
);
$('#loginbox').css(
"display","none"
);
});
OR
$('#forgot').click(function(){
$('#form-olvidado').show();
$('#loginbox').hide();
});
Add forgot as id to anchor tag which says forgot password ?
then add this code
Secondly two methods can be used one is using css display block or none in jquery or
Hide or show both does the trick
Another thing regarding using jsfiddle In left side menu there is a tab called external resources you have to add css and other javascript files in that menu
Go to this site it has all bootstrap and other files hosted so that it can be used on the fly
Related
icheck-bootstrap is a pure css checkboxes and radio buttons for Twitter bootstrap. This implies it will work with any of the frontend libraries. At least that's the way I figured it... And indeed, his use from the readme of his github page for the library :Link to icheck-bootstrap demo with docs Does work it just has a side effect that I can live with.
In at lease one place where I'm trying to use this library, the component is in a modal dialog that is used to login to the site. Below is the html template code for the component:
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close" aria-hidden="true" (click)="hideModal()">
<span aria-hidden="true">×</span>
</button>
<h3 class="modal-title-site text-center"> Login to Rove </h3>
</div>
<form #f="ngForm" (ngSubmit)="onSubmit()">
<div class="modal-body">
<div class="form-group login-username">
<div>
<input name="log" id="login-user" class="form-control input" size="20"
[(ngModel)]="model.email" placeholder="Enter User Email" type="email">
</div>
</div>
<div class="form-group login-password">
<div>
<input name="Password" id="login-password" class="form-control input" size="20"
[(ngModel)]="model.password" placeholder="Password" type="password">
</div>
</div>
<div class="col-lg-12">
<div class="form-group">
<span class="checkbox login-remember">
<input name="rememberme" value="forever" checked="checked"
[(ngModel)]="model.rememberMe" type="checkbox">
<label for="rememberme">Remember Me</label>
</span>
</div>
</div>
<div>
<div>
<input name="submit" class="btn btn-block btn-lg btn-primary" value="LOGIN" type="submit">
</div>
</div>
</div>
</form>
<div class="modal-footer">
<p class="text-center">
Not here before? <a data-toggle="modal" data-dismiss="modal"
href="#ModalSignup">Sign Up.</a> <br>
Lost your password?
</p>
</div>
The code above is without the icheck-bootstrap implemented code. Below I have changed the key lines of code that will implement the checkbox as per the readme documention on the github site
<div class="icheck-success checkbox login-remember">
<input id="rememberme" value="forever" checked="checked"
[(ngModel)]="model.rememberMe" type="checkbox">
<label for="rememberme">Remember Me</label>
</div>
this code works as per the readme, unfortunately, after the dialog has been closed the modality of the modal dialog stays and the main page behind it will not allow any input from keyboard or mouse.
Note the input tag in the effective lines, I have change from the name attribute, to the id attribute. That seems wrong to me but, it is as the documentation suggests and, the only way it will completely work. If I do not change the attribute from name to id the checkbox changes to the correct style but it will not check to show a true state. In fact if I remove the icheck-success class from the class attribute of the above div line the behavior is identical and the component will still not take input after the dialog box has been closed if I use the id attribute instead of the name attribute.
I'm using Angular V9 and the dialog component that I am using is from the Valor Software ngx-bootstrap library and, as stated, it works perfectly when I code the html input tag with the name attribute. Does any know of a workaround or possibly what is happening here? the styling is what I want on the site but not at the cost of not having the login dialog effectively lock the site up after you login.
Thanks for any info that you may have on this issue.
I have fix the problem I was having. The first part of the problem was that I was not asking the right question. I have edited the question to ask it in a better way, I think.
I have fixed the problem with the html below:
<div class="icheck-success checkbox login-remember">
<input id="rememberme" name="rememberme" [(ngModel)]="model.rememberMe" type="checkbox">
<label for="rememberme">Remember Me</label>
</div>
it seems I had to have a name attribute in the input tag for some reason that I'm not clear about at all but, this is what I did to get the modal dialog to truly clear from the page after close.
in an html page there is <form> with validation and <a> tag, like below.
<form #loginForm="ngForm" (ngSubmit)="login()" novalidate>
<div class="form-group">
<label for="email">Email</label>
<input type="email" class="form-control" id="email" placeholder="Email"
required
email
[(ngModel)]="model.email" name="email"
#email="ngModel">
<div *ngIf="email.invalid && (email.dirty || email.touched) " class="ha-control-alert">
<div *ngIf="email.errors.required">Email is required</div>
<div *ngIf=" !email.errors.required && email.errors.email">Email is invalid</div>
</div>
</div>
</form>
<div>
<a [routerLink]="['/account/forgot']">Forgot your password?</a>
</div>
the problem is that if input (email input) get touched by user but remains empty and after that user clicks on <a>, the page does not redirect and the error message for input will appear, after that if user clicks on <a> again the page will redirected, it seems checking validation and showing error message has more priority than navigating through <a> tag,this is strange, it seems it needs one more step interacting with user then navigation will work. how can this problem be solved?
I think the problem is that your form is getting submitted when 'forgot password' is clicked. Try adding a login button inside <form>; then the routing should work fine.
I've solved this problem by using css class to show/hide element instead of using *ngIf
I have an <a> link which will only open if I right click it and click on "open in a new tab. If i just click it normally it just puts a "?" after the rest of the link, like this: "http://localhost:8011/login.html?".
Code:
<div class="login-page">
<div class="form">
<form class="login-form">
<input type="text" placeholder="Username" />
<input type="password" placeholder="Password" />
<button class="login">login</button>
<p class="message">Not registered? Create an account</p>
</form>
</div>
</div>
If i put target="_self" it still doesn't work. The two files are definitely in the same folder.
Your HTML is invalid. It is forbidden to put a <button> inside an <a>. Use a validator.
The effect you see is due to error recovery reacting badly and your clicks being handled by different elements.
will only open if I right click it and click on "open in a new tab
This is what happens when you right click on the <a> element.
If i just click it normally it just puts a "?" after the rest of the link
This is what happens when you submit a form using a submit button (and the form has no successful controls in it, which is the case here because none of your controls have names).
If you want a link, then use a link and only a link. Get rid of the <button> element.
If you want something that looks like a button then first think about what message you are sending to the user. Buttons do things. Links go places. Giving the user a visual signal that they are doing something is likely to be wrong.
If you still want a link that looks like a button, then style it with CSS.
That said, having a link marked Login which doesn't submit the form is just confusing. You should probably:
Keep the <button>
Get rid of the <a>
Give your form controls name attributes
Make the form use method="POST"
… and then write server side code to process the data so the login form can be used to login to the site.
You can change your HTML form to be as follows so that the form is submitted when login is clicked:
<div class="form">
<form class="login-form" method="POST" action="index.html">
<!-- user inputs -->
<input type="text" name="username" placeholder="Username" />
<input type="password" name="password" placeholder="Password" />
<!-- your submit button -->
<input type="submit" name="submit" value="login">
<!-- your other link -->
<p class="message">Not registered? Create an account</p>
</form>
</div>
This approach will be better than the current one for creating a login form.
This way you still have your button that will redirect to index.html without having to use a messy approach with <a> and <button>.
It's because you've a button, and it's trying to submit the form.
Try using bootstrap and give the <a> tag some classes, like this:
<div class="login-page">
<div class="form">
<form class="login-form">
<input type="text" placeholder="Username" />
<input type="password" placeholder="Password" />
login
<p class="message">Not registered? Create an account</p>
</form>
</div>
</div>
Or just give style to your <a> by css, but if you use the button, then you're submitting the form instead clicking the link.
EDIT: you could also wrap the <a> inside the button, so the link on the <a> will execute first instead of submitting the form
<button class="login">login</button>
I created a website called diditdrop.com. Within the website there is a form where the user enters a number and then submits the number. On the desktop version of the site, the form works great. On the mobile version, the form is not responsive (i.e. i tap on the screen and nothing focuses or pops up. Additionally, the button underneath it doesn't work either).
I'm not sure what to do. I've been stuck on it for a few hours now. I've pasted a snippet of my code below, however, it doesn't look too strange. If someone could take a look at my site, and then recommend a better way of implementing, I would sincerely appreciate it.
<form class = "form-inline" action="https://formspree.io/x#gmail.com" method="POST">
<div class= "form-group">
<span>
<input type="tel" id = "form1" placeholder="digits here" tabindex="1" class="boxed form-control" name="number"/><br>
</span>
<span>
<input type="submit" id = "buttonmove" class="btn boxed" value="get dat new new"name="number" />
</span>
</div>
</form>
Add the following code it will work:
add the style="float:left" to the image like below
<div id="pictureface" class="col-lg-6">
<img style="float:left" class="img-responsive" src="http://static.stereogum.com/uploads/2016/09/CtUYD4uWYAIB1MH-1475280486.jpg">
</div>
Afternoon all,
I have a problem which i have never come across via opencart, The Version 2.0.2.0 and registered guests only. The problem starts when you register and purchase an item, When in the checkout, There is no Continue button after entering your Address. When you go on guest checkout its fine,
Our web address is www.vape-ashworths.co.uk thank you
Steven
You have given clearfix class to the div that contains buttons.
Remove the clearfix, it has display:none.
By the way same problem applies to registration form.
<div class="buttons clearfix">
<div class="pull-right">I have read and agree to the <b>Privacy Policy</b>
<input type="checkbox" name="agree" value="1">
<input type="button" value="Continue" id="button-register" data-loading-text="Loading..." class="btn btn-primary">
</div>
</div>
remove the clearfix from above code.