diff options
Diffstat (limited to 'data')
-rw-r--r-- | data/config.default.php | 25 | ||||
-rw-r--r-- | data/templates/login.tpl.php | 25 | ||||
-rw-r--r-- | data/templates/password.tpl.php | 38 | ||||
-rw-r--r-- | data/templates/register.tpl.php | 23 |
4 files changed, 48 insertions, 63 deletions
diff --git a/data/config.default.php b/data/config.default.php index af79891..672431a 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -237,31 +237,6 @@ $adminsAreAdvisedTagsFromOtherAdmins = false; */ $reservedusers = array('all', 'watchlist'); - - - -/*************************************************** - * Anti SPAM measures - */ - -/** - * A question to avoid spam. - * Shown on user registration page. - * - * @var string - * @see $antispamAnswer - */ -$antispamQuestion = 'name of this application'; - -/** - * The answer to the antispam question - * Users have to write exactly this string. - * - * @var string - * @see $antispamQuestion - */ -$antispamAnswer = 'semanticscuttle'; - /** * Enable or disable user registration * diff --git a/data/templates/login.tpl.php b/data/templates/login.tpl.php index e67808d..d389a08 100644 --- a/data/templates/login.tpl.php +++ b/data/templates/login.tpl.php @@ -14,23 +14,24 @@ if (!$userservice->isSessionStable()) { } ?> -<form action="<?php echo $formaction; ?>" method="post"> - <div><input type="hidden" name="query" value="<?php echo $querystring; ?>" /></div> - <table> +<form<?php echo $form['attributes']; ?>> +<?php echo implode('', $form['hidden']); ?> + <table> <tr> - <th align="left"><label for="username"><?php echo T_('Username'); ?></label></th> - <td><input type="text" id="username" name="username" size="20" /></td> - <td></td> + <th align="left"><?php echo $form['username']['labelhtml']; ?></th> + <td><?php echo $form['username']['html']; ?></td> + <td></td> </tr> <tr> - <th align="left"><label for="password"><?php echo T_('Password'); ?></label></th> - <td><input type="password" id="password" name="password" size="20" /></td> - <td><input type="checkbox" name="keeppass" id="keeppass" value="yes" /> <label for="keeppass"><?php echo T_("Don't ask for my password for 2 weeks"); ?>.</label></td> + <th align="left"><?php echo $form['password']['labelhtml']; ?></th> + <td><?php echo $form['password']['html']; ?></td> + <td><?php echo $form['keeploggedin']['html'] + . $form['keeploggedin']['labelhtml']; ?></td> </tr> <tr> - <td></td> - <td><input type="submit" name="submitted" value="<?php echo T_('Log In'); ?>" /></td> - <td></td> + <td></td> + <td><?php echo $form['submit']['html']; ?></td> + <td></td> </tr> </table> <p>» <a href="<?php echo ROOT ?>password.php"><?php echo T_('Forgotten your password?') ?></a></p> diff --git a/data/templates/password.tpl.php b/data/templates/password.tpl.php index 55dbed6..cb4fff7 100644 --- a/data/templates/password.tpl.php +++ b/data/templates/password.tpl.php @@ -1,26 +1,34 @@ <?php $this->includeTemplate($GLOBALS['top_include']); + +if (isset($form)) { ?> <p><?php echo sprintf(T_('If you have forgotten your password, %s can generate a new one. Enter the username and e-mail address of your account into the form below and we will e-mail your new password to you.'), $GLOBALS['sitename']); ?></p> -<form action="<?php echo $formaction; ?>" method="post"> - <table> - <tr> - <th align="left"><label for="username"><?php echo T_('Username'); ?></label></th> - <td><input type="text" id="username" name="username" size="20" class="required" /></td> - </tr> - <tr> - <th align="left"><label for="email"><?php echo T_('E-mail'); ?></label></th> - <td><input type="text" id="email" name="email" size="40" class="required" /></td> - </tr> - <tr> - <td></td> - <td><input type="submit" name="submitted" value="<?php echo T_('Generate Password'); ?>" /></td> - </tr> - </table> +<form<?php echo $form['attributes']; ?>> +<?php echo implode('', $form['hidden']); ?> + <table> + <tr> + <th align="left"><?php echo $form['username']['labelhtml']; ?></th> + <td><?php echo $form['username']['html']; ?></td> + </tr> + <tr> + <th align="left"><?php echo $form['email']['labelhtml']; ?></th> + <td><?php echo $form['email']['html']; ?></td> + </tr> + <tr> + <th align="left"><?php echo $form['captcha']['labelhtml']; ?></th> + <td><?php echo $form['captcha']['html']; ?></td> + </tr> + <tr> + <td></td> + <td><?php echo $form['submit']['html']; ?></td> + </tr> + </table> </form> <?php +} $this->includeTemplate($GLOBALS['bottom_include']); ?>
\ No newline at end of file diff --git a/data/templates/register.tpl.php b/data/templates/register.tpl.php index da3deec..2c6fb8d 100644 --- a/data/templates/register.tpl.php +++ b/data/templates/register.tpl.php @@ -10,35 +10,36 @@ window.onload = function() { <p><?php echo sprintf(T_('Sign up here to create a free %s account. All the information requested below is required'), $GLOBALS['sitename']); ?>.</p> -<form action="<?php echo $formaction; ?>" method="post"> +<form<?php echo $form['attributes']; ?>> +<?php echo implode('', $form['hidden']); ?> <table> <tr> - <th align="left"><label for="username"><?php echo T_('Username'); ?></label></th> - <td><input type="text" id="username" name="username" size="20" class="required" onkeyup="isAvailable(this, '')" /> </td> + <th align="left"><?php echo $form['username']['labelhtml']; ?></th> + <td><?php echo $form['username']['html']; ?></td> <td id="availability"><?php echo '←'.T_(' at least 5 characters, alphanumeric (no spaces, no dots or other special ones)') ?></td> </tr> <tr> - <th align="left"><label for="password"><?php echo T_('Password'); ?></label></th> - <td><input type="password" id="password" name="password" size="20" class="required" /></td> + <th align="left"><?php echo $form['password']['labelhtml']; ?></th> + <td><?php echo $form['password']['html']; ?></td> <td></td> </tr> <tr> - <th align="left"><label for="email"><?php echo T_('E-mail'); ?></label></th> - <td><input type="text" id="email" name="email" size="40" class="required" /></td> + <th align="left"><?php echo $form['email']['labelhtml']; ?></th> + <td><?php echo $form['email']['html']; ?></td> <td><?php echo '←'.T_(' to send you your password if you forget it')?></td> </tr> -<?php if(strlen($antispamQuestion)>0) {?> +<?php if (isset($form['captcha'])) {?> <tr> - <th align="left"><label for="antispamAnswer"><?php echo T_('Antispam question'); ?></label></th> - <td><input type="text" id="antispamAnswer" name="antispamAnswer" size="40" class="required" value="<?php echo $antispamQuestion; ?>" onfocus="if (this.value == '<?php echo $antispamQuestion; ?>') this.value = '';" onblur="if (this.value == '') this.value = '<?php echo $antispamQuestion; ?>';"/></td> + <th align="left"><?php echo $form['captcha']['labelhtml']; ?></th> + <td><?php echo $form['captcha']['html']; ?></td> <td></td> </tr> <?php } ?> <tr> <td></td> - <td><input type="submit" name="submitted" value="<?php echo T_('Register'); ?>" /></td> + <td><?php echo $form['submit']['html']; ?></td> <td></td> </tr> </table> |