Form button class update, fixes to module_method_token, fixes to json

This commit is contained in:
Deon George
2011-08-31 16:54:44 +10:00
parent c55a8fe4cc
commit 52074d239b
19 changed files with 62 additions and 60 deletions

View File

@@ -109,7 +109,6 @@ class Auth_OSB extends Auth_ORM {
// Check and see if we have a token to login and run the method
} elseif ((! empty($_REQUEST['token']) AND $token = $_REQUEST['token']) OR $token=Session::instance()->get('token')) {
if ($user=$this->_get_token_user($token) AND $user !== FALSE)
$status = TRUE;
@@ -149,7 +148,6 @@ class Auth_OSB extends Auth_ORM {
*/
private function _get_token_user($token) {
$mmto = ORM::factory('module_method_token',array('token'=>$token));
$request = Request::current();
$user = FALSE;
if ($mmto->loaded()) {
@@ -164,9 +162,9 @@ class Auth_OSB extends Auth_ORM {
} else {
// Check that the token is for this URI
$mo = ORM::factory('module',array('name'=>$request->controller));
$mo = ORM::factory('module',array('name'=>Request::current()->controller()));
$mmo = ORM::factory('module_method',
array('name'=>$request->directory ? sprintf('%s_%s',$request->directory,$request->action) : $request->action));
array('name'=>Request::current()->directory() ? sprintf('%s_%s',Request::current()->directory(),Request::current()->action()) : Request::current()->action()));
// Ignore the token if this is not the right method.
if ($mmo->id == $mmto->method_id) {

View File

@@ -1,4 +1,5 @@
<!-- @todo NEEDS TO BE TRANSLATED -->
<br/>
<?php echo Form::open(); ?>
<table class="box-center">
<tr>
@@ -10,7 +11,7 @@
<td><input type="password" name="password_confirm" value=""/></td>
</tr>
<tr>
<td colspan="2" style="text-align: center;"><?php echo Form::submit('update','Update'); ?></td>
<td colspan="2" style="text-align: center;"><?php echo Form::submit('update','Update',array('class'=>'form_button')); ?></td>
</tr>
</table>
<?php echo Form::close(); ?>

View File

@@ -78,7 +78,7 @@
</tr>
<!-- @todo OTHER STATIC VARS -->
<tr>
<td colspan="2" style="text-align: center;"><?php echo Form::submit('update','Update'); ?></td>
<td colspan="2" style="text-align: center;"><?php echo Form::submit('update','Update',array('class'=>'form_button')); ?></td>
</tr>
</table>
<?php echo Form::close(); ?>

View File

@@ -125,7 +125,7 @@
<td><?php echo StaticList_YesNo::form('email_type',true); ?></td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr><td colspan="2" style="text-align: center;"><?php echo Form::submit('submit',_('Register'));?></td></tr>
<tr><td colspan="2" style="text-align: center;"><?php echo Form::submit('submit',_('Register'),array('class'=>'form_button'));?></td></tr>
</table>
<?php echo Form::close(); ?>
<!-- @todo The following focus() is not ajax/jscript friendly -->