commit 8b3bb78feff943ed52c8d435e59a24b9cb1aedf5
parent 8ed3eee3d4bcaa400ead48163fb8902d24c78d8e
Author: Jan Dankert <devnull@localhost>
Date: Wed, 9 Nov 2011 22:54:51 +0100
Login-Seite überarbeitet, Register-Vorgang wieder aktiviert. Inline-Javascript für Feld-Fokus deaktiviert. Teilweise nicht wohlgeformte HTML-Elemente korrigiert.
Diffstat:
14 files changed, 92 insertions(+), 40 deletions(-)
diff --git a/action/LoginAction.class.php b/action/LoginAction.class.php
@@ -1347,7 +1347,7 @@ class LoginAction extends Action
/**
* Maske anzeigen, um Benutzer zu registrieren.
*/
- function register()
+ function registerView()
{
}
@@ -1357,7 +1357,7 @@ class LoginAction extends Action
* Registriercode erzeugen und per E-Mail dem Benutzer mitteilen.
* Maske anzeigen, damit Benuter Registriercode anzeigen kann.
*/
- function registercode()
+ function registerAction()
{
$email_address = $this->getRequestVar('mail','mail');
@@ -1365,7 +1365,6 @@ class LoginAction extends Action
{
$this->addValidationError('mail');
$this->setTemplateVar('mail',$email_address);
- $this->callSubAction('register');
return;
}
@@ -1382,19 +1381,19 @@ class LoginAction extends Action
if ( $mail->send() )
{
- $this->addNotice('','','mail_sent',OR_NOTICE_OK);
+ $this->addNotice('','','mail_sent',OR_NOTICE_OK);
+ $this->nextView('registeruserdata');
}
else
{
$this->addNotice('','','mail_not_sent',OR_NOTICE_ERROR,array(),$mail->error);
- $this->callSubAction('register');
return;
}
}
- function registeruserdata()
+ function registeruserdataView()
{
global $conf;
@@ -1420,7 +1419,7 @@ class LoginAction extends Action
* Benutzerregistierung.
* Benutzer hat Best�tigungscode erhalten und eingegeben.
*/
- function registercommit()
+ function registeruserdataAction()
{
global $conf;
$this->checkForDb();
@@ -1432,7 +1431,6 @@ class LoginAction extends Action
{
// Best�tigungscode stimmt nicht.
$this->addValidationError('code','code_not_match');
- $this->callSubAction('registeruserdata');
return;
}
@@ -1442,7 +1440,6 @@ class LoginAction extends Action
if ( !$this->hasRequestVar('username') )
{
$this->addValidationError('username');
- $this->callSubAction('registeruserdata');
return;
}
@@ -1450,14 +1447,12 @@ class LoginAction extends Action
if ( $user->isValid() )
{
$this->addValidationError('username','USER_ALREADY_IN_DATABASE');
- $this->callSubAction('registeruserdata');
return;
}
if ( strlen($this->getRequestVar('password')) < $conf['security']['password']['min_length'] )
{
$this->addValidationError('password','password_minlength',array('minlength'=>$conf['security']['password']['min_length']));
- $this->callSubAction('registeruserdata');
return;
}
@@ -1471,6 +1466,8 @@ class LoginAction extends Action
$newUser->setPassword( $this->getRequestVar('password'),true );
$this->addNotice('user',$newUser->name,'user_added','ok');
+
+ $this->nextView('login');
}
@@ -1554,7 +1551,6 @@ class LoginAction extends Action
if ( !$this->hasRequestVar('username') )
{
$this->addValidationError('username');
- $this->callSubAction('password');
return;
}
@@ -1682,6 +1678,36 @@ class LoginAction extends Action
}
}
+
+ function licenseView()
+ {
+ $software = array();
+
+ $software[] = array('name' =>'jQuery Core Javascript Framework',
+ 'url' =>'http://jquery.com/',
+ 'license'=>'MPL, GPL v2');
+ $software[] = array('name' =>'jQuery UI Javascript Framework',
+ 'url' =>'http://jqueryui.com/',
+ 'license'=>'MPL, GPL v2');
+ $software[] = array('name' =>'GeSHi - Generic Syntax Highlighter',
+ 'url' =>'http://qbnz.com/highlighter/',
+ 'license'=>'GPL v2');
+ $software[] = array('name' =>'CKEditor',
+ 'url' =>'http://ckeditor.com/',
+ 'license'=>'GPL v2');
+ $software[] = array('name' =>'960 Grid System CSS',
+ 'url' =>'http://960.gs/',
+ 'license'=>'GPL v3, MIT');
+ $software[] = array('name' =>'TAR file format from Josh Barger',
+ 'url' =>'http://www.phpclasses.org/package/529',
+ 'license'=>'LGPL');
+ $software[] = array('name' =>'JSON file format',
+ 'url' =>'http://pear.php.net/pepr/pepr-proposal-show.php?id=198',
+ 'license'=>'BSD');
+
+ $this->setTemplateVar('software',$software);
+ }
+
}
diff --git a/action/LoginAction.ini.php b/action/LoginAction.ini.php
@@ -102,3 +102,6 @@ guest=true
[menu]
menu =login
+
+[license]
+guest=true+
\ No newline at end of file
diff --git a/action/StartAction.class.php b/action/StartAction.class.php
@@ -421,7 +421,7 @@ class StartAction extends Action
/**
* Erzeugt eine Anwendungsliste.
*/
- function applications()
+ function applicationsView()
{
global $conf;
diff --git a/themes/default/include/html/fieldset.inc.php b/themes/default/include/html/fieldset.inc.php
@@ -1 +1 @@
-<fieldset><?php if(isset($attr_title)) { ?><legend><?php if(isset($attr_icon)) { ?><image src="<?php echo $image_dir.'icon_'.$attr_icon.IMG_ICON_EXT ?>" align="left" border="0"><?php } ?> <?php echo encodeHtml($attr_title) ?> </legend><?php } ?>-
\ No newline at end of file
+<fieldset><?php if(isset($attr_title)) { ?><legend><?php if(isset($attr_icon)) { ?><img src="<?php echo $image_dir.'icon_'.$attr_icon.IMG_ICON_EXT ?>" align="left" border="0" /><?php } ?> <?php echo encodeHtml($attr_title) ?> </legend><?php } ?>+
\ No newline at end of file
diff --git a/themes/default/include/html/focus.inc.php b/themes/default/include/html/focus.inc.php
@@ -1,6 +1,6 @@
-<?php
-// Wenn Eingabefehler vorhanden, dann den Fokus auf das Fehlerfeld setzen.
-if (isset($errors[0])) $attr_field = $errors[0];
-?><script name="JavaScript" type="text/javascript"><!--
-document.forms[0].<?php echo $attr_field ?>.focus();
-document.forms[0].<?php echo $attr_field ?>.select(); // --></script>-
\ No newline at end of file
+<script name="JavaScript" type="text/javascript"><!--
+// Auskommentiert, da JQuery sonst abbricht und die Success-Function des LoadEvents nicht mehr ausführt.
+//document.forms[0].<?php echo $attr_field ?>.focus();
+//document.forms[0].<?php echo $attr_field ?>.select();
+// -->
+</script>
diff --git a/themes/default/include/html/header.inc.php b/themes/default/include/html/header.inc.php
@@ -1,6 +1,15 @@
-<div class="header"><?php if ($attr_back) { ?><a href="javascript:void(0);" onclick="javascript:refreshActualView(this);"><img src="<?php echo $image_dir ?>icon/window/back.gif" /><?php echo lang('BACK') ?></a><?php } ?><?php if(!empty($attr_views)) { ?><img src="<?php echo $image_dir ?>icon/window/down.gif" /><div class="dropdown"><?php foreach( explode(',',$attr_views) as $attr_tmp_view ) { ?>
+<div class="header">
+ <?php if ($attr_back) { ?>
+ <a href="javascript:void(0);" onclick="javascript:refreshActualView(this);">
+ <img src="<?php echo $image_dir ?>icon/window/back.gif" />
+ <?php echo lang('BACK') ?>
+ </a>
+ <?php } ?><?php if(!empty($attr_views)) { ?>
+ <img src="<?php echo $image_dir ?>icon/window/down.gif" />
+ <div class="dropdown">
+ <?php foreach( explode(',',$attr_views) as $attr_tmp_view ) { ?>
<a class="entry" href="javascript:void(0);" onclick="javascript:startView(this,'<?php echo $attr_tmp_view ?>');"><?php echo lang('MENU_'.$attr_tmp_view) ?></a>
-<?php } ?>
-</div>
+ <?php } ?>
+ </div>
<?php } ?>
</div>
\ No newline at end of file
diff --git a/themes/default/include/html/image.inc.php b/themes/default/include/html/image.inc.php
@@ -43,4 +43,4 @@
$attr_tmp_title = basename($attr_tmp_image_file);
/* #END-IF# */
-?><img alt="<?php echo $attr_tmp_title; if (isset($attr_size)) { echo ' ('; list($attr_tmp_width,$attr_tmp_height)=explode('x',$attr_size);echo $attr_tmp_width.'x'.$attr_tmp_height; echo')';} ?>" src="<?php echo $attr_tmp_image_file ?>" border="0"<?php if(isset($attr_align)) echo ' align="'.$attr_align.'"' ?><?php if (isset($attr_size)) { list($attr_tmp_width,$attr_tmp_height)=explode('x',$attr_size);echo ' width="'.$attr_tmp_width.'" height="'.$attr_tmp_height.'"';} ?>>-
\ No newline at end of file
+?><img alt="<?php echo $attr_tmp_title; if (isset($attr_size)) { echo ' ('; list($attr_tmp_width,$attr_tmp_height)=explode('x',$attr_size);echo $attr_tmp_width.'x'.$attr_tmp_height; echo')';} ?>" src="<?php echo $attr_tmp_image_file ?>" border="0"<?php if(isset($attr_align)) echo ' align="'.$attr_align.'"' ?><?php if (isset($attr_size)) { list($attr_tmp_width,$attr_tmp_height)=explode('x',$attr_size);echo ' width="'.$attr_tmp_width.'" height="'.$attr_tmp_height.'"';} ?> />+
\ No newline at end of file
diff --git a/themes/default/include/html/link.inc.php b/themes/default/include/html/link.inc.php
@@ -54,6 +54,10 @@
$tmp_function_call = "submitUrl(this,'".($attr_url)."');";
break;
+ case 'external':
+ $tmp_function_call = "location.href='".$attr_url."';";
+ break;
+
default:
$tmp_function_call = "alert('TODO');";
}
diff --git a/themes/default/include/html/logo.inc.php b/themes/default/include/html/logo.inc.php
@@ -1 +1 @@
-<img src="<?php echo $image_dir.'logo_'.$attr_name.IMG_ICON_EXT ?>" border="0" align="left"><h2 class="logo"><?php echo langHtml('logo_'.$attr_name) ?></h2><p class="logo"><?php echo langHtml('logo_'.$attr_name.'_text') ?></p>-
\ No newline at end of file
+<img src="<?php echo $image_dir.'logo_'.$attr_name.IMG_ICON_EXT ?>" border="0" align="left" /><h2 class="logo"><?php echo langHtml('logo_'.$attr_name) ?></h2><p class="logo"><?php echo langHtml('logo_'.$attr_name.'_text') ?></p>+
\ No newline at end of file
diff --git a/themes/default/include/html/radiobox.inc.php b/themes/default/include/html/radiobox.inc.php
@@ -13,6 +13,6 @@
echo '<input id="'.$id.'" name="'.$attr_name.'" type="radio" class="'.$attr_class.'" value="'.$box_key.'"';
if ($box_key==$attr_tmp_default)
echo ' checked="checked"';
- echo '> <label for="'.$id.'">'.$box_value.'</label><br>';
+ echo ' /> <label for="'.$id.'">'.$box_value.'</label><br />';
}
?>
\ No newline at end of file
diff --git a/themes/default/layout/perspective/login.ini.php b/themes/default/layout/perspective/login.ini.php
@@ -2,7 +2,7 @@
[content]
-views=login,password
+views=login,register,license
action=login
refreshable=false
default=login
\ No newline at end of file
diff --git a/themes/default/templates/login/license.tpl.src.php b/themes/default/templates/login/license.tpl.src.php
@@ -0,0 +1,14 @@
+dummy
+ header
+ link type:external url:config:login/gpl/url target:_top class:copyright
+ text key:GPL
+
+ fieldset
+
+ list list:software extract:true
+ link type:external url:var:url
+ text var:name
+ text var:license
+ newline
+ newline
+
diff --git a/themes/default/templates/login/login.tpl.src.php b/themes/default/templates/login/login.tpl.src.php
@@ -1,4 +1,5 @@
dummy
+ header views:password
form action:login subaction:login target:_top
#window title:GLOBAL_LOGIN name:login width:400px icon:user
dummy
@@ -54,9 +55,9 @@ dummy
text key:USER_NEW_PASSWORD_REPEAT
password name:password2 default: size:25
- link class:action action:login subaction:password
+ link type:view class:action action:login subaction:password
text key:menu_login_password
- link class:action action:login subaction:register
+ link type:view class:action action:login subaction:register
text key:menu_login_register
if true:config:security/openid/enable
@@ -79,8 +80,6 @@ dummy
#script
else
hidden name:dbid default:var:actdbid
- button type:ok
- #insert script:screenwidth
hidden name:objectid
hidden name:modelid
@@ -92,7 +91,7 @@ dummy
newline
newline
link url:config:login/gpl/url target:_top class:copyright
- text value:message:GPL
+ text key:GPL
if present:force_username
focus field:login_password
diff --git a/themes/default/templates/login/showlogin.tpl.src.php b/themes/default/templates/login/showlogin.tpl.src.php
@@ -1,4 +1,5 @@
dummy
+ header views:password
form action:index subaction:login target:_top
window title:GLOBAL_LOGIN name:login width:400px icon:user
@@ -92,10 +93,6 @@ dummy
selectbox name:dbid list:dbids default:var:actdbid
hidden name:screenwidth default:9999
#script
- row
- cell colspan:2 class:act
- button type:ok
- insert script:screenwidth
if value:size:dbids lessthan:2
hidden name:dbid default:var:actdbid
hidden name:objectid