openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit be112e278c3762a115e83c82e7736eb1ce5f94b9
parent 53a913f7166e5ee83cad96b326df0ce4fcf87d1c
Author: dankert <devnull@localhost>
Date:   Sun, 19 Dec 2004 20:22:05 +0100

Verwendung von Html::form()

Diffstat:
themes/default/pages/html/group/edit.tpl.php | 4+---
themes/default/pages/html/group/list.tpl.php | 6++----
themes/default/pages/html/group/users.tpl.php | 7++-----
themes/default/pages/html/user/edit.tpl.php | 2+-
themes/default/pages/html/user/groups.tpl.php | 8+++-----
themes/default/pages/html/user/list.tpl.php | 6++----
themes/default/pages/html/user/profile.tpl.php | 11+++--------
themes/default/pages/html/user/pw.tpl.php | 5+----
themes/default/pages/html/user/rights.tpl.php | 4++--
9 files changed, 17 insertions(+), 36 deletions(-)

diff --git a/themes/default/pages/html/group/edit.tpl.php b/themes/default/pages/html/group/edit.tpl.php @@ -4,9 +4,7 @@ <center> -<form action="<?php echo $self ?>" method="post" target="_self"> -<input type="hidden" name="<?php echo session_name() ?>" value="<?php echo session_id() ?>"> -<input type="hidden" name="subaction" value="save"> +<?php echo Html::form('group','save',$groupid) ?> <table class="main" width="90%" cellspacing="0" cellpadding="4"> diff --git a/themes/default/pages/html/group/list.tpl.php b/themes/default/pages/html/group/list.tpl.php @@ -4,9 +4,7 @@ <center> -<form action="<?php echo $self ?>" method="post" target="_self"> -<input type="hidden" name="action" value="group" /> -<input type="hidden" name="subaction" value="add" /> +<?php echo Html::form('group','add') ?> <table class="main" width="50%" cellspacing="0" cellpadding="4"> @@ -18,7 +16,7 @@ foreach( $el as $id=>$e ) { ?> <tr> - <td class="<?php if($f1==true) {echo'f1'; } else{echo'f2'; }?>"><a href="<?php echo $e['url'] ?>" target="cms_main"><img src="<?php echo $image_dir ?>icon_group.png" border="0" align="left"><?php echo $e['name'] ?></a></td> + <td class="<?php if($f1==true) {echo'f1'; } else{echo'f2'; }?>"><a href="<?php echo $e['url'] ?>" target="cms_main"><img src="<?php echo $image_dir ?>icon_group<?php echo IMG_EXT ?>" border="0" align="left"><?php echo $e['name'] ?></a></td> </tr> <?php } ?> diff --git a/themes/default/pages/html/group/users.tpl.php b/themes/default/pages/html/group/users.tpl.php @@ -4,10 +4,7 @@ <center> -<form action="<?php echo $self ?>" method="post" target="_self"> -<input type="hidden" name="<?php echo session_name() ?>" value="<?php echo session_id() ?>"> -<input type="hidden" name="subaction" value="adduser"> -<input type="hidden" name="action" value="group"> +<?php echo Html::form('group','adduser',$groupid) ?> <table class="main" width="60%" cellspacing="0" cellpadding="4"> <tr> @@ -18,7 +15,7 @@ { ?> <tr> <td width="50%" class="<?php if($f1==true) {echo'f1'; }else{echo'f2'; }?>"><?php echo $name ?></td> -<td width="10%" class="<?php if($f1==true) {echo'f1';$f1=false;}else{echo'f2';$f1=true;}?>"><a href="<?php echo Html::url(array('action'=>'group','subaction'=>'deluser','userid'=>$id)) ?>"><?php echo lang('GLOBAL_DELETE') ?></a></td> +<td width="10%" class="<?php if($f1==true) {echo'f1';$f1=false;}else{echo'f2';$f1=true;}?>"><a href="<?php echo Html::url('group','deluser',$groupid,array('userid'=>$id)) ?>"><?php echo lang('GLOBAL_DELETE') ?></a></td> </tr> <?php } if ( count($memberships)==0 ) diff --git a/themes/default/pages/html/user/edit.tpl.php b/themes/default/pages/html/user/edit.tpl.php @@ -4,7 +4,7 @@ <center> -<?php echo Html::form('user','form',$userid) ?> +<?php echo Html::form('user','save',$userid) ?> <table class="main" width="90%" cellspacing="0" cellpadding="4"> diff --git a/themes/default/pages/html/user/groups.tpl.php b/themes/default/pages/html/user/groups.tpl.php @@ -4,9 +4,7 @@ <center> -<form action="<?php echo $self ?>" method="post" target="_self"> -<input type="hidden" name="action" value="user"> -<input type="hidden" name="subaction" value="addgroup"> +<?php echo Html::form('user','addgroup',$userid) ?> <table class="main" width="60%" cellspacing="0" cellpadding="4"> @@ -17,8 +15,8 @@ foreach( $memberships as $id=>$name ) { ?> <tr> -<td width="70%" class="<?php if($f1==true) {echo'f1'; }else{echo'f2'; }?>"><img src="<?php echo $image_dir.'icon_group.png' ?>" align="left"><?php echo $name ?></td> -<td width="30%" class="<?php if($f1==true) {echo'f1';$f1=false;}else{echo'f2';$f1=true;}?>"><a href="<?php echo Html::url(array('action'=>'user','subaction'=>'delgroup','groupid'=>$id)) ?>"><?php echo lang('GLOBAL_DELETE') ?></a></td> +<td width="70%" class="<?php if($f1==true) {echo'f1'; }else{echo'f2'; }?>"><img src="<?php echo $image_dir.'icon_group'.IMG_EXT ?>" align="left"><?php echo $name ?></td> +<td width="30%" class="<?php if($f1==true) {echo'f1';$f1=false;}else{echo'f2';$f1=true;}?>"><a href="<?php echo Html::url('user','delgroup',$userid,array('groupid'=>$id)) ?>"><?php echo lang('GLOBAL_DELETE') ?></a></td> </tr> <?php } if ( count($memberships) == 0 ) diff --git a/themes/default/pages/html/user/list.tpl.php b/themes/default/pages/html/user/list.tpl.php @@ -4,9 +4,7 @@ <center> -<form action="<?php echo $self ?>" method="post" target="_self"> -<input type="hidden" name="action" value="user" /> -<input type="hidden" name="subaction" value="add" /> +<?php echo Html::form('user','add') ?> <table class="main" width="50%" cellspacing="0" cellpadding="4"> @@ -18,7 +16,7 @@ foreach( $el as $id=>$e ) { ?> <tr> -<td class="<?php if($f1==true) {echo'f1'; } else{echo'f2'; }?>"><a href="<?php echo $e['url'] ?>" target="cms_main"><img src="<?php echo $image_dir ?>icon_user.png" border="0" align="left"><?php echo $e['name'] ?></a></td> +<td class="<?php if($f1==true) {echo'f1'; } else{echo'f2'; }?>"><a href="<?php echo $e['url'] ?>" target="cms_main"><img src="<?php echo $image_dir ?>icon_user<?php echo IMG_EXT ?>" border="0" align="left"><?php echo $e['name'] ?></a></td> </tr> <?php } ?> diff --git a/themes/default/pages/html/user/profile.tpl.php b/themes/default/pages/html/user/profile.tpl.php @@ -4,7 +4,7 @@ <center> -<?php echo Html::form('user','saveprofile',$userid) ?> +<?php echo Html::form('profile','saveprofile',$userid) ?> <?php $table_title_text = lang('GLOBAL_USER'); @@ -46,10 +46,7 @@ </form> -<form action="<?php echo $self ?>" method="post" target="_self"> -<input type="hidden" name="<?php echo session_name() ?>" value="<?php echo session_id() ?>"> -<input type="hidden" name="useraction" value="pwchange"> - +<?php echo Html::form('profile','pwchange',$userid) ?> <?php $table_title_text = lang('USER_PASSWORD'); @@ -80,8 +77,6 @@ </center> -<script name="JavaScript" type="text/javascript"><!-- -document.forms[0].fullname.focus(); -//--></script> +<?php Html::focusField('fullname') ?> <?php include( $tpl_dir.'footer.tpl.php') ?> \ No newline at end of file diff --git a/themes/default/pages/html/user/pw.tpl.php b/themes/default/pages/html/user/pw.tpl.php @@ -4,10 +4,7 @@ <center> -<form action="<?php echo $self ?>" method="post" target="_self"> - -<input type="hidden" name="action" value="user" /> -<input type="hidden" name="subaction" value="pwchange"/> +<?php echo Html::form('user','pwchange',$userid) ?> <table class="main" width="90%" cellspacing="0" cellpadding="4"> <tr> diff --git a/themes/default/pages/html/user/rights.tpl.php b/themes/default/pages/html/user/rights.tpl.php @@ -26,8 +26,8 @@ foreach( $rights[$projectid] as $oid=>$z ) { $fx = fx($fx); ?> <tr> -<?php $objectUrl = Html::url( array('action'=>'index','subaction'=>'object','id'=>$oid) ) ?> - <td class="<?php echo $fx ?>"><a href="<?php echo $objectUrl ?>" target="_top"><img src="<?php echo $image_dir.'icon_'.$objects[$oid]['type'].'.png' ?>" border="0" align="left"><?php echo $objects[$oid]['filename'] ?></a></td> +<?php $objectUrl = Html::url( 'index','object',$oid ) ?> + <td class="<?php echo $fx ?>"><a href="<?php echo $objectUrl ?>" target="_top"><img src="<?php echo $image_dir.'icon_'.$objects[$oid]['type'].IMG_EXT ?>" border="0" align="left"><?php echo $objects[$oid]['filename'] ?></a></td> <td class="<?php echo $fx ?>"><?php echo $z['languagename'] ?></td> <?php foreach( $show as $t ) { ?>