PasswordValidation
<p>This tag outputs the JavaScript code to validate the user input. Specify the following attributes:</p>
<ul>
<li><strong>form</strong><br />Specify the name attribute of the target <form>, required.</li>
<li><strong>password</strong><br />Specify the name attribute of the password input field, required. </li>
<li><strong>username</strong><br />Specify the name attribute of the user name input field, optional.</li>
</ul>
<p>The following is the example of use in the Community Forum's "<strong>New Password Form</strong>" global template.</p>
<mt:var name="screen_id" value="change-password">
<mt:var name="body_class" value="sign-in">
<mt:setvarblock name="page_title">Change Password</mt:setvarblock>
<mt:setvar name="complete" value="1">
<mt:SetVarBlock name="title"><mt:If name="blog_id"><$mt:BlogName encode_html="1"$>: </mt:If><$mt:Var name="page_title"$></mt:SetVarBlock>
<$mt:Include module="Simple Header"$>
<mt:if name="error">
<mtapp:statusmsg
id="error"
class="error"
can_close="0">
<mt:var name="error">
</mtapp:statusmsg>
</mt:if>
<script type="text/javascript">
/* <![CDATA[ */
<$mt:PasswordValidation form="password_reset_form" password="password" username="username"$>
/* ]]> */
</script>
<form id="password_reset_form" method="post" action="<mt:var name="script_url">">
<input type="hidden" name="__mode" value="new_pw" />
<input type="hidden" name="token" value="<mt:var name="token" escape="html">" />
<input type="hidden" name="email" value="<mt:var name="email" escape="html">" />
<input type="hidden" name="username" id="username" value="<mt:var name="username" escape="html">" />
<fieldset>
<mtapp:setting
id="name"
label="New Password"
hint="Enter the new password. (<$mt:PasswordValidationRule$>)"
show_hint="1"
label_class="top-label">
<input type="password" name="password" id="password" class="text password full" value="<mt:var name="password" escape="html">" />
</mtapp:setting>
<mtapp:setting
id="name"
label="Confirm New Password"
label_class="top-label">
<input type="password" name="password_again" id="password_again" class="text password full" value="<mt:var name="password_again" escape="html">" />
</mtapp:setting>
<div class="actions-bar actions-bar-login">
<button
type="submit"
accesskey="s"
title="Change"
class="action primary button">
Change</button>
</div>
</fieldset>
</form>
<$mt:Include module="Simple Footer"$>
Ella on August 30, 2012, 10:03 p.m. Reply
Do I need to write this for using Moveable type or all these code is just for the developers.