fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [14599] clean up from yui


From: Sigurd Nes
Subject: [Fmsystem-commits] [14599] clean up from yui
Date: Mon, 14 Dec 2015 16:05:20 +0000

Revision: 14599
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14599
Author:   sigurdne
Date:     2015-12-14 16:05:19 +0000 (Mon, 14 Dec 2015)
Log Message:
-----------
clean up from yui

Modified Paths:
--------------
    branches/dev-syncromind/registration/inc/class.bopending.inc.php
    branches/dev-syncromind/registration/inc/class.sopending.inc.php
    branches/dev-syncromind/registration/inc/class.uipending.inc.php
    branches/dev-syncromind/registration/templates/base/user_edit.xsl

Added Paths:
-----------
    branches/dev-syncromind/registration/js/portico/pending.index.js

Removed Paths:
-------------
    branches/dev-syncromind/registration/js/yahoo/

Modified: branches/dev-syncromind/registration/inc/class.bopending.inc.php
===================================================================
--- branches/dev-syncromind/registration/inc/class.bopending.inc.php    
2015-12-14 16:04:42 UTC (rev 14598)
+++ branches/dev-syncromind/registration/inc/class.bopending.inc.php    
2015-12-14 16:05:19 UTC (rev 14599)
@@ -109,9 +109,7 @@
 
                function read($data = array())
                {
-                       $users = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
-                               'filter' => 
$this->filter,'allrows'=>$data['allrows'],
-                               'status_id'=>$this->status_id,'results' => 
$data['results']));
+                       $users = $this->so->read($data);
 
                        foreach($users as &$user)
                        {

Modified: branches/dev-syncromind/registration/inc/class.sopending.inc.php
===================================================================
--- branches/dev-syncromind/registration/inc/class.sopending.inc.php    
2015-12-14 16:04:42 UTC (rev 14598)
+++ branches/dev-syncromind/registration/inc/class.sopending.inc.php    
2015-12-14 16:05:19 UTC (rev 14599)
@@ -60,17 +60,16 @@
 
                        $ordermethod = " ORDER BY {$order} {$sort}";
 
-
                        $filtermethod = 'WHERE reg_info IS NOT NULL';
                        $where= 'AND';
                        switch ($status_id)
                        {
                                case '1':
-                                       $filtermethod .= "$where reg_approved = 
1";
+                                       $filtermethod .= " $where reg_approved 
= 1";
                                        $where= 'AND';
                                        break;
                                case '2':
-                                       $filtermethod .= "$where reg_approved 
IS NULL";
+                                       $filtermethod .= " $where reg_approved 
IS NULL";
                                        $where= 'AND';
                                        break;
                                default:
@@ -84,6 +83,7 @@
                        }
 
                        $sql = "SELECT * FROM phpgw_reg_accounts 
{$filtermethod} {$querymethod}";
+                       _debug_array($sql);
 
                        $values = array();
                        $this->db->query('SELECT count(*) AS cnt ' . 
substr($sql,strripos($sql,' FROM')),__LINE__,__FILE__);

Modified: branches/dev-syncromind/registration/inc/class.uipending.inc.php
===================================================================
--- branches/dev-syncromind/registration/inc/class.uipending.inc.php    
2015-12-14 16:04:42 UTC (rev 14598)
+++ branches/dev-syncromind/registration/inc/class.uipending.inc.php    
2015-12-14 16:05:19 UTC (rev 14599)
@@ -26,9 +26,9 @@
        * @version $Id: class.uicheck_list.inc.php 8628 2012-01-21 10:42:05Z 
vator $
        */
 
-       phpgw::import_class('phpgwapi.uicommon');
+       phpgw::import_class('phpgwapi.uicommon_jquery');
 
-       class registration_uipending extends phpgwapi_uicommon
+       class registration_uipending extends phpgwapi_uicommon_jquery
        {
                var $cat_id;
                var $start;
@@ -51,7 +51,6 @@
                var $public_functions = array
                (
                        'index'                                                 
        => true,
-                       'index2'                                                
                => true,
                        'query'                                                 
        => true,
                        'edit'                                                  
        => true
                );
@@ -77,129 +76,27 @@
                        self::set_active_menu('registration::pending');
                }
 
+       
                function index()
                {
-
                        if($values = phpgw::get_var('values'))
                        {
                                $values['pending_users'] = 
isset($values['pending_users']) && $values['pending_users'] ? 
array_unique($values['pending_users']) : array();
                                $values['pending_users_orig'] = 
isset($values['pending_users_orig']) && $values['pending_users_orig'] ? 
array_unique($values['pending_users_orig']) : array();
-                               
+
                                $this->bo->approve_users($values);
                                if(isset($values['process_user']) && 
$values['process_user'])
                                {
                                        $this->bo->process_users($values);
                                }
-                               $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'registration.uipending.index'));
                        }
