[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14706] more fixes
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [14706] more fixes |
Date: |
Mon, 08 Feb 2016 12:35:52 +0000 |
Revision: 14706
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14706
Author: sigurdne
Date: 2016-02-08 12:35:50 +0000 (Mon, 08 Feb 2016)
Log Message:
-----------
more fixes
Modified Paths:
--------------
branches/dev-syncromind/phpgwapi/inc/class.custom_fields.inc.php
branches/dev-syncromind/phpgwapi/setup/phpgw_no.lang
branches/dev-syncromind/property/inc/class.uientity.inc.php
branches/dev-syncromind/property/inc/class.uiproject.inc.php
branches/dev-syncromind/property/templates/base/entity.xsl
Added Paths:
-----------
branches/dev-syncromind/phpgwapi/templates/base/conditional_function.xsl
Modified: branches/dev-syncromind/phpgwapi/inc/class.custom_fields.inc.php
===================================================================
--- branches/dev-syncromind/phpgwapi/inc/class.custom_fields.inc.php
2016-02-07 15:57:26 UTC (rev 14705)
+++ branches/dev-syncromind/phpgwapi/inc/class.custom_fields.inc.php
2016-02-08 12:35:50 UTC (rev 14706)
@@ -1467,8 +1467,8 @@
array
(
'id' => 0,
- 'name' => lang('attributes'),
- 'descr' => lang('attributes')
+ 'name' => lang('features'),
+ 'descr' => lang('features')
)
);
$groups = $this->find_group($appname, $location, 0, '',
'ASC', 'group_sort', true);
Modified: branches/dev-syncromind/phpgwapi/setup/phpgw_no.lang
===================================================================
--- branches/dev-syncromind/phpgwapi/setup/phpgw_no.lang 2016-02-07
15:57:26 UTC (rev 14705)
+++ branches/dev-syncromind/phpgwapi/setup/phpgw_no.lang 2016-02-08
12:35:50 UTC (rev 14706)
@@ -1,3 +1,4 @@
+features common no Egenskaper
select none common no Velg ingen
bookmarks common no Snarveier
bookmark added common no Snarvei er lagret
Added: branches/dev-syncromind/phpgwapi/templates/base/conditional_function.xsl
===================================================================
--- branches/dev-syncromind/phpgwapi/templates/base/conditional_function.xsl
(rev 0)
+++ branches/dev-syncromind/phpgwapi/templates/base/conditional_function.xsl
2016-02-08 12:35:50 UTC (rev 14706)
@@ -0,0 +1,17 @@
+<!-- $Id: delete.xsl 4237 2009-11-27 23:17:21Z sigurd $ -->
+<func:function name="phpgw:conditional">
+ <xsl:param name="test"/>
+ <xsl:param name="true"/>
+ <xsl:param name="false"/>
+
+ <func:result>
+ <xsl:choose>
+ <xsl:when test="$test">
+ <xsl:value-of select="$true"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$false"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </func:result>
+</func:function>
Modified: branches/dev-syncromind/property/inc/class.uientity.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uientity.inc.php 2016-02-07
15:57:26 UTC (rev 14705)
+++ branches/dev-syncromind/property/inc/class.uientity.inc.php 2016-02-08
12:35:50 UTC (rev 14706)
@@ -146,13 +146,6 @@
$values['vendor_name'] = phpgw::get_var('vendor_name',
'string', 'POST');
$values['date'] = phpgw::get_var('date');
- if(!$this->cat_id)
- {
- $this->receipt['error'][] = array('msg' =>
lang('Please select entity type !'));
-
- return $values;
- }
-
if(!$bypass)
{
$insert_record =
$GLOBALS['phpgw']->session->appsession('insert_record', 'property');
@@ -174,6 +167,11 @@
$origin = $values['origin'];
$origin_id = $values['origin_id'];
}
+ else
+ {
+ $origin =
phpgw::get_var('origin');
+ $origin_id =
phpgw::get_var('origin_id', 'int');
+ }
$interlink = CreateObject('property.interlink');
@@ -187,56 +185,65 @@
);
}
- $category =
$this->soadmin_entity->read_single_category($this->entity_id, $this->cat_id);
-
- if($category['org_unit'])
+ if(isset($values['save']) && $values['save'])
{
- $values['extra']['org_unit_id'] =
phpgw::get_var('org_unit_id', 'int');
- $values['org_unit_id'] =
$values['extra']['org_unit_id'];
- $values['org_unit_name'] =
phpgw::get_var('org_unit_name', 'string');
- }
- if($GLOBALS['phpgw']->session->is_repost())
- {
- $this->receipt['error'][] = array('msg' =>
lang('Hmm... looks like a repost!'));
- }
+ if(!$this->cat_id)
+ {
+ $this->receipt['error'][] = array('msg'
=> lang('Please select entity type !'));
- if((!$values['location'] && !$values['p']) &&
isset($category['location_level']) && $category['location_level'])
- {
- $this->receipt['error'][] = array('msg' =>
lang('Please select a location !'));
- }
+ return $values;
+ }
+ $category =
$this->soadmin_entity->read_single_category($this->entity_id, $this->cat_id);
- if(isset($values_attribute) &&
is_array($values_attribute))
- {
- foreach($values_attribute as $attribute)
+ if($category['org_unit'])
{
- if($attribute['nullable'] != 1 &&
(!$attribute['value'] && !$values['extra'][$attribute['name']]))
+ $values['extra']['org_unit_id'] =
phpgw::get_var('org_unit_id', 'int');
+ $values['org_unit_id'] =
$values['extra']['org_unit_id'];
+ $values['org_unit_name'] =
phpgw::get_var('org_unit_name', 'string');
+ }
+ if($GLOBALS['phpgw']->session->is_repost())
+ {
+ $this->receipt['error'][] = array('msg'
=> lang('Hmm... looks like a repost!'));
+ }
+
+ if((!$values['location'] && !$values['p']) &&
isset($category['location_level']) && $category['location_level'])
+ {
+ $this->receipt['error'][] = array('msg'
=> lang('Please select a location !'));
+ }
+
+ if(isset($values_attribute) &&
is_array($values_attribute))
+ {
+ foreach($values_attribute as $attribute)
{
- $this->receipt['error'][] =
array('msg' => lang('Please enter value for attribute %1',
$attribute['input_text']));
- }
+ if($attribute['nullable'] != 1
&& (!$attribute['value'] && !$values['extra'][$attribute['name']]))
+ {
+
$this->receipt['error'][] = array('msg' => lang('Please enter value for
attribute %1', $attribute['input_text']));
+ }
- if(isset($attribute['value']) &&
$attribute['value'] && $attribute['datatype'] == 'I' &&
!ctype_digit($attribute['value']))
- {
- $this->receipt['error'][] =
array('msg' => lang('Please enter integer for attribute %1',
$attribute['input_text']));
+ if(isset($attribute['value'])
&& $attribute['value'] && $attribute['datatype'] == 'I' &&
!ctype_digit($attribute['value']))
+ {
+
$this->receipt['error'][] = array('msg' => lang('Please enter integer for
attribute %1', $attribute['input_text']));
+ }
}
}
- }
- if($this->receipt['error'])
- {
- if($values['location'])
+ if($this->receipt['error'])
{
- $bolocation =
CreateObject('property.bolocation');
- $location_code = implode("-",
$values['location']);
- $values['extra']['view'] = true;
- $values['location_data'] =
$bolocation->read_single($location_code, $values['extra']);
+ if($values['location'])
+ {
+ $bolocation =
CreateObject('property.bolocation');
+ $location_code = implode("-",
$values['location']);
+ $values['extra']['view'] = true;
+ $values['location_data'] =
$bolocation->read_single($location_code, $values['extra']);
+ }
+ if($values['extra']['p_num'])
+ {
+
$values['p'][$values['extra']['p_entity_id']]['p_num'] =
$values['extra']['p_num'];
+
$values['p'][$values['extra']['p_entity_id']]['p_entity_id'] =
$values['extra']['p_entity_id'];
+
$values['p'][$values['extra']['p_entity_id']]['p_cat_id'] =
$values['extra']['p_cat_id'];
+
$values['p'][$values['extra']['p_entity_id']]['p_cat_name'] =
phpgw::get_var('entity_cat_name_' . $values['extra']['p_entity_id']);
+ }
}
- if($values['extra']['p_num'])
- {
-
$values['p'][$values['extra']['p_entity_id']]['p_num'] =
$values['extra']['p_num'];
-
$values['p'][$values['extra']['p_entity_id']]['p_entity_id'] =
$values['extra']['p_entity_id'];
-
$values['p'][$values['extra']['p_entity_id']]['p_cat_id'] =
$values['extra']['p_cat_id'];
-
$values['p'][$values['extra']['p_entity_id']]['p_cat_name'] =
phpgw::get_var('entity_cat_name_' . $values['extra']['p_entity_id']);
- }
}
$values['attributes'] = $values_attribute;
@@ -1543,6 +1550,7 @@
{
$values =
$this->bo->read_single(array('entity_id' => $this->entity_id, 'cat_id' =>
$this->cat_id), $values);
}
+ $values = $this->_populate($values);
}
/* Preserve attribute values from post */
@@ -1770,7 +1778,7 @@
{
if($group['level'] == 0)
{
- $_tab_name =
str_replace(' ', '_', $group['name']);
+ $_tab_name =
str_replace(array(' ', '/', '?', '.', '*' ,'(', ')', '[',']' ), '_',
$group['name']);
$active_tab =
$active_tab ? $active_tab : $_tab_name;
$tabs[$_tab_name] =
array('label' => $group['name'], 'link' => "#{$_tab_name}",
'disable' => 0);
@@ -3140,7 +3148,7 @@
$GLOBALS['phpgw']->jqcal->add_listener('active_from');
$GLOBALS['phpgw']->jqcal->add_listener('active_to');
- self::render_template_xsl(array('entity',
'attributes_form', 'files'), array(
+ self::render_template_xsl(array('entity',
'attributes_form', 'files', 'conditional_function'), array(
'add_inventory' => $data));
$GLOBALS['phpgw_info']['flags']['noframework'] = true;
Modified: branches/dev-syncromind/property/inc/class.uiproject.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uiproject.inc.php
2016-02-07 15:57:26 UTC (rev 14705)
+++ branches/dev-syncromind/property/inc/class.uiproject.inc.php
2016-02-08 12:35:50 UTC (rev 14706)
@@ -1339,7 +1339,7 @@
$lookup_type = $mode == 'edit' ? 'form' : 'view';
- //_debug_array($values);
+// _debug_array($values);
$location_data = $bolocation->initiate_ui_location(array
(
'values' => (isset($values['location_data']) ?
$values['location_data'] : ''),
Modified: branches/dev-syncromind/property/templates/base/entity.xsl
===================================================================
--- branches/dev-syncromind/property/templates/base/entity.xsl 2016-02-07
15:57:26 UTC (rev 14705)
+++ branches/dev-syncromind/property/templates/base/entity.xsl 2016-02-08
12:35:50 UTC (rev 14706)
@@ -174,7 +174,6 @@
</fieldset>
</xsl:template>
-
<!-- add inventory -->
<xsl:template xmlns:php="http://php.net/xsl" match="add_inventory">
<fieldset>
@@ -193,7 +192,7 @@
</xsl:choose>
</dl>
<fieldset>
- <xsl:call-template name="location_form2"/>
+ <xsl:call-template name="location_form"/>
<div class="pure-control-group">
<label>
<xsl:value-of
select="php:function('lang', 'id')" />
@@ -340,7 +339,7 @@
</xsl:variable>
<form id="form" name="form" action="{$form_action}"
method="post" ENCTYPE="multipart/form-data" class= "pure-form
pure-form-aligned">
<input type="hidden" name="active_tab"
value="{active_tab}"/>
- <table cellpadding="2" cellspacing="2" width="80%"
align="center">
+ <table cellpadding="2" cellspacing="2" width="80%"
align="left">
<xsl:choose>
<xsl:when test="value_id !=''">
<tr>
@@ -353,7 +352,7 @@
<xsl:if test="cat_list=''">
<xsl:if test="mode = 'edit'">
<tr>
- <td colspan="2"
align="center">
+ <td colspan="2"
align="left">
<xsl:call-template name="table_apply">
<xsl:with-param name="lean" select="lean"/>
<xsl:with-param name="cat_list" select="cat_list"/>
@@ -363,7 +362,7 @@
</xsl:if>
</xsl:if>
</table>
- <table cellpadding="2" cellspacing="2" width="80%"
align="center">
+ <table class="pure-table pure-table-bordered"
width="100%" cellpadding="2" cellspacing="2" align="center">
<xsl:for-each select="origin_list">
<tr>
<td class="th_text">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14706] more fixes,
Sigurd Nes <=