Skip to content

Commit 70203ff

Browse files
committed
* Apply bootstrap styles.
* Fix registration validation error. * Add client validation on registration page.
1 parent e2bb940 commit 70203ff

File tree

5 files changed

+26
-27
lines changed

5 files changed

+26
-27
lines changed

application/modules/dx_auth/controllers/auth.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,24 +216,26 @@ function register()
216216
{
217217
$this->dx_auth->captcha();
218218
}
219-
219+
220220
// Load registration page
221-
//$this->load->view($this->dx_auth->register_view);
222-
$this->mysmarty->assign('confirm_password_error',form_error('confirm_password'));
223-
$this->mysmarty->assign('email_error',form_error('email'));
224-
$this->mysmarty->assign('show_captcha',FALSE);
225-
221+
$this->data['status']->message = validation_errors();
222+
if($this->data['status']->message)
223+
{
224+
$this->data['status']->success = FALSE;
225+
}
226226
return $this->view();
227227
}
228228
}
229229
elseif ( ! $this->dx_auth->allow_registration)
230230
{
231-
$this->data['auth_message'] = 'Registration has been disabled.';
231+
$this->data['status']->success = FALSE;
232+
$this->data['status']->message = 'Registration has been disabled.';
232233
$this->load->view($this->dx_auth->register_disabled_view, $data);
233234
}
234235
else
235236
{
236-
$this->data['auth_message'] = 'You have to logout first, before registering.';
237+
$this->data['status']->success = FALSE;
238+
$this->data['status']->message = 'You have to logout first, before registering.';
237239
$this->load->view($this->dx_auth->logged_in_view, $data);
238240
}
239241
}

application/views/admin/modules/message/index.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<div class="clear">
3434
{$pagination_helper->create_links()}
3535
&nbsp;
36-
<input type="submit" name="delete" value="Delete selected" />
37-
<a href="{$base_url}admin/message/add">Ad New</a>
36+
<input type="submit" name="delete" value="Delete selected" class="btn btn-danger" />
37+
<a href="{$base_url}admin/message/add" class="btn btn-success">Ad New</a>
3838
</div>
3939
</form>

application/views/admin/modules/users/index.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
<div class="clear">
2626
{$pagination_helper->create_links()}
2727
&nbsp;
28-
<input type="submit" name="delete" value="Delete selected" />
28+
<input type="submit" name="delete" value="Delete selected" class="btn btn-danger" />
2929
</div>
3030
</form>
Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
21
<fieldset>
3-
<legend accesskey="D" tabindex="1">Forgotten Password</legend>
4-
<form action="http://localhost/~rana/codexpertz/forgot_password" method="post" accept-charset="utf-8">
5-
<dl>
6-
<dt>
7-
<label for="login">Enter your Username or Email Address</label>
8-
</dt>
9-
<dd>
10-
<input type="text" name="login" value="" id="login" maxlength="80" size="30" />
11-
<input type="submit" name="reset" value="Reset Now" />
12-
</dd>
13-
</dl>
2+
<legend>Forgotten Password</legend>
3+
<form action="{$base_url}forgot_password" method="post" accept-charset="utf-8" class="well">
4+
<div>
5+
<label for="login" class="control-label">Enter your Username or Email Address</label>
6+
<input type="text" name="login" value="" id="login" maxlength="80" size="30" />
7+
</div>
8+
<div>
9+
<input type="submit" name="reset" value="Reset Now" class="btn btn-success" />
10+
</div>
1411
</form>
1512
</fieldset>

application/views/modules/auth/register.tpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
<form action="{$action_url}" method="post">
44
<div class="controls">
55
<label class="control-label" for="username">Username</label>
6-
<input type="text" name="username" value="" id="username" size="30" />
6+
<input type="text" name="username" value="" id="username" size="30" class="required" />
77
</div>
88
<div class="controls">
99
<label class="control-label" for="password">Password</label>
10-
<input type="password" name="password" value="" id="password" size="30" />
10+
<input type="password" name="password" value="" id="password" size="30" class="required" />
1111
</div>
1212
<div class="controls">
1313
<label class="control-label" for="confirm_password">Confirm Password</label>
14-
<input type="password" name="confirm_password" value="" id="confirm_password" size="30" />{$confirm_password_error}
14+
<input type="password" name="confirm_password" value="" id="confirm_password" size="30" class="required" />
1515
</div>
1616
<div class="controls">
1717
<label class="control-label" for="email">Email Address</label>
18-
<input type="text" name="email" value="" id="email" maxlength="80" size="30" />{$email_error}
18+
<input type="text" name="email" value="" id="email" maxlength="80" size="30" class="required email" />
1919
</div>
2020
<div class="controls">
2121
<input type="submit" name="register" value="Register" class="btn" />

0 commit comments

Comments
 (0)