-                       else
-                       {
-                               if(phpgw::get_var('phpgw_return_as') == 'json')
-                               {
-                                       return $this->query();
-                               }
-
-                               $status_list = array
-                               (
-                                       array
-                                       (
-                                               'id'    => 0,
-                                               'name'  => lang('Select status')
-                                       ),
-                                       array
-                                       (
-                                               'id'    => 1,
-                                               'name'  => lang('approved')
-                                       ),
-                                       array
-                                       (
-                                               'id'    => 2,
-                                               'name'  => lang('pending')
-                                       ),
-                               );
-               
-                               $data = array(
-                                       'filter_form'                           
=> array(
-                                               'status_list'                   
=> array('options' => $status_list)
-                                       ),
-                                       'datatable' => array(
-                                               'source' => 
self::link(array('menuaction' => 'registration.uipending.query', 
'phpgw_return_as' => 'json')),
-                                               'field' => array(
-                                                       array(
-                                                               'key' => 'id',
-                                                               'hidden' => true
-                                                       ),
-                                                       array(
-                                                               'key' => 
'reg_id',
-                                                               'label' => 
lang('id'),
-                                                               'sortable'      
=> true,
-                                                               'formatter' => 
'formatLinkPending'
-                                                       ),
-                                                       array(
-                                                               'key'   =>      
'reg_lid',
-                                                               'label' =>      
lang('user'),
-                                                               'sortable'      
=>      true
-                                                       ),
-                                                       array(
-                                                               'key' => 
'reg_dla',
-                                                               'label' => 
lang('time'),
-                                                               'sortable'      
=> true
-                                                       ),
-                                                       array(
-                                                               'key' => 
'reg_approved',
-                                                               'label' => 
lang('approved'),
-                                                               'sortable'      
=> true,
-                                                               'formatter' => 
'FormatterCenter'
-                                                       ),
-                                                       array(
-                                                               'key' => 
'location_code',
-                                                               'label' => 
lang('location'),
-                                                               'sortable'      
=> false
-                                                       ),
-
-                                                       array(
-                                                                       'key' 
=> 'checked',
-                                                                       'label' 
=> lang('approve'),
-                                                                       
'sortable' => false,
-                                                                       
'formatter' => 'formatterCheckPending',
-                                                                       
'className' => 'mychecks'
-                                                       ),
-                                                       array(
-                                                               'key' => 
'actions',
-                                                               'hidden' => true
-                                                       ),
-                                                       array(
-                                                               'key' => 
'labels',
-                                                               'hidden' => true
-                                                       ),
-                                                       array(
-                                                               'key' => 'ajax',
-                                                               'hidden' => true
-                                                       ),array(
-                                                               'key' => 
'parameters',
-                                                               'hidden' => true
-                                                       )                       
                
-                                               )
-                                       )
-                               );
-                       
-                               self::add_javascript('registration', 'yahoo', 
'pending.index.js');
-                               
self::render_template_xsl(array('pending_users'), $data);
-                       }       
-               }
-       
-
-               function index2()
-               {
                        if(phpgw::get_var('phpgw_return_as') == 'json')
                        {
                                return $this->query();
                        }
 
-                       self::add_javascript('phpgwapi', 'yahoo', 
'datatable.js');
-                       self::add_javascript('registration', 'yahoo', 
'pending.index2.js');
+                       self::add_javascript('registration', 'portico', 
'pending.index.js');
 
-
                        $status_list = array
                        (
                                array
@@ -226,42 +123,18 @@
                                'form' => array(
                                        'toolbar' => array(
                                                'item' => array(
-                                                       array(
-                                                               'type' => 
'link',
-                                                               'value' => 
lang('invert checkboxes'),
-                                                               'href' => 
"javascript:checkAll('mychecks')"
-                                                       ),
-                                                       array(
-                                                               'type' => 
'link',
-                                                               'value' => 
lang('save'),
-                                                               'href' => 
"javascript:onSave()"
-                                                       ),
-                                                       
                                                        array('type' => 
'filter', 
-                                                               'name' => 
'reg_dla',
+                                                               'name' => 
'status_id',
                                 'text' => lang('status').':',
                                 'list' => $status_list,
                                                        ),
-                                                       array('type' => 'text', 
-                                'text' => lang('searchfield'),
-                                                               'name' => 
'query'
-                                                       ),
-                                                       array(
-                                                               'type' => 
'submit',
-                                                               'name' => 
'search',
-                                                               'value' => 
lang('Search')
-                                                       ),
-                                                       array(
-                                                               'type' => 
'link',
-                                                               'value' => 
$_SESSION['showall'] ? lang('Show only active') : lang('Show all'),
-                                                               'href' => 
self::link(array('menuaction' => $this->url_prefix.'.toggle_show_showall'))
-                                                       //      'href' => 
self::link(array('menuaction' => 'registration.uipending.index2', 
'phpgw_return_as' => 'json', 'all'))
-                                                       ),
                                                ),
                                        ),
                                ),
                                'datatable' => array(
-                                       'source' => 
self::link(array('menuaction' => 'registration.uipending.index2', 
'phpgw_return_as' => 'json')),
+                                       'source' => 
self::link(array('menuaction' => 'registration.uipending.index', 
'phpgw_return_as' => 'json')),
+                                       'ungroup_buttons'=> true,
+                                       'allrows'                => true,
                                        'field' => array(
                                                array(
                                                        'key' => 'reg_id',
@@ -283,7 +156,7 @@
                                                        'key' => 'reg_approved',
                                                        'label' => 
lang('approved'),
                                                        'sortable'      => true,
-                                                       'formatter' => "''"
+                                                       'formatter' => 
'JqueryPortico.FormatterCenter'
                                                ),
                                                array(
                                                        'key' => 
'location_code',
@@ -298,23 +171,6 @@
                                                                'formatter' => 
'formatterCheckPending',
                                                                'className' => 
'mychecks',
                                                ),
-/*
-                                               array(
-                                                               'key' => 
'actions',
-                                                               'hidden' => true
-                                                       ),
-                                                       array(
-                                                               'key' => 
'labels',
-                                                               'hidden' => true
-                                                       ),
-                                                       array(
-                                                               'key' => 'ajax',
-                                                               'hidden' => true
-                                                       ),array(
-                                                               'key' => 
'parameters',
-                                                               'hidden' => true
-                                                       )                       
                
-*/
                                        ),
                                ),
                        );
@@ -326,7 +182,7 @@
                                                array
                                                (
                                                        'name'          => 'id',
-                                                       'source'        => 'id'
+                                                       'source'        => 
'reg_id'
                                                ),
                                        )
                                );
