[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8401] bkbooking: nsf update application/event and so
From: |
Kjell Arne Espedal |
Subject: |
[Fmsystem-commits] [8401] bkbooking: nsf update application/event and some minor fixes |
Date: |
Wed, 21 Dec 2011 12:27:33 +0000 |
Revision: 8401
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8401
Author: kjell
Date: 2011-12-21 12:27:32 +0000 (Wed, 21 Dec 2011)
Log Message:
-----------
bkbooking: nsf update application/event and some minor fixes
Modified Paths:
--------------
branches/dev-thomasez/booking/inc/class.customer_identifier.inc.php
branches/dev-thomasez/booking/inc/class.soevent.inc.php
branches/dev-thomasez/booking/inc/class.uievent.inc.php
branches/dev-thomasez/booking/setup/tables_current.inc.php
branches/dev-thomasez/booking/setup/tables_update.inc.php
branches/dev-thomasez/booking/templates/base/application.xsl
branches/dev-thomasez/phpgwapi/templates/bkbooking/css/frontend.css
Modified: branches/dev-thomasez/booking/inc/class.customer_identifier.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.customer_identifier.inc.php
2011-12-21 07:38:36 UTC (rev 8400)
+++ branches/dev-thomasez/booking/inc/class.customer_identifier.inc.php
2011-12-21 12:27:32 UTC (rev 8401)
@@ -10,7 +10,7 @@
protected $identifier_type_field;
protected static $valid_types = array(
- self::TYPE_SSN,
+// self::TYPE_SSN,
self::TYPE_ORGANIZATION_NUMBER,
self::TYPE_ADDRESS,
);
@@ -53,7 +53,6 @@
{
$current_type =
isset($_POST[$this->identifier_type_field]) &&
$this->is_valid_customer_identifier_type($_POST[$this->identifier_type_field]) ?
$_POST[$this->identifier_type_field] : null;
-
if (!$current_type) {
$data[$this->identifier_type_field] = null;
foreach ($this->get_valid_types() as $type) {
@@ -63,7 +62,11 @@
}
$identifier_field = $this->field_prefix.$current_type;
- $identifier_value = isset($_POST[$identifier_field]) ?
trim($_POST[$identifier_field]) : null;
+ if ($identifier_field == 'customer_address') {
+ $identifier_value = 'set';
+ } else {
+ $identifier_value =
isset($_POST[$identifier_field]) ? trim($_POST[$identifier_field]) : null;
+ }
if (empty($identifier_value)) {
$data[$this->identifier_type_field] = null;
@@ -71,6 +74,11 @@
} else {
$data[$this->identifier_type_field] =
$current_type;
$data[$identifier_field] = $identifier_value;
+ if ($current_type == 'address'){
+ $data['customer_street'] =
$_POST['customer_street'];
+ $data['customer_zipcode'] =
$_POST['customer_zipcode'];
+ $data['customer_city'] =
$_POST['customer_city'];
+ }
}
@@ -87,7 +95,6 @@
}
$identifier_field =
trim($data[$this->identifier_type_field]);
-
if (empty($identifier_field)) {
return
array($this->field_prefix.$current_type => sprintf('Missing value for
customer\'s %s', $data[$this->identifier_type_field]));
}
@@ -101,7 +108,6 @@
}
}
}
-
return array();
}
Modified: branches/dev-thomasez/booking/inc/class.soevent.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.soevent.inc.php 2011-12-21
07:38:36 UTC (rev 8400)
+++ branches/dev-thomasez/booking/inc/class.soevent.inc.php 2011-12-21
12:27:32 UTC (rev 8401)
@@ -25,6 +25,10 @@
'is_public' => array('type' =>
'int', 'required' => true, 'nullable' => false, 'default' => '1'),
'secret' => array('type' =>
'string', 'required' => true),
'sms_total' => array('type'
=> 'int', 'required' => false),
+ 'customer_street' =>
array('type' => 'string', 'required' => false),
+ 'customer_zipcode' =>
array('type' => 'string', 'required' => false),
+ 'customer_district' =>
array('type' => 'string', 'required' => false),
+ 'customer_city' =>
array('type' => 'string', 'required' => false),
'customer_organization_name' =>
array('type' => 'string', 'required' => False, 'query' => true),
'customer_organization_id'
=> array('type' => 'int', 'required' => False),
'customer_identifier_type'
=> array('type' => 'string', 'required' => False),
Modified: branches/dev-thomasez/booking/inc/class.uievent.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.uievent.inc.php 2011-12-21
07:38:36 UTC (rev 8400)
+++ branches/dev-thomasez/booking/inc/class.uievent.inc.php 2011-12-21
12:27:32 UTC (rev 8401)
@@ -314,7 +314,6 @@
array_set_default($event, 'agegroups', array());
$event['secret'] = $this->generate_secret();
$event['building_name'] =
$_POST['building_name'];
-
if (!$_POST['application_id'])
{
$temp_errors = array();
@@ -375,7 +374,7 @@
}
}
- if ($_POST['cost'] != 0 and
!$event['customer_organization_number'] and !$event['customer_ssn']) {
+ if ($_POST['cost'] != 0 and
!$event['customer_organization_number'] and !$event['customer_ssn'] and
!$event['customer_address']) {
$errors['invoice_data'] = lang('There
is set a cost, but no invoice data is filled inn');
}
if(!$errors['event'] && !$errors['from_'] &&
!$errors['time'] && !$errors['invoice_data'] && !$errors['resource_number'] &&
!$errors['organization_number'] && !$errors['contact_name'] && !$errors['cost'])
Modified: branches/dev-thomasez/booking/setup/tables_current.inc.php
===================================================================
--- branches/dev-thomasez/booking/setup/tables_current.inc.php 2011-12-21
07:38:36 UTC (rev 8400)
+++ branches/dev-thomasez/booking/setup/tables_current.inc.php 2011-12-21
12:27:32 UTC (rev 8401)
@@ -564,6 +564,10 @@
'contact_email' => array('type' => 'varchar',
'precision' => 50,'nullable' => False),
'contact_phone' => array('type' => 'varchar',
'precision' => 50,'nullable' => False),
'completed' => array('type' => 'int',
'precision' => 4,'nullable' => False,'default' => '0'),
+ 'customer_street' => array('type' =>
'varchar','precision' => '255', 'nullable' => True),
+ 'customer_zip_code' => array('type' =>
'varchar','precision' => '255', 'nullable' => True),
+ 'customer_district' => array('type' =>
'varchar','precision' => '255', 'nullable' => True),
+ 'customer_city' => array('type' =>
'varchar','precision' => '255', 'nullable' => True),
'customer_organization_name' => array('type' =>
'varchar', 'precision' => 50,'nullable' => True),
'customer_organization_id' => array('type' =>
'int', 'precision' => 4,'nullable' => True),
'customer_identifier_type' => array('type' =>
'varchar', 'precision' => 255,'nullable' => True),
Modified: branches/dev-thomasez/booking/setup/tables_update.inc.php
===================================================================
--- branches/dev-thomasez/booking/setup/tables_update.inc.php 2011-12-21
07:38:36 UTC (rev 8400)
+++ branches/dev-thomasez/booking/setup/tables_update.inc.php 2011-12-21
12:27:32 UTC (rev 8401)
@@ -2707,6 +2707,10 @@
$GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_application ADD COLUMN customer_zipcode varchar(50) DEFAULT NULL");
$GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_application ADD COLUMN customer_district varchar(50) DEFAULT NULL");
$GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_application ADD COLUMN customer_city varchar(50) DEFAULT NULL");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_event ADD COLUMN customer_street varchar(50) DEFAULT NULL");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_event ADD COLUMN customer_zipcode varchar(50) DEFAULT NULL");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_event ADD COLUMN customer_district varchar(50) DEFAULT NULL");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE
bb_event ADD COLUMN customer_city varchar(50) DEFAULT NULL");
if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
{
Modified: branches/dev-thomasez/booking/templates/base/application.xsl
===================================================================
--- branches/dev-thomasez/booking/templates/base/application.xsl
2011-12-21 07:38:36 UTC (rev 8400)
+++ branches/dev-thomasez/booking/templates/base/application.xsl
2011-12-21 12:27:32 UTC (rev 8401)
@@ -212,6 +212,14 @@
<dt><label for="field_ssn_number"><xsl:value-of
select="php:function('lang', 'Date of birth or SSN')" /></label></dt>
<dd><xsl:value-of
select="application/customer_ssn"/></dd>
</xsl:if>
+ <xsl:if test="application/customer_identifier_type =
'address'">
+ <dt><label for="field_address"><xsl:value-of
select="php:function('lang', 'Address')" /></label></dt>
+ <dd>
+ <xsl:value-of
select="application/customer_street"/><br />
+ <xsl:value-of
select="application/customer_zipcode"/><br />
+ <xsl:value-of
select="application/customer_city"/><br />
+ </dd>
+ </xsl:if>
</dl>
<dl class="form-col">
<div class="heading"><br />8. <xsl:value-of
select="php:function('lang', 'Terms and conditions')" /></div>
Modified: branches/dev-thomasez/phpgwapi/templates/bkbooking/css/frontend.css
===================================================================
--- branches/dev-thomasez/phpgwapi/templates/bkbooking/css/frontend.css
2011-12-21 07:38:36 UTC (rev 8400)
+++ branches/dev-thomasez/phpgwapi/templates/bkbooking/css/frontend.css
2011-12-21 12:27:32 UTC (rev 8401)
@@ -15,7 +15,7 @@
ul#metanav a, ul#sidebar a { color: #700; }
div#content {
margin: 0 2em;
- min-height: 400px;
+ min-height: 500px;
}
#header-search {
float: right;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8401] bkbooking: nsf update application/event and some minor fixes,
Kjell Arne Espedal <=