Form button class update, fixes to module_method_token, fixes to json
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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(); ?>
|
||||
|
@@ -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(); ?>
|
||||
|
@@ -125,7 +125,7 @@
|
||||
<td><?php echo StaticList_YesNo::form('email_type',true); ?></td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </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 -->
|
||||
|
Reference in New Issue
Block a user