@@ -342,11 +198,56 @@
                                                'parameters'    => 
json_encode($parameters)
                                        );
                                        
-       //              $data['datatable']['editor_action'] = 
'rental.uiprice_item.set_value';
+//                     if($this->acl_edit)
+                       {
+                               $link = self::link(array(
+                                       'menuaction'             => 
'registration.uipending.index',
+                                       'phpgw_return_as'        => 'json'
+                               ));
 
-//_debug_array($data);die();
+                               $code = '
+                                       var link = "' . $link . '";
+                                       var pending_users = [];
+                                       var pending_users_orig = [];
 
-                       self::render_template_xsl(array('datatable_common'), 
$data);
+                                       $(".mychecks:checked").each(function () 
{
+                                                       
pending_users.push($(this).val());
+                                       });
+
+                                       $(".orig_check").each(function () {
+                                                       
pending_users_orig.push($(this).val());
+                                       });
+
+                                       var data = {values:{"pending_users": 
pending_users, "pending_users_orig": pending_users_orig, "process_user":1}};
+                                       execute_ajax(link, function(result){
+                                               
document.getElementById("message").innerHTML = "";
+                                               if (typeof(result.message) !== 
"undefined")
+                                               {
+                                                       $.each(result.message, 
function (k, v) {
+                                                               
document.getElementById("message").innerHTML = v.msg + "<br/>";
+                                                       });
+                                               }
+                                               if (typeof(result.error) !== 
"undefined")
+                                               {
+                                                       $.each(result.error, 
function (k, v) {
+                                                               
document.getElementById("message").innerHTML += v.msg + "<br/>";
+                                                       });
+                                               }
+                                               oTable.fnDraw();
+                                       }, data, "POST", "JSON");
+                               ';
+
+                               $data['datatable']['actions'][] = array
+                                       (
+                                       'my_name'                => 'save',
+                                       'type'                   => 'custom',
+                                       'custom_code'    => $code,
+                                       'text'                   => lang('save')
+                               );
+                       }
+
+
+                       self::render_template_xsl(array('datatable_jquery'), 
$data);
                }
 
 
