With some tweaking to tidy the code this looks much better, thanks.
Quote:
Originally Posted by voglermc
I think the replace is missing a bit of code.
Code:
</form>
</li>
</ul>
</vb:if>
</div>
|
Quote:
Originally Posted by nibb
Looks good but you are now giving the user more work as he has to erase the text in the boxes first to enter his username and password. I know they can be left blank in the value, but it would be better if they erase them self when you click on them like other login boxes do.
|
For both, use following replace for vB 4.0.2:
Code:
<img src="./images/icons/username.png" alt="Username" />
<input type="text" class="textbox default-value" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>" onfocus="if (this.value == '<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>'){this.value=''; this.style.color='black';}" onblur="if (this.value == '') {this.value='<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>'; this.style.color='#828282';}"/>
<img src="./images/icons/password.png" alt="Password" />
<input type="password" class="textbox default-value" tabindex="102" name="vb_login_password" id="navbar_password" size="10" onfocus="this.style.color='black';" />
<label for="cb_cookieuser_navbar"><input id="cb_cookieuser_navbar" type="checkbox" accesskey="c" tabindex="103" value="1" name="cookieuser" checked="checked" /></label>
<input type="submit" class="loginbutton" tabindex="104" value="{vb:rawphrase log_in}" title="{vb:rawphrase enter_username_to_login_or_register}" accesskey="s" />
</div>
</div>
</fieldset>
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="do" value="login" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />
</form>
</li>
</ul>
</vb:if>
</div>
Put this part in headinclude template to help with validation:
Code:
<style type="text/css">
.toplinks form img {
position:relative;
top: 3px;
}
</style>
Username is present but it doesn't need deleting, on-click removes the text as per default.