phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] admin/inc class.ui_custom.inc.php


From: Sigurd Nes
Subject: [Phpgroupware-cvs] admin/inc class.ui_custom.inc.php
Date: Mon, 09 Oct 2006 11:51:50 +0000

CVSROOT:        /sources/phpgroupware
Module name:    admin
Changes by:     Sigurd Nes <sigurdne>   06/10/09 11:51:50

Modified files:
        inc            : class.ui_custom.inc.php 

Log message:
        Select location within apps

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/admin/inc/class.ui_custom.inc.php?cvsroot=phpgroupware&r1=1.3&r2=1.4

Patches:
Index: class.ui_custom.inc.php
===================================================================
RCS file: /sources/phpgroupware/admin/inc/class.ui_custom.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- class.ui_custom.inc.php     14 Sep 2006 18:52:16 -0000      1.3
+++ class.ui_custom.inc.php     9 Oct 2006 11:51:50 -0000       1.4
@@ -10,7 +10,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage admin
-       * @version $Id: class.ui_custom.inc.php,v 1.3 2006/09/14 18:52:16 
sigurdne Exp $
+       * @version $Id: class.ui_custom.inc.php,v 1.4 2006/10/09 11:51:50 
sigurdne Exp $
        */
 
        /**
@@ -154,6 +154,7 @@
                                'lang_name'             => lang('Name'),
                        );
 
+                       
                        $table_add[] = array
                        (
                                'lang_add'              => lang('add'),
@@ -231,7 +232,12 @@
 
                        $GLOBALS['phpgw']->xslttpl->add_file(array('custom'));
 
-                       if ($values['save'])
+                       if ($location)
+                       {
+                               $values['location'] = $location;
+                       }
+                       
+                       if (isset($values['save']) && $values['save'])
                        {
                                if($id)
                                {
@@ -240,7 +246,11 @@
                                }
 
                                $values['appname']=$appname;
-                               $values['location']=$location;
+
+                               if (!$values['location'])
+                               {
+                                       $receipt['error'][] = 
array('msg'=>lang('location not selected!'));
+                               }
 
                                if (!$values['column_name'])
                                {
@@ -283,11 +293,9 @@
                                        $receipt['error'][] = 
array('msg'=>lang('Nullable not chosen!'));
                                }
 
-
                                if (!$receipt['error'])
                                {
-
-                                       $receipt = 
$this->bo->save_attrib($values,$action);
+                                       $receipt = 
$this->bo->save_attrib($values);
 
                                        if(!$id)
                                        {
@@ -306,12 +314,10 @@
                                $values = 
$this->bo->read_single_attrib($appname,$location,$id);
                                $type_name=$values['type_name'];
                                $function_msg = lang('edit attribute'). ' ' . 
lang($type_name);
-                               $action='edit';
                        }
                        else
                        {
                                $function_msg = lang('add attribute');
-                               $action='add';
                        }
 
                        $link_data = array
@@ -322,27 +328,27 @@
                                'id'            => $id
                        );
 
-                       if($values['column_info']['type']=='R' || 
$values['column_info']['type']=='CH' || $values['column_info']['type']=='LB')
+                       $multiple_choice = '';
+                       if(isset($values['column_info']['type']) && 
($values['column_info']['type']=='R' || $values['column_info']['type']=='CH' || 
$values['column_info']['type']=='LB'))
                        {
                                $multiple_choice= True;
                        }
 
 //_debug_array($values);
 
-                       $msgbox_data = $this->bocommon->msgbox_data($receipt);
+                       $msgbox_data = 
(isset($receipt)?$this->bocommon->msgbox_data($receipt):'');
 
                        $data = array
                        (
                                'lang_appname'                          => 
lang('appname'),
                                'appname'                               => 
$appname,
                                'lang_location'                         => 
lang('location'),
-                               'location'                              => 
$location,
 
                                'lang_choice'                           => 
lang('Choice'),
                                'lang_new_value'                        => 
lang('New value'),
                                'lang_new_value_statustext'             => 
lang('New value for multiple choice'),
                                'multiple_choice'                       => 
$multiple_choice,
-                               'value_choice'                          => 
$values['choice'],
+                               'value_choice'                                  
        => (isset($values['choice'])?$values['choice']:''),
                                'lang_delete_value'                     => 
lang('Delete value'),
                                'lang_value'                            => 
lang('value'),
                                'lang_delete_choice_statustext'         => 
lang('Delete this value from the list of multiple choice'),
@@ -358,11 +364,11 @@
                                'value_id'                              => $id,
 
                                'lang_column_name'                      => 
lang('Column name'),
-                               'value_column_name'                     => 
$values['column_name'],
+                               'value_column_name'                             
        => (isset($values['column_name'])?$values['column_name']:''),
                                'lang_column_name_statustext'           => 
lang('enter the name for the column'),
 
                                'lang_input_text'                       => 
lang('input text'),
-                               'value_input_text'                      => 
$values['input_text'],
+                               'value_input_text'                              
        => (isset($values['input_text'])?$values['input_text']:''),
                                'lang_input_name_statustext'            => 
lang('enter the input text for records'),
 
                                'lang_id_attribtext'                    => 
lang('Enter the attribute ID'),
@@ -370,7 +376,7 @@
 
                                'lang_statustext'                       => 
lang('Statustext'),
                                'lang_statustext_attribtext'            => 
lang('Enter a statustext for the inputfield in forms'),
-                               'value_statustext'                      => 
$values['statustext'],
+                               'value_statustext'                              
        => (isset($values['statustext'])?$values['statustext']:''),
 
                                'lang_done_attribtext'                  => 
lang('Back to the list'),
                                'lang_save_attribtext'                  => 
lang('Save the attribute'),
@@ -378,37 +384,43 @@
                                'lang_datatype'                         => 
lang('Datatype'),
                                'lang_datatype_statustext'              => 
lang('Select a datatype'),
                                'lang_no_datatype'                      => 
lang('No datatype'),
-                               'datatype_list'                         => 
$this->bocommon->select_datatype($values['column_info']['type']),
+                               'datatype_list'                                 
        => 
$this->bocommon->select_datatype((isset($values['column_info']['type'])?$values['column_info']['type']:'')),
 
                                'lang_precision'                        => 
lang('Precision'),
                                'lang_precision_statustext'             => 
lang('enter the record length'),
-                               'value_precision'                       => 
$values['column_info']['precision'],
+                               'value_precision'                               
        => 
(isset($values['column_info']['precision'])?$values['column_info']['precision']:''),
 
                                'lang_scale'                            => 
lang('scale'),
                                'lang_scale_statustext'                 => 
lang('enter the scale if type is decimal'),
-                               'value_scale'                           => 
$values['column_info']['scale'],
+                               'value_scale'                                   
        => 
(isset($values['column_info']['scale'])?$values['column_info']['scale']:''),
 
                                'lang_default'                          => 
lang('default'),
                                'lang_default_statustext'               => 
lang('enter the default value'),
-                               'value_default'                         => 
$values['column_info']['default'],
+                               'value_default'                                 
        => 
(isset($values['column_info']['default'])?$values['column_info']['default']:''),
 
                                'lang_nullable'                         => 
lang('Nullable'),
                                'lang_nullable_statustext'              => 
lang('Chose if this column is nullable'),
                                'lang_select_nullable'                  => 
lang('Select nullable'),
-                               'nullable_list'                         => 
$this->bocommon->select_nullable($values['column_info']['nullable']),
-                               'value_lookup_form'                     => 
$values['lookup_form'],
+                               'nullable_list'                                 
        => 
$this->bocommon->select_nullable((isset($values['column_info']['nullable'])?$values['column_info']['nullable']:'')),
+                               'value_lookup_form'                             
        => (isset($values['lookup_form'])?$values['lookup_form']:''),
                                'lang_lookup_form'                      => 
lang('show in lookup forms'),
                                'lang_lookup_form_statustext'           => 
lang('check to show this attribue in lookup forms'),
-                               'value_list'                            => 
$values['list'],
+                               'value_list'                                    
        => (isset($values['list'])?$values['list']:''),
                                'lang_list'                             => 
lang('show in list'),
                                'lang_list_statustext'                  => 
lang('check to show this attribute in entity list'),
-                               'value_search'                          => 
$values['search'],
+                               'value_search'                                  
        => (isset($values['search'])?$values['search']:''),
                                'lang_include_search'                   => 
lang('Include in search'),
                                'lang_include_search_statustext'        => 
lang('check to show this attribute in location list'),
 
-                               'value_history'                         => 
$values['history'],
+                               'value_history'                                 
        => (isset($values['history'])?$values['history']:''),
                                'lang_history'                          => 
lang('history'),
                                'lang_history_statustext'               => 
lang('Enable history for this attribute'),
+
+                               'lang_no_location'                              
        => lang('No location'),
+                               'lang_location_statustext'                      
=> lang('Select submodule'),
+                               'select_name_location'                          
=> 'values[location]',
+
+                               'location_list'                                 
        => 
$this->bolocation->select_location('select',$values['location'],False,True)
                        );
 //_debug_array($values);
 




reply via email to

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