@@ -544,11 +445,10 @@
                        );
                        $active_tab = 'main';
 
-                       phpgwapi_jquery::tabview_setup('edit_user_tabview');
 
                        $data = array
                        (
-                               'tabs'                                  => 
phpgwapi_jquery::tabview_generate($tabs, $active_tab),
+                               'tabs'                                  => 
phpgwapi_jquery::tabview_generate($tabs, $active_tab, 'edit_user_tabview'),
                                'value_id'                              => $id,
                                'user_data'                             => 
$user_data,
                                'location_data'                 => 
$location_data,
@@ -564,12 +464,26 @@
        
                public function query()
                {
-                       $status_id = phpgw::get_var('status_id');
+                       $search  = phpgw::get_var('search');
+                       $order   = phpgw::get_var('order');
+                       $draw    = phpgw::get_var('draw', 'int');
+                       $columns = phpgw::get_var('columns');
 
+                       $params = array
+                               (
+                               'start'          => phpgw::get_var('start', 
'int', 'REQUEST', 0),
+                               'results'        => phpgw::get_var('length', 
'int', 'REQUEST', 0),
+                               'query'          => $search['value'],
+                               'order'          => 
$columns[$order[0]['column']]['data'],
+                               'sort'           => $order[0]['dir'],
+                               'filter'         => $this->filter,
+                               'allrows'        => phpgw::get_var('length', 
'int') == -1,
+                               'status_id' => phpgw::get_var('status_id')
+                       );
+
                        $this->bo->start = phpgw::get_var('startIndex');
                
-                       $user_list = $this->bo->read(array('user_id' => 
$user_id, 'role_id' =>$role_id, 
'type_id'=>$type_id,'lookup_tenant'=>$lookup_tenant,
-                                                                               
                   'lookup'=>$lookup,'allrows'=>$this->allrows,'dry_run' 
=>$dry_run));
+                       $user_list = $this->bo->read($params);
                        
                        foreach($user_list as &$user)
                        {
@@ -582,24 +496,8 @@
                        $results['sort'] = 'reg_lid';
                        $results['dir'] = $this->bo->sort ? $this->bo->sort : 
'ASC';
                                        
-                       array_walk($results['results'], array($this, 
'add_actions'), array($type));
 //_debug_array($results);                                              
-                       return $this->yui_results($results);
+                       return $this->jquery_results($results);
                }
 
-               public function add_actions(&$value, $key, $params)
-               {
-                       //Defining new columns
-                       $value['ajax'] = array();
-                       $value['actions'] = array();
-                       $value['labels'] = array();
-       
-                       $value['ajax'][] = true;
-                       $value['actions'][] = 
html_entity_decode(self::link(array('menuaction' => 'rental._uibilling.delete', 
'id' => $value['id'])));
-                       $value['labels'][] = lang('delete');
-                       $value['ajax'][] = true;
-                       $value['actions'][] = 
html_entity_decode(self::link(array('menuaction' => 'rental._uibilling.commit', 
'id' => $value['id'])));
-                       $value['labels'][] = lang('commit');
-           }
-
        }

Added: branches/dev-syncromind/registration/js/portico/pending.index.js
===================================================================
--- branches/dev-syncromind/registration/js/portico/pending.index.js            
                (rev 0)
+++ branches/dev-syncromind/registration/js/portico/pending.index.js    
2015-12-14 16:05:19 UTC (rev 14599)
@@ -0,0 +1,23 @@
+       var main_source;
+       var oArgs_edit = {menuaction:'registration.uipending.edit'};
+       var edit_Url = phpGWLink('index.php', oArgs_edit);
+
+       formatLinkPending = function (key, oData)
+       {
+               var id = oData[key];
+               return '<a href="' + edit_Url + '&id=' + id + '">' + 
lang['edit'] + '</a>';
+       };
+
+
+       var formatterCheckPending = function (key, oData)
+       {
+               var checked = '';
+               var hidden = '';
+               if(oData['reg_approved'])
+               {
+                       checked = "checked = 'checked'";
+                       hidden = "<input type=\"hidden\" class=\"orig_check\"  
name=\"values[pending_users_orig][]\" value=\""+oData['reg_id']+"\"/>";
+               }
+               return hidden + "<center><input type=\"checkbox\" 
class=\"mychecks\"" + checked + "value=\""+oData['reg_id']+"\" 
name=\"values[pending_users][]\"/></center>";
+       };
+

Modified: branches/dev-syncromind/registration/templates/base/user_edit.xsl
===================================================================
--- branches/dev-syncromind/registration/templates/base/user_edit.xsl   
2015-12-14 16:04:42 UTC (rev 14598)
+++ branches/dev-syncromind/registration/templates/base/user_edit.xsl   
2015-12-14 16:05:19 UTC (rev 14599)
@@ -2,216 +2,225 @@
 <!-- item  -->
 
 <xsl:template match="data" xmlns:php="http://php.net/xsl";>
-<xsl:call-template name="yui_phpgw_i18n"/>
-<div class="identifier-header">
-<h1><img src="{img_go_home}" /> 
-               <xsl:value-of select="php:function('lang', 'edit user')" />
-</h1>
-</div>
-       <div class="yui-navset yui-navset-top" id="edit_user_tabview">
+       <div class="identifier-header">
+               <h1>
+                       <xsl:value-of select="php:function('lang', 'edit 
user')" />
+               </h1>
+       </div>
+       <div id="edit_user_tabview">
                <xsl:value-of disable-output-escaping="yes" select="tabs" />
 
-                       <form action="#" method="post" name="form">
-       <div class="yui-content">
-               <div id="main">
+               <form action="#" method="post" name="form">
+                       <div class="yui-content">
+                               <div id="main">
 
-                               <input type="hidden" name="id" value = 
"{value_id}">
-                               </input>
-                               <table>
-                                       <xsl:for-each select="user_data">
+                                       <input type="hidden" name="id" value = 
"{value_id}">
+                                       </input>
+                                       <table>
+                                               <xsl:for-each 
select="user_data">
+                                                       <tr>
+                                                               <td>
+                                                                       
<xsl:value-of select="text"/>
+                                                               </td>
+                                                               <td>
+                                                                       
<xsl:value-of select="value"/>
+                                                               </td>
+                                                       </tr>
+                                               </xsl:for-each>
+                                               <xsl:call-template 
name="location_form"/>
                                                <tr>
                                                        <td>
-                                                               <xsl:value-of 
select="text"/>
+                                                               <xsl:value-of 
select="php:function('lang', 'approve')" />
                                                        </td>
                                                        <td>
-                                                               <xsl:value-of 
select="value"/>
+                                                               <input 
type="checkbox" name="values[approve]" value="1">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="php:function('lang', 'approve')"/>
+                                                                       
</xsl:attribute>
+                                                                       <xsl:if 
test="value_approved = '1'">
+                                                                               
<xsl:attribute name="checked">
+                                                                               
        <xsl:text>checked</xsl:text>
+                                                                               
</xsl:attribute>
+                                                                       
</xsl:if>
+                                                               </input>
                                                        </td>
                                                </tr>
-                                       </xsl:for-each>
-                                       <xsl:call-template 
name="location_form"/>                       
-                                       <tr>
-                                               <td>
-                                                       <xsl:value-of 
select="php:function('lang', 'approve')" />
-                                               </td>
-                                               <td>
-                                                       <input type="checkbox" 
name="values[approve]" value="1">
-                                                               <xsl:attribute 
name="title">
-                                                                       
<xsl:value-of select="php:function('lang', 'approve')"/>
-                                                               </xsl:attribute>
-                                                               <xsl:if 
test="value_approved = '1'">
-                                                                       
<xsl:attribute name="checked">
-                                                                               
<xsl:text>checked</xsl:text>
+                                               <tr>
+                                                       <td>
+                                                               <xsl:value-of 
select="php:function('lang', 'process')" />
+                                                       </td>
+                                                       <td>
+                                                               <input 
type="checkbox" name="values[pending_users][]" value="{value_id}">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="php:function('lang', 'process approved')"/>
                                                                        
</xsl:attribute>
-                                                               </xsl:if>
-                                                       </input>
-                                               </td>
-                                       </tr>
-                                       <tr>
-                                               <td>
-                                                       <xsl:value-of 
select="php:function('lang', 'process')" />
-                                               </td>
-                                               <td>
-                                                       <input type="checkbox" 
name="values[pending_users][]" value="{value_id}">
-                                                               <xsl:attribute 
name="title">
-                                                                       
<xsl:value-of select="php:function('lang', 'process approved')"/>
-                                                               </xsl:attribute>
-                                                       </input>
-                                               </td>
-                                       </tr>
-                               </table>
-               </div>
-                                               <div id="groups">
-                                                       <h2><xsl:value-of 
select="php:function('lang', 'groups')" /></h2>
-                                                       <ul class="group_list">
-                                                               
<xsl:apply-templates select="group_list" />
-                                                       </ul>
-                                               </div>
-                                               <div id="apps">
-                                                       <h2><xsl:value-of 
select="php:function('lang', 'applications')" /></h2>
-                                                       <table class="app_list">
-                                                               <thead>
-                                                                       <tr>
-                                                                               
<th>
-                                                                               
        <xsl:value-of select="php:function('lang', 'Application')" />
-                                                                               
</th>
-                                                                               
<th>
-                                                                               
        <xsl:value-of select="php:function('lang', 'User access')" />
-                                                                               
</th>
-                                                                               
<th>
-                                                                               
        <xsl:value-of select="php:function('lang', 'Admin')" />
-                                                                               
</th>
-                                                                       </tr>
-                                                               </thead>
-                                                               <tbody>
-                                                                       
<xsl:apply-templates select="app_list" />
-                                                               </tbody>
-                                                       </table>
-                                               </div>
+                                                               </input>
+                                                       </td>
+                                               </tr>
+                                       </table>
+                               </div>
+                               <div id="groups">
+                                       <h2>
+                                               <xsl:value-of 
select="php:function('lang', 'groups')" />
+                                       </h2>
+                                       <ul class="group_list">
+                                               <xsl:apply-templates 
select="group_list" />
+                                       </ul>
+                               </div>
+                               <div id="apps">
+                                       <h2>
+                                               <xsl:value-of 
select="php:function('lang', 'applications')" />
+                                       </h2>
+                                       <table class="app_list">
+                                               <thead>
+                                                       <tr>
+                                                               <th>
+                                                                       
<xsl:value-of select="php:function('lang', 'Application')" />
+                                                               </th>
+                                                               <th>
+                                                                       
<xsl:value-of select="php:function('lang', 'User access')" />
+                                                               </th>
+                                                               <th>
+                                                                       
<xsl:value-of select="php:function('lang', 'Admin')" />
+                                                               </th>
+                                                       </tr>
+                                               </thead>
+                                               <tbody>
+                                                       <xsl:apply-templates 
select="app_list" />
+                                               </tbody>
+                                       </table>
+                               </div>
 
                        </div>
-                               <div class="form-buttons">
-                                       <xsl:variable 
name="lang_save"><xsl:value-of select="php:function('lang', 'save')" 
/></xsl:variable>
-                                       <xsl:variable 
name="lang_cancel"><xsl:value-of select="php:function('lang', 'cancel')" 
/></xsl:variable>
-                                       <xsl:variable 
name="lang_delete"><xsl:value-of select="php:function('lang', 'delete')" 
/></xsl:variable>
-                                       <input type="submit" name="save" 
value="{$lang_save}" title = "{$lang_save}" />
-                                       <input type="submit" name="delete" 
value="{$lang_delete}" title = "{$lang_delete}" />
-                                       <input type="submit" name="cancel" 
value="{$lang_cancel}" title = "{$lang_cancel}" />
-                               </div>
+                       <div class="form-buttons">
+                               <xsl:variable name="lang_save">
+                                       <xsl:value-of 
select="php:function('lang', 'save')" />
+                               </xsl:variable>
+                               <xsl:variable name="lang_cancel">
+                                       <xsl:value-of 
select="php:function('lang', 'cancel')" />
+                               </xsl:variable>
+                               <xsl:variable name="lang_delete">
+                                       <xsl:value-of 
select="php:function('lang', 'delete')" />
+                               </xsl:variable>
+                               <input type="submit" name="save" 
value="{$lang_save}" title = "{$lang_save}" />
+                               <input type="submit" name="delete" 
value="{$lang_delete}" title = "{$lang_delete}" />
+                               <input type="submit" name="cancel" 
value="{$lang_cancel}" title = "{$lang_cancel}" />
+                       </div>
 
-                       </form>
+               </form>
        </div>
 </xsl:template>
        
 <!-- BEGIN group_list -->
-       <xsl:template match="group_list">
-               <li>
-                       <xsl:attribute name="class">
-                               <xsl:choose>
-                                       <xsl:when test="position() mod 2 = 0">
-                                               <xsl:text>row_off</xsl:text>
-                                       </xsl:when>
-                                       <xsl:otherwise>
-                                               <xsl:text>row_on</xsl:text>
-                                       </xsl:otherwise>
-                               </xsl:choose>
-                       </xsl:attribute>
+<xsl:template match="group_list">
+       <li>
+               <xsl:attribute name="class">
                        <xsl:choose>
-                               <xsl:when test="i_am_admin = 1">
-                                       <input type="checkbox" 
id="account_groups{account_id}" name="account_groups[]" value="{account_id}">
+                               <xsl:when test="position() mod 2 = 0">
+                                       <xsl:text>row_off</xsl:text>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:text>row_on</xsl:text>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:attribute>
+               <xsl:choose>
+                       <xsl:when test="i_am_admin = 1">
+                               <input type="checkbox" 
id="account_groups{account_id}" name="account_groups[]" value="{account_id}">
+                                       <xsl:if test="checked = 1">
+                                               <xsl:attribute name="checked" 
value="checked" />
+                                       </xsl:if>
+                               </input>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <input type="checkbox" readonly='true'>
+                                       <xsl:if test="checked = 1">
+                                               <xsl:attribute name="checked" 
value="checked" />
+                                       </xsl:if>
+                               </input>
+                               <input type="hidden" 
id="account_groups{account_id}" name="account_groups[]">
+                                       <xsl:if test="checked = 1">
+                                               <xsl:attribute name="value">
+                                                       <xsl:value-of 
select="account_id"/>
+                                               </xsl:attribute>
+                                       </xsl:if>
+                               </input>
+                       </xsl:otherwise>
+               </xsl:choose>
+
+               <xsl:value-of select="account_lid"/>
+       </li>
+</xsl:template>
+
+<!-- BEGIN app_list -->
+
+<xsl:template match="app_list">
+       <tr>
+               <xsl:attribute name="class">
+                       <xsl:choose>
+                               <xsl:when test="position() mod 2 = 0">
+                                       <xsl:text>row_off</xsl:text>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:text>row_on</xsl:text>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:attribute>
+               <td>
+                       <xsl:value-of select="app_title"/>
+
+               </td>
+               <xsl:choose>
+                       <xsl:when test="i_am_admin = 1">
+                               <td>
+                                       <input type="checkbox" 
id="{checkbox_name}" name="{checkbox_name}" value="1">
                                                <xsl:if test="checked = 1">
                                                        <xsl:attribute 
name="checked" value="checked" />
                                                </xsl:if>
                                        </input>
-                               </xsl:when>
-                               <xsl:otherwise>
+                               </td>
+                               <td>
+                                       <input type="checkbox" 
id="{checkbox_name_admin}" name="{checkbox_name_admin}" value="2">
+                                               <xsl:if test="checked_admin = 
1">
+                                                       <xsl:attribute 
name="checked" value="checked" />
+                                               </xsl:if>
+                                       </input>
+                               </td>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <td>
                                        <input type="checkbox" readonly='true'>
                                                <xsl:if test="checked = 1">
                                                        <xsl:attribute 
name="checked" value="checked" />
                                                </xsl:if>
                                        </input>
-                                       <input type="hidden" 
id="account_groups{account_id}" name="account_groups[]">
+                                       <input type="hidden" 
id="{checkbox_name}" name="{checkbox_name}">
                                                <xsl:if test="checked = 1">
                                                        <xsl:attribute 
name="value">
-                                                               <xsl:value-of 
select="account_id"/>
+                                                               
<xsl:text>1</xsl:text>
                                                        </xsl:attribute>
                                                </xsl:if>
                                        </input>
-                               </xsl:otherwise>
-                       </xsl:choose>
+                               </td>
+                               <td>
+                                       <input type="checkbox" readonly='true'>
+                                               <xsl:if test="checked_admin = 
1">
+                                                       <xsl:attribute 
name="checked" value="checked" />
+                                               </xsl:if>
+                                       </input>
+                                       <input type="hidden" 
id="{checkbox_name_admin}" name="{checkbox_name_admin}">
+                                               <xsl:if test="checked_admin = 
1">
+                                                       <xsl:attribute 
name="value">
+                                                               
<xsl:text>2</xsl:text>
+                                                       </xsl:attribute>
+                                               </xsl:if>
+                                       </input>
+                               </td>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </tr>
+</xsl:template>
 
-                       <xsl:value-of select="account_lid"/>
-               </li>
-       </xsl:template>
-
-<!-- BEGIN app_list -->
-
-       <xsl:template match="app_list">
-               <tr>
-                       <xsl:attribute name="class">
-                               <xsl:choose>
-                                       <xsl:when test="position() mod 2 = 0">
-                                               <xsl:text>row_off</xsl:text>
-                                       </xsl:when>
-                                       <xsl:otherwise>
-                                               <xsl:text>row_on</xsl:text>
-                                       </xsl:otherwise>
-                               </xsl:choose>
-                       </xsl:attribute>
-                       <td>
-                               <xsl:value-of select="app_title"/>
-
-                       </td>
-                       <xsl:choose>
-                               <xsl:when test="i_am_admin = 1">
-                                       <td>
-                                               <input type="checkbox" 
id="{checkbox_name}" name="{checkbox_name}" value="1">
-                                                       <xsl:if test="checked = 
1">
-                                                               <xsl:attribute 
name="checked" value="checked" />
-                                                       </xsl:if>
-                                               </input>
-                                       </td>
-                                       <td>
-                                               <input type="checkbox" 
id="{checkbox_name_admin}" name="{checkbox_name_admin}" value="2">
-                                                       <xsl:if 
test="checked_admin = 1">
-                                                               <xsl:attribute 
name="checked" value="checked" />
-                                                       </xsl:if>
-                                               </input>
-                                       </td>
-                               </xsl:when>
-                               <xsl:otherwise>
-                                       <td>
-                                               <input type="checkbox" 
readonly='true'>
-                                                       <xsl:if test="checked = 
1">
-                                                               <xsl:attribute 
name="checked" value="checked" />
-                                                       </xsl:if>
-                                               </input>
-                                               <input type="hidden" 
id="{checkbox_name}" name="{checkbox_name}">
-                                                       <xsl:if test="checked = 
1">
-                                                               <xsl:attribute 
name="value">
-                                                                       
<xsl:text>1</xsl:text>
-                                                               </xsl:attribute>
-                                                       </xsl:if>
-                                               </input>
-                                       </td>
-                                       <td>
-                                               <input type="checkbox" 
readonly='true'>
-                                                       <xsl:if 
test="checked_admin = 1">
-                                                               <xsl:attribute 
name="checked" value="checked" />
-                                                       </xsl:if>
-                                               </input>
-                                               <input type="hidden" 
id="{checkbox_name_admin}" name="{checkbox_name_admin}">
-                                                       <xsl:if 
test="checked_admin = 1">
-                                                               <xsl:attribute 
name="value">
-                                                                       
<xsl:text>2</xsl:text>
-                                                               </xsl:attribute>
-                                                       </xsl:if>
-                                               </input>
-                                       </td>
-                               </xsl:otherwise>
-                       </xsl:choose>
-               </tr>
-       </xsl:template>
-
 <xsl:template match="options">
        <option value="{id}">
                <xsl:if test="selected != 0">




reply via email to

[Prev in Thread] Current Thread [Next in Thread]