Improvements to field views and minor updates

This commit is contained in:
Deon George
2016-08-25 23:24:44 +10:00
parent 2b48dde8f7
commit 68d96ca85f
14 changed files with 86 additions and 47 deletions

4
classes/Arr.php Normal file
View File

@@ -0,0 +1,4 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
class Arr extends lnApp_Arr {}
?>

20
classes/lnApp/Arr.php Normal file
View File

@@ -0,0 +1,20 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class extends Kohana's Arr
*
* @package lnApp
* @category Modifications
* @author Deon George
* @copyright (c) 2010 Deon George
* @license http://dev.leenooks.net/license.html
*/
abstract class lnApp_Arr extends Kohana_Arr {
/**
* Convert an array into a string with key=value
*/
public static function convert(array $array) {
return implode(' ',array_map(function ($v, $k) { return sprintf('%s="%s"', $k, $v); },$array,array_keys($array)));
}
}
?>

View File

@@ -13,8 +13,8 @@ abstract class lnApp_Controller_User_Account extends Controller_Account {
protected $auth_required = TRUE;
protected $secure_actions = array(
'edit'=>0,
'resetpassword'=>0,
'edit'=>TRUE,
'resetpassword'=>TRUE,
);
/**
@@ -58,9 +58,8 @@ abstract class lnApp_Controller_User_Account extends Controller_Account {
// Log the password reset
$this->ao->log('Password reset');
HTTP::redirect('login');
}
HTTP::redirect('login');
}
Block::factory()

View File

@@ -54,7 +54,7 @@ abstract class lnApp_SystemMessage extends HTMLRender {
$output = '';
$output .= sprintf('<div class="alert %s">',empty($record['type']) ? '' : 'alert-'.$record['type']);
$output .= sprintf('<div class="alert %s">',empty($record['type']) ? '' : 'alert-'.($record['type'] == 'error' ? 'danger' : $record['type']));
$output .= '<button type="button" class="close" data-dismiss="alert">&times;</button>';
switch ($record['type']) {
case 'error':