[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [9756] fixes for activitycalendar
From: |
Erik Holm-Larsen |
Subject: |
[Fmsystem-commits] [9756] fixes for activitycalendar |
Date: |
Wed, 11 Jul 2012 09:01:41 +0000 |
Revision: 9756
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9756
Author: erikhl
Date: 2012-07-11 09:01:40 +0000 (Wed, 11 Jul 2012)
Log Message:
-----------
fixes for activitycalendar
new styling
new logic regarding creating of groups from frontend
Modified Paths:
--------------
trunk/activitycalendar/inc/class.soactivity.inc.php
trunk/activitycalendar/inc/class.soarena.inc.php
trunk/activitycalendar/inc/class.sogroup.inc.php
trunk/activitycalendar/inc/class.soorganization.inc.php
trunk/activitycalendar/inc/class.uiactivities.inc.php
trunk/activitycalendar/inc/class.uiarena.inc.php
trunk/activitycalendar/inc/class.uiorganization.inc.php
trunk/activitycalendar/inc/model/class.activity.inc.php
trunk/activitycalendar/inc/model/class.arena.inc.php
trunk/activitycalendar/inc/model/class.group.inc.php
trunk/activitycalendar/inc/model/class.organization.inc.php
trunk/activitycalendar/setup/phpgw_no.lang
trunk/activitycalendar/setup/setup.inc.php
trunk/activitycalendar/setup/tables_current.inc.php
trunk/activitycalendar/setup/tables_update.inc.php
trunk/activitycalendar/templates/base/activity.php
trunk/activitycalendar/templates/base/dashboard.php
trunk/activitycalendar/templates/base/organization.php
trunk/activitycalendar/templates/base/organization_list_changed.php
trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php
trunk/activitycalendarfrontend/setup/phpgw_no.lang
trunk/activitycalendarfrontend/setup/setup.inc.php
trunk/activitycalendarfrontend/templates/base/activity.php
trunk/activitycalendarfrontend/templates/base/activity_new.php
trunk/activitycalendarfrontend/templates/base/activity_new_step_1.php
trunk/phpgwapi/templates/activitycalendar/css/frontend.css
trunk/phpgwapi/templates/activitycalendar/head.tpl
Added Paths:
-----------
trunk/activitycalendarfrontend/images/
trunk/activitycalendarfrontend/images/hjelp.gif
trunk/phpgwapi/templates/activitycalendar/css/reset-fonts-grids.css
trunk/phpgwapi/templates/activitycalendar/images/hjelp.gif
Modified: trunk/activitycalendar/inc/class.soactivity.inc.php
===================================================================
--- trunk/activitycalendar/inc/class.soactivity.inc.php 2012-07-09 18:27:02 UTC
(rev 9755)
+++ trunk/activitycalendar/inc/class.soactivity.inc.php 2012-07-11 09:01:40 UTC
(rev 9756)
@@ -162,7 +162,7 @@
if(isset($filters['new_activities']))
{
if(!isset($filters['activity_state']) ||
(isset($filters['activity_state']) && $filters['activity_state'] == 'all')){
- $filter_clauses[] = "activity.state=1 OR
activity.state=2";
+ $filter_clauses[] = "(activity.state=1 OR
activity.state=2)";
}
if(isset($filters['activity_state']) &&
$filters['activity_state'] != 'all'){
$activity_state =
$this->marshal($filters['activity_state'],'int');
@@ -268,7 +268,8 @@
$columns[] = 'activity.special_adaptation';
$columns[] = 'activity.secret';
$columns[] = 'activity.frontend';
- $columns[] = 'activity.new_org';
+ $columns[] = 'activity.new_org';
+ $columns[] = 'activity.new_group';
$cols = implode(',',$columns);
}
@@ -341,7 +342,8 @@
'contact_person_2_zip = ' .
$this->marshal($activity->get_contact_person_2_zip(), 'string'),
'special_adaptation = '
.($activity->get_special_adaptation() ? "true" : "false"),
'frontend = '
.($activity->get_frontend() ? "true" : "false"),
- 'new_org = '
.($activity->get_new_org() ? "true" : "false")
+ 'new_org = '
.($activity->get_new_org() ? "true" : "false"),
+ 'new_group = '
.($activity->get_new_group() ? "true" : "false")
);
//var_dump('UPDATE activity_activity SET ' . join(',', $values)
. " WHERE id=$id");
@@ -449,10 +451,11 @@
$activity->set_contact_person_2_zip($this->unmarshal($this->db->f('contact_person_2_zip'),
'string'));
$activity->set_frontend($this->unmarshal($this->db->f('frontend', 'bool')));
$activity->set_new_org($this->unmarshal($this->db->f('new_org', 'bool')));
+
$activity->set_new_group($this->unmarshal($this->db->f('new_group', 'bool')));
if($activity->get_group_id() &&
$activity->get_group_id() > 0)
{
- if($activity->get_new_org())
+ if($activity->get_new_group())
{
$contacts =
activitycalendar_sogroup::get_instance()->get_contacts_local($activity->get_group_id());
$activity->set_contact_persons($contacts);
@@ -482,6 +485,7 @@
}
}
+
return $activity;
}
@@ -1104,17 +1108,9 @@
$email = $org_info['email'];
$description = $org_info['description'];
$street = $org_info['street'];
- $zip = $org_info['zip'];
- if($zip && strlen($zip) > 5)
- {
- $zip_code = substr($zip,0,4);
- $city = substr($zip, 5);
- }
- else
- {
- $zip_code = '';
- $city = '';
- }
+ $streetnumber = $org_info['streetnumber'];
+ $zip_code = $org_info['zip'];
+ $city = $org_info['postaddress'];
$district = $org_info['district'];
$status = $org_info['status'];
$original_org_id = $org_info['original_org_id'];
@@ -1129,8 +1125,9 @@
$columns[] = 'email';
$columns[] = 'description';
$columns[] = 'address';
- //$columns[] = 'zip_code';
- //$columns[] = 'city';
+ $columns[] = 'addressnumber';
+ $columns[] = 'zip_code';
+ $columns[] = 'city';
$columns[] = 'orgno';
$columns[] = 'district';
$columns[] = 'change_type';
@@ -1143,8 +1140,9 @@
$values[] = "'{$email}'";
$values[] = "'{$description}'";
$values[] = "'{$street}'";
- //$values[] = "'{$zip_code}'";
- //$values[] = "'{$city}'";
+ $values[] = "'{$streetnumber}'";
+ $values[] = "'{$zip_code}'";
+ $values[] = "'{$city}'";
$values[] = "'{$orgnr}'";
$values[] = "'{$district}'";
$values[] = "'{$status}'";
@@ -1344,58 +1342,23 @@
function get_activities_for_update($org_id, $group = false)
{
- $activities = array();
+ $activity_ids = array();
if($group)
{
- $sql = "SELECT * FROM activity_activity WHERE new_org
AND group_id={$org_id}";
+ $sql = "SELECT id FROM activity_activity WHERE
new_group AND group_id={$org_id}";
}
else
{
- $sql = "SELECT * FROM activity_activity WHERE new_org
AND organization_id={$org_id}";
+ $sql = "SELECT id FROM activity_activity WHERE new_org
AND organization_id={$org_id}";
}
- //var_dump($sql);
+
$this->db->query($sql, __LINE__, __FILE__);
while ($this->db->next_record())
- {
- $activity = new activitycalendar_activity((int)
$this->db->f('id'));
-
-
$activity->set_title($this->unmarshal($this->db->f('title'), 'string'));
-
$activity->set_organization_id($this->unmarshal($this->db->f('organization_id'),
'int'));
-
$activity->set_group_id($this->unmarshal($this->db->f('group_id'), 'int'));
-
$activity->set_district($this->unmarshal($this->db->f('district'), 'string'));
-
$activity->set_office($this->unmarshal($this->db->f('office'), 'int'));
-
$activity->set_category($this->unmarshal($this->db->f('category'), 'int'));
-
$activity->set_state($this->unmarshal($this->db->f('state'), 'int'));
-
$activity->set_target($this->unmarshal($this->db->f('target'), 'string'));
-
$activity->set_description($this->unmarshal($this->db->f('description'),
'string'));
-
$activity->set_arena($this->unmarshal($this->db->f('arena'), 'string'));
-
$activity->set_internal_arena($this->unmarshal($this->db->f('internal_arena'),
'string'));
-
$activity->set_time($this->unmarshal($this->db->f('time'), 'string'));
-
$activity->set_last_change_date($this->unmarshal($this->db->f('last_change_date'),
'int'));
-
$activity->set_special_adaptation($this->unmarshal($this->db->f('special_adaptation',
'bool')));
-
$activity->set_secret($this->unmarshal($this->db->f('secret'), 'string'));
-
$activity->set_contact_person_2_address($this->unmarshal($this->db->f('contact_person_2_address'),
'string'));
-
$activity->set_contact_person_2_zip($this->unmarshal($this->db->f('contact_person_2_zip'),
'string'));
-
$activity->set_frontend($this->unmarshal($this->db->f('frontend', 'bool')));
-
$activity->set_new_org($this->unmarshal($this->db->f('new_org', 'bool')));
-
- if($activity->get_group_id() &&
$activity->get_group_id() > 0)
- {
- $contacts =
activitycalendar_sogroup::get_instance()->get_contacts($activity->get_group_id());
- $activity->set_contact_persons($contacts);
- $org_tmp =
activitycalendar_sogroup::get_instance()->get_orgid_from_group($activity->get_group_id());
- $activity->set_organization_id($org_tmp);
- }
- else if($activity->get_organization_id() &&
$activity->get_organization_id() > 0)
- {
- $contacts =
activitycalendar_soorganization::get_instance()->get_contacts($activity->get_organization_id());
- $activity->set_contact_persons($contacts);
- }
-
- $activities[] = $activity;
+ {
+ $activity_ids[] = $this->db->f('id');
}
- return $activities;
+ return $activity_ids;
}
function get_connected_activities($org_id)
Modified: trunk/activitycalendar/inc/class.soarena.inc.php
===================================================================
--- trunk/activitycalendar/inc/class.soarena.inc.php 2012-07-09 18:27:02 UTC
(rev 9755)
+++ trunk/activitycalendar/inc/class.soarena.inc.php 2012-07-11 09:01:40 UTC
(rev 9756)
@@ -127,6 +127,9 @@
$columns[] = 'arena.id';
$columns[] = 'arena.arena_name';
$columns[] = 'arena.address';
+ $columns[] = 'arena.addressnumber';
+ $columns[] = 'arena.zip_code';
+ $columns[] = 'arena.city';
$columns[] = 'arena.internal_arena_id';
$columns[] = 'arena.active';
@@ -158,6 +161,9 @@
$arena->set_arena_name($this->unmarshal($this->db->f('arena_name'), 'string'));
$arena->set_address($this->unmarshal($this->db->f('address'), 'string'));
+
$arena->set_addressnumber($this->unmarshal($this->db->f('addressnumber'),
'string'));
+
$arena->set_zip_code($this->unmarshal($this->db->f('zip_code'), 'string'));
+ $arena->set_city($this->unmarshal($this->db->f('city'),
'string'));
$arena->set_internal_arena_id($this->unmarshal($this->db->f('internal_arena_id'),
'int'));
$arena->set_active($this->unmarshal($this->db->f('active'), 'bool'));
}
@@ -259,6 +265,9 @@
$values = array(
'arena_name = ' .
$this->marshal($arena->get_arena_name(), 'string'),
'address = ' .
$this->marshal($arena->get_address(), 'string'),
+ 'addressnumber = ' .
$this->marshal($arena->get_addressnumber(), 'string'),
+ 'zip_code = ' . $this->marshal($arena->get_zip_code(),
'string'),
+ 'city = ' . $this->marshal($arena->get_city(), 'string'),
'internal_arena_id = ' .
$this->marshal($arena->get_internal_arena_id(), 'int'),
'active = ' . $this->marshal(($arena->is_active() ?
'true' : 'false'), 'bool'),
);
Modified: trunk/activitycalendar/inc/class.sogroup.inc.php
===================================================================
--- trunk/activitycalendar/inc/class.sogroup.inc.php 2012-07-09 18:27:02 UTC
(rev 9755)
+++ trunk/activitycalendar/inc/class.sogroup.inc.php 2012-07-11 09:01:40 UTC
(rev 9756)
@@ -87,9 +87,9 @@
if(isset($filters['new_groups'])){
$use_local_group = true;
unset($filter_clauses);
- $filter_clauses[] = "activity_group.change_type = 'new'
OR activity_group.change_type = 'change' ";
- if(isset($filters[$this->get_id_field_name()])){
- $id =
$this->marshal($filters[$this->get_id_field_name()],'int');
+ $filter_clauses[] = "(activity_group.change_type =
'new' OR activity_group.change_type = 'change') ";
+ if(isset($filters['group_id'])){
+ $id =
$this->marshal($filters['group_id'],'int');
$filter_clauses[] = "activity_group.id = {$id}";
}
}
@@ -115,6 +115,7 @@
$columns[] = 'activity_group.organization_id';
$columns[] = 'activity_group.change_type';
$columns[] = 'activity_group.transferred';
+ $columns[] = 'activity_group.original_group_id';
$dir = $ascending ? 'ASC' : 'DESC';
$order = "ORDER BY activity_group.id $dir";
@@ -182,13 +183,18 @@
{
if(!$extended_info)
{
- $ret = 'id';
+ $ret = array
+ (
+ 'table' => 'activity_group', //
alias
+ 'field' => 'id',
+ 'translated' => 'id'
+ );
}
else
{
$ret = array
(
- 'table' => 'group', // alias
+ 'table' => 'activity_group', //
alias
'field' => 'id',
'translated' => 'id'
);
@@ -238,6 +244,20 @@
return $result;
}
+ function get_orgid_from_group_local($group_id)
+ {
+ $result = 0;
+ if(isset($group_id)){
+ $q1="SELECT organization_id FROM activity_group WHERE
id={$group_id}";
+ $this->db->query($q1, __LINE__, __FILE__);
+ while($this->db->next_record()){
+ $result = $this->db->f('organization_id');
+ }
+ }
+
+ return $result;
+ }
+
function get_contacts($group_id)
{
$contacts = array();
@@ -347,6 +367,7 @@
$group->set_show_in_portal($this->unmarshal($this->db->f('show_in_portal'),
'int'));
$group->set_change_type($this->unmarshal($this->db->f('change_type'),
'string'));
$group->set_transferred($this->unmarshal($this->db->f('transferred'), 'bool'));
+
$group->set_original_group_id($this->unmarshal($this->db->f('original_group_id'),
'int'));
}
return $group;
}
@@ -367,6 +388,7 @@
$vals = implode(',',$values);
$sql = "UPDATE activity_group SET {$vals} WHERE
ID={$group->get_id()}";
+ var_dump($sql);
$result = $this->db->query($sql, __LINE__, __FILE__);
if(isset($result))
{
@@ -383,7 +405,7 @@
$name = $group_info['name'];
$orgid = $group_info['organization_id'];
$description = $group_info['description'];
- $activity_id = 0;
+ $activity_id = 1;
$show_in_portal = 1;
$columns[] = 'name';
@@ -396,7 +418,7 @@
$values[] = "'{$name}'";
$values[] = "'{$description}'";
$values[] = "'{$orgid}'";
- $values[] = $this->marshal($activity_id, 'int');
+ $values[] = $activity_id;
$values[] = $show_in_portal;
$vals = implode(',',$values);
@@ -420,6 +442,7 @@
$columns[] = 'activity_group.organization_id';
$columns[] = 'activity_group.change_type';
$columns[] = 'activity_group.transferred';
+ $columns[] = 'activity_group.original_group_id';
$dir = $ascending ? 'ASC' : 'DESC';
$order = "ORDER BY activity_group.id $dir";
@@ -429,9 +452,9 @@
$sql = "SELECT {$cols} FROM {$table} WHERE
activity_group.id={$g_id}";
$result = $this->db->query($sql, __LINE__, __FILE__);
- if(isset($result))
+ while($this->db->next_record())
{
- $group = new activitycalendar_group((int) $group_id);
+ $group = new activitycalendar_group((int) $g_id);
$group->set_name($this->unmarshal($this->db->f('name'),
'string'));
$group->set_organization_id($this->unmarshal($this->db->f('organization_id'),
'int'));
@@ -440,6 +463,7 @@
$group->set_show_in_portal($this->unmarshal($this->db->f('show_in_portal'),
'int'));
$group->set_change_type($this->unmarshal($this->db->f('change_type'),
'string'));
$group->set_transferred($this->unmarshal($this->db->f('transferred'), 'bool'));
+
$group->set_original_group_id($this->unmarshal($this->db->f('original_group_id'),
'int'));
return $group;
}
Modified: trunk/activitycalendar/inc/class.soorganization.inc.php
===================================================================
--- trunk/activitycalendar/inc/class.soorganization.inc.php 2012-07-09
18:27:02 UTC (rev 9755)
+++ trunk/activitycalendar/inc/class.soorganization.inc.php 2012-07-11
09:01:40 UTC (rev 9756)
@@ -216,7 +216,8 @@
{
$result = "Ingen";
if(isset($org_id)){
- $q1="SELECT name FROM bb_organization WHERE id={$org_id}";
+ $org_id = intval($org_id);
+ $q1="SELECT name FROM bb_organization WHERE id={$org_id}";
$this->db->query($q1, __LINE__, __FILE__);
while($this->db->next_record()){
$result = $this->db->f('name');
@@ -510,6 +511,9 @@
$email = $organization->get_email();
$description = $organization->get_description();
$street = $organization->get_address();
+ $streetnumber = $organization->get_addressnumber();
+ $zip_code = $organization->set_zip_code();
+ $city = $organization->get_city();
$district = $organization->get_district();
$change_type = $organization->get_change_type();
$transferred = ($organization->get_transferred() == 1 ||
$organization->get_transferred() == true)?'true':'false';
@@ -521,6 +525,9 @@
$values[] = "EMAIL='{$email}'";
$values[] = "DESCRIPTION='{$description}'";
$values[] = "ADDRESS='{$street}'";
+ $values[] = "ADDRESSNUMBER='{$streetnumber}'";
+ $values[] = "ZIP_CODE='{$zip_code}'";
+ $values[] = "CITY='{$city}'";
$values[] = "ORGNO='{$orgnr}'";
$values[] = "DISTRICT='{$district}'";
$values[] = "CHANGE_TYPE='{$change_type}'";
@@ -566,7 +573,10 @@
$organization->set_name($this->unmarshal($this->db->f('name'), 'string'));
$organization->set_organization_number($this->unmarshal($this->db->f('organization_number'),
'int'));
-
$organization->set_address($this->unmarshal($this->db->f('address'),
'string').','.$this->unmarshal($this->db->f('zip_code'), 'string').'
'.$this->unmarshal($this->db->f('city'), 'string'));
+
$organization->set_address($this->unmarshal($this->db->f('address'), 'string'));
+
$organization->set_addressnumber($this->unmarshal($this->db->f('addressnumber'),
'string'));
+
$organization->set_zip_code($this->unmarshal($this->db->f('zip_code'),
'string'));
+
$organization->set_city($this->unmarshal($this->db->f('city'), 'string'));
$organization->set_phone($this->unmarshal($this->db->f('phone'), 'string'));
$organization->set_email($this->unmarshal($this->db->f('email'), 'string'));
$organization->set_homepage($this->unmarshal($this->db->f('homepage'),
'string'));
@@ -589,17 +599,9 @@
$email = $organization->get_email();
$description = $organization->get_description();
$street = $organization->get_address();
-/* $zip = $organization->get_();
- if($zip && strlen($zip) > 5)
- {
- $zip_code = substr($zip,0,4);
- $city = substr($zip, 5);
- }
- else
- {
- $zip_code = '';
- $city = '';
- }*/
+ $streetnumber = $organization->get_address_number();
+ $zip_code = $organization->get_zip_code();
+ $city = $organization->get_city();
$district = $organization->get_district();
if($organization->get_original_org_id() &&
$organization->get_original_org_id() != '')
{
@@ -616,9 +618,10 @@
$values[] = "PHONE='{$phone}'";
$values[] = "EMAIL='{$email}'";
$values[] = "DESCRIPTION='{$description}'";
- $values[] = "STREET='{$street}'";
- //$values[] = "'{$zip_code}'";
- //$values[] = "'{$city}'";
+ $values[] = "ADDRESS='{$street}'";
+ $values[] = "ADDRESSNUMBER='{$streetnumber}'";
+ $values[] = "ZIP_CODE='{$zip_code}'";
+ $values[] = "CITY='{$city}'";
$values[] = "ORGNO='{$orgnr}'";
$values[] = "DISTRICT='{$district}'";
$values[] = "ORIGINAL_ORG_ID={$original_org_id}";
@@ -645,20 +648,13 @@
$phone = $org_info['phone'];
$email = $org_info['email'];
$description = $org_info['description'];
- $street = $org_info['street'];
- $zip = $org_info['zip'];
- if($zip && strlen($zip) > 5)
- {
- $zip_code = substr($zip,0,5);
- $city = substr($zip, 5);
- }
- else
- {
- $zip_code = '';
- $city = '';
- }
+ $street_1 = $org_info['street'];
+ $street_2 = $org_info['streetnumber'];
+ $street = $street_1 . ' ' . $street_2;
+ $zip_code = $org_info['zip'];
+ $city = $org_info['postaddress'];
$district = $org_info['district'];
- $activity_id = $org_info['activity_id'];
+ $activity_id = 1;
$show_in_portal = 1;
$columns[] = 'name';
@@ -713,6 +709,9 @@
$organization->set_name($this->unmarshal($this->db->f('name'), 'string'));
$organization->set_organization_number($this->unmarshal($this->db->f('organization_number'),
'int'));
$organization->set_address($this->unmarshal($this->db->f('address'), 'string'));
+
$organization->set_addressnumber($this->unmarshal($this->db->f('addressnumber'),
'string'));
+
$organization->set_zip_code($this->unmarshal($this->db->f('zip_code'),
'string'));
+
$organization->set_city($this->unmarshal($this->db->f('city'), 'string'));
$organization->set_phone($this->unmarshal($this->db->f('phone'), 'string'));
$organization->set_email($this->unmarshal($this->db->f('email'), 'string'));
$organization->set_homepage($this->unmarshal($this->db->f('homepage'),
'string'));
@@ -751,22 +750,13 @@
{
$description = '';
}
- $street = $org_info['street'];
+ $street = $org_info['street'] . ' ' . $org_info['streetnumber'];
if(!$street)
{
$street = '';
}
- $zip = $org_info['zip'];
- if($zip && strlen($zip) > 5)
- {
- $zip_code = substr($zip,0,4);
- $city = substr($zip, 5);
- }
- else
- {
- $zip_code = '';
- $city = '';
- }
+ $zip_code = $org_info['zip_code'];
+ $city = $org_info['city'];
$district = $org_info['district'];
if(!$district)
{
Modified: trunk/activitycalendar/inc/class.uiactivities.inc.php
===================================================================
--- trunk/activitycalendar/inc/class.uiactivities.inc.php 2012-07-09
18:27:02 UTC (rev 9755)
+++ trunk/activitycalendar/inc/class.uiactivities.inc.php 2012-07-11
09:01:40 UTC (rev 9756)
@@ -9,6 +9,12 @@
class activitycalendar_uiactivities extends activitycalendar_uicommon
{
+ protected $so_org;
+ protected $so_group;
+ protected $so_contact;
+ protected $so_activity;
+ protected $so_arena;
+
public $public_functions = array
(
'index' => true,
@@ -27,6 +33,11 @@
parent::__construct();
$this->bo_org = CreateObject('booking.boorganization');
$this->bo_group = CreateObject('booking.bogroup');
+ $this->so_org = activitycalendar_soorganization::get_instance();
+ $this->so_group = activitycalendar_sogroup::get_instance();
+ $this->so_contact =
activitycalendar_socontactperson::get_instance();
+ $this->so_activity =
activitycalendar_soactivity::get_instance();
+ $this->so_arena = activitycalendar_soarena::get_instance();
self::set_active_menu('activitycalendar::activities');
$config = CreateObject('phpgwapi.config','activitycalendar');
$config->read();
@@ -75,7 +86,7 @@
$errorMsgs = array();
$infoMsgs = array();
- $activity =
activitycalendar_soactivity::get_instance()->get_single((int)phpgw::get_var('id'));
+ $activity =
$this->so_activity->get_single((int)phpgw::get_var('id'));
$cancel_link = self::link(array('menuaction' =>
'activitycalendar.uiactivities.index'));
$saved_OK = phpgw::get_var('saved_ok');
if($saved_OK)
@@ -109,53 +120,67 @@
$GLOBALS['phpgw_info']['flags']['app_header'] .=
'::'.lang('edit');
// Get the contract part id
$activity_id = (int)phpgw::get_var('id');
- $so_activity = activitycalendar_soactivity::get_instance();
- $so_arena = activitycalendar_soarena::get_instance();
- $so_org = activitycalendar_soorganization::get_instance();
- //var_dump($activity_id);
$cancel_link = self::link(array('menuaction' =>
'activitycalendar.uiactivities.index'));
- $categories = $so_activity->get_categories();
- $targets = $so_activity->get_targets();
- $offices = $so_activity->select_district_list();
- $districts = $so_activity->get_districts();
- $buildings = $so_arena->get_buildings();
-
+ $categories = $this->so_activity->get_categories();
+ $targets = $this->so_activity->get_targets();
+ $offices = $this->so_activity->select_district_list();
+ $districts = $this->so_activity->get_districts();
+ $buildings = $this->so_arena->get_buildings();
// Retrieve the activity object or create a new one
if(isset($activity_id) && $activity_id > 0)
{
- $activity = $so_activity->get_single($activity_id);
+ $activity =
$this->so_activity->get_single($activity_id);
}
else
{
$activity = new activitycalendar_activity();
}
+ $new_group = $activity->get_new_group();
$g_id = phpgw::get_var('group_id');
$o_id = phpgw::get_var('organization_id');
- if(isset($g_id) && $g_id > 0)
+ if($new_group)
{
- $persons =
activitycalendar_sogroup::get_instance()->get_contacts($g_id);
- $desc =
activitycalendar_sogroup::get_instance()->get_description($g_id);
+ $persons =
$this->so_group->get_contacts_local($activity->get_group_id());
+ $desc =
$this->so_group->get_description_local($activity->get_group_id());
}
+ else if(isset($g_id) && $g_id > 0)
+ {
+ $persons = $this->so_group->get_contacts($g_id);
+ $desc = $this->so_group->get_description($g_id);
+ }
else if(isset($o_id) && $o_id > 0)
{
- $persons = $so_org->get_contacts($o_id);
- $desc = $so_org->get_description($o_id);
+ $persons = $this->so_org->get_contacts($o_id);
+ $desc = $this->so_org->get_description($o_id);
}
if(strlen($desc) > 254)
{
$desc = substr($desc,0,254);
}
- $arenas = $so_arena->get(null, null, 'arena.arena_name', true,
null, null, null);
+ $arenas = $this->so_arena->get(null, null, 'arena.arena_name',
true, null, null, null);
if($activity->get_new_org())
{
- $org_name =
$so_org->get_organization_name_local($activity->get_organization_id());
+ $org_name =
$this->so_org->get_organization_name_local($activity->get_organization_id());
}
else
{
- $organizations = $so_org->get(null, null, 'org.name',
true, null, null, null);
+ $organizations = $this->so_org->get(null, null,
'org.name', true, null, null, null);
}
- $groups = activitycalendar_sogroup::get_instance()->get(null,
null, null, null, null, null, null);
+ if($new_group)
+ {
+ $group_array = $this->so_group->get(null, null, null, null,
null, null, array('group_id' => $activity->get_group_id(), 'new_groups' =>
'true'));
+ //var_dump($group_array);
+ if(count($group_array) > 0){
+ $keys = array_keys($group_array);
+ $local_group = $group_array[$keys[0]];
+ //$group_name = $local_group->get_name();
+ }
+ }
+ else
+ {
+ $groups = $this->so_group->get(null, null, null, null,
null, null, null);
+ }
if(isset($_POST['save_activity'])) // The user has pressed the
save button
{
@@ -163,7 +188,6 @@
{
$old_state = $activity->get_state();
$new_state = phpgw::get_var('state');
-
// ... set all parameters
$activity->set_title(phpgw::get_var('title'));
$activity->set_organization_id(phpgw::get_var('organization_id'));
@@ -206,8 +230,67 @@
if($target_ok && $district_ok)
{
- if($so_activity->store($activity)) //
... and then try to store the object
+
if($this->so_activity->store($activity)) // ... and then try to store the object
{
+ if($new_group && $new_state == 3)
+ {
+ //transfer group to booking
+ $group_array =
$this->so_group->get(null, null, null, null, null, null, array('group_id' =>
$activity->get_group_id(), 'new_groups' => 'true'));
+ if(count($group_array) > 0){
+ $keys = array_keys($group_array);
+ $group = $group_array[$keys[0]];
+ }
+
+ $group_info = array();
+ $group_info['name'] =
$group->get_name(); //new
+ $group_info['organization_id'] =
$activity->get_organization_id();
+ $group_info['description'] =
$group->get_description();
+
+ $contacts =
$this->so_contact->get_local_contact_persons($group->get_id(), true);
+ $contact_1 = $contacts[0];
+
+ $new_group_id =
$this->so_group->transfer_group($group_info);
+ if($new_group_id)
+ {
+ //update activity with new org
id
+ //add contact persons to booking
+ $contact1 = array();
+ $contact1['name'] =
$contact_1->get_name();
+ $contact1['phone'] =
$contact_1->get_phone();
+ $contact1['mail'] =
$contact_1->get_email();
+ $contact1['group_id'] =
$new_group_id;
+
$this->so_activity->add_contact_person_group($contact1);
+
+ $message =
lang('messages_saved_form');
+
+ //get organization_id for the
group:
+ $group_org_id =
$this->so_group->get_orgid_from_group($new_group_id);
+
+ //get affected activities and
update with new org id
+ $update_activities =
$this->so_activity->get_activities_for_update($group->get_id(), true);
+
+ foreach($update_activities as
$act_id)
+ {
+ $act =
$this->so_activity->get_single($act_id);
+
$act->set_organization_id($group_org_id);
+
$act->set_group_id($new_group_id);
+
$act->set_new_org(false);
+
$act->set_new_group(false);
+
$this->so_activity->store($act);
+ }
+
+ //set local group as stored
+
$group->set_change_type('added');
+ $group->set_transferred(true);
+
+
$this->so_group->update_local($group);
+ $message =
lang('messages_saved_form');
+ //var_dump($new_group_id);
+ $contact_persons =
$this->so_contact->get_booking_contact_persons($new_group_id, true);
+ //var_dump(2);
+ $cp1 = $contact_persons[0];
+ }
+ }
$message =
lang('messages_saved_form');
}
else
@@ -217,7 +300,7 @@
if($new_state == 3 || $new_state == 5 )
{
- $kontor =
$so_activity->get_office_name($activity->get_office());
+ $kontor =
$this->so_activity->get_office_name($activity->get_office());
$subject =
lang('mail_subject_update');
$body = lang('mail_body_state_'
. $new_state, $kontor);
@@ -250,6 +333,7 @@
'organizations' =>
$organizations,
'org_name' => $org_name,
'groups' => $groups,
+ 'local_group' =>
$local_group,
'arenas' => $arenas,
'buildings' =>
$buildings,
'categories' =>
$categories,
@@ -271,6 +355,7 @@
$error = lang('org_not_transferred');
$editable = false;
}
+ //var_dump($local_group);
return $this->render('activity.php', array
(
@@ -278,6 +363,7 @@
'organizations' => $organizations,
'org_name' => $org_name,
'groups' => $groups,
+ 'local_group' => $local_group,
'arenas' => $arenas,
'buildings' => $buildings,
'categories' => $categories,
Modified: trunk/activitycalendar/inc/class.uiarena.inc.php
===================================================================
--- trunk/activitycalendar/inc/class.uiarena.inc.php 2012-07-09 18:27:02 UTC
(rev 9755)
+++ trunk/activitycalendar/inc/class.uiarena.inc.php 2012-07-11 09:01:40 UTC
(rev 9756)
@@ -118,7 +118,10 @@
// ... set all parameters
$arena->set_internal_arena_id(phpgw::get_var('internal_arena_id'));
$arena->set_arena_name(phpgw::get_var('arena_name'));
- $arena->set_address(phpgw::get_var('address') .
' ' . phpgw::get_var('address_no'));
+ $arena->set_address(phpgw::get_var('address'));
+
$arena->set_addressnumber(phpgw::get_var('address_no'));
+
$arena->set_zip_code(phpgw::get_var('zip_code'));
+ $arena->set_city(phpgw::get_var('city'));
$arena->set_active(phpgw::get_var('arena_active') == 'yes' ? true : false);
if(activitycalendar_soarena::get_instance()->store($arena)) // ... and then try
to store the object
Modified: trunk/activitycalendar/inc/class.uiorganization.inc.php
===================================================================
--- trunk/activitycalendar/inc/class.uiorganization.inc.php 2012-07-09
18:27:02 UTC (rev 9755)
+++ trunk/activitycalendar/inc/class.uiorganization.inc.php 2012-07-11
09:01:40 UTC (rev 9756)
@@ -81,7 +81,7 @@
unset($org_info);
unset($contact1);
unset($contact2);
- if($type)
+/* if($type)
{
$sogroup = activitycalendar_sogroup::get_instance();
$soactivity =
activitycalendar_soactivity::get_instance();
@@ -172,7 +172,6 @@
//get affected activities and update
with new org id
$update_activities =
$soactivity->get_activities_for_update($id, true);
- var_dump($update_activities);
foreach($update_activities as $act)
{
$act->set_organization_id($group_org_id);
@@ -217,7 +216,7 @@
}
else
- {
+ {*/
//var_dump('org');
$so_org =
activitycalendar_soorganization::get_instance();
$so_activity =
activitycalendar_soactivity::get_instance();
@@ -230,7 +229,7 @@
//var_dump($org);
$districts = $so_activity->get_districts();
- if(isset($_POST['save_organization'])) // The user has
pressed the save button
+/* if(isset($_POST['save_organization'])) // The user has
pressed the save button
{
$org->set_organization_number(phpgw::get_var('orgno'));
$org->set_district(phpgw::get_var('org_district'));
@@ -268,7 +267,8 @@
}
$GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'activitycalendar.uiorganization.show', 'id' =>
$org->get_id(), 'saved_ok' => 'yes'));
}
- else if(isset($_POST['store_organization'])) // The
user has pressed the store button
+ else*/
+ if(isset($_POST['store_organization'])) // The user has
pressed the store button
{
$orgno = phpgw::get_var('orgno');
$district = phpgw::get_var('org_district');
@@ -334,8 +334,9 @@
//get affected activities and update
with new org id
$update_activities =
$so_activity->get_activities_for_update($id);
//var_dump($update_activities);
- foreach($update_activities as $act)
+ foreach($update_activities as $act_id)
{
+ $act =
$so_activity->get_single($act_id);
$act->set_organization_id($new_org_id);
$act->set_new_org(false);
$so_activity->store($act);
@@ -441,7 +442,7 @@
);
return $this->render('organization.php', $data);
- }
+// }
}
public function show()
@@ -451,7 +452,7 @@
$type = phpgw::get_var('type');
$cancel_link = self::link(array('menuaction' =>
'activitycalendar.uiorganization.changed_organizations'));
$socontact = activitycalendar_socontactperson::get_instance();
- if($type)
+/* if($type)
{
if(isset($_POST['edit_group'])) // The user has pressed
the save button
{
@@ -488,7 +489,7 @@
return $this->render('group.php', $data);
}
else
- {
+ {*/
//var_dump('org');
if(isset($_POST['edit_organization'])) // The user has
pressed the save button
{
@@ -523,7 +524,7 @@
);
return $this->render('organization.php', $data);
- }
+ //}
}
Modified: trunk/activitycalendar/inc/model/class.activity.inc.php
===================================================================
--- trunk/activitycalendar/inc/model/class.activity.inc.php 2012-07-09
18:27:02 UTC (rev 9755)
+++ trunk/activitycalendar/inc/model/class.activity.inc.php 2012-07-11
09:01:40 UTC (rev 9756)
@@ -32,6 +32,7 @@
protected $internal_arena;
protected $frontend;
protected $new_org;
+ protected $new_group;
/**
* Constructor. Takes an optional ID. If a contract is
created from outside
@@ -229,6 +230,14 @@
public function get_new_org() { return $this->new_org; }
+ public function set_new_group(bool $new_group)
+ {
+ $this->new_group = (bool)$new_group;
+ }
+
+ public function get_new_group() { return $this->new_group; }
+
+
/**
* Get a static reference to the storage object associated with
this model object
*
@@ -245,15 +254,23 @@
public function serialize()
{
+ $so_org = activitycalendar_soorganization::get_instance();
$date_format =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
if(isset($this->group_id) && $this->get_group_id() > 0)
{
- if($this->get_new_org())
+ if($this->get_new_group())
{
$group_name =
activitycalendar_sogroup::get_instance()->get_group_name_local($this->get_group_id());
$this->set_contact_persons(activitycalendar_socontactperson::get_instance()->get_local_contact_persons($this->get_group_id(),
true));
$contact_1 =
activitycalendar_socontactperson::get_instance()->get_group_contact_name_local($this->get_contact_person_1()->get_id());
- $contact_2 =
activitycalendar_socontactperson::get_instance()->get_group_contact_name_local($this->get_contact_person_2()->get_id());
+ if($this->get_contact_person_2())
+ {
+ $contact_2 =
activitycalendar_socontactperson::get_instance()->get_group_contact_name_local($this->get_contact_person_2()->get_id());
+ }
+ else
+ {
+ $contact_2 = null;
+ }
$desc =
activitycalendar_sogroup::get_instance()->get_description_local($this->get_group_id());
}
else
@@ -261,10 +278,26 @@
$group_name =
activitycalendar_sogroup::get_instance()->get_group_name($this->get_group_id());
$this->set_contact_persons(activitycalendar_socontactperson::get_instance()->get_booking_contact_persons($this->get_group_id(),
true));
$contact_1 =
activitycalendar_socontactperson::get_instance()->get_group_contact_name($this->get_contact_person_1()->get_id());
- $contact_2 =
activitycalendar_socontactperson::get_instance()->get_group_contact_name($this->get_contact_person_2()->get_id());
+ if($this->get_contact_person_2())
+ {
+ $contact_2 =
activitycalendar_socontactperson::get_instance()->get_group_contact_name($this->get_contact_person_2()->get_id());
+ }
+ else
+ {
+ $contact_2 = null;
+ }
$desc =
activitycalendar_sogroup::get_instance()->get_description($this->get_group_id());
}
- $org_name =
activitycalendar_soorganization::get_instance()->get_organization_name($this->get_organization_id());
+ $o_id = $this->get_organization_id();
+ if($this->get_new_org())
+ {
+ $org_name =
$so_org->get_organization_name_local($o_id);
+ }
+ else
+ {
+ $org_name =
$so_org->get_organization_name($o_id);
+ }
+
}
else if(isset($this->organization_id) &&
$this->get_organization_id() > 0)
{
@@ -273,7 +306,14 @@
$org_name =
activitycalendar_soorganization::get_instance()->get_organization_name_local($this->get_organization_id());
$this->set_contact_persons(activitycalendar_socontactperson::get_instance()->get_local_contact_persons($this->get_organization_id()));
$contact_1 =
activitycalendar_socontactperson::get_instance()->get_org_contact_name_local($this->get_contact_person_1()->get_id());
- $contact_2 =
activitycalendar_socontactperson::get_instance()->get_org_contact_name_local($this->get_contact_person_2()->get_id());
+ if($this->get_contact_person_2())
+ {
+ $contact_2 =
activitycalendar_socontactperson::get_instance()->get_org_contact_name_local($this->get_contact_person_2()->get_id());
+ }
+ else
+ {
+ $contact_2 = null;
+ }
$desc =
activitycalendar_soorganization::get_instance()->get_description_local($this->get_organization_id());
}
else
@@ -281,7 +321,14 @@
$org_name =
activitycalendar_soorganization::get_instance()->get_organization_name($this->get_organization_id());
$this->set_contact_persons(activitycalendar_socontactperson::get_instance()->get_booking_contact_persons($this->get_organization_id()));
$contact_1 =
activitycalendar_socontactperson::get_instance()->get_org_contact_name($this->get_contact_person_1()->get_id());
- $contact_2 =
activitycalendar_socontactperson::get_instance()->get_org_contact_name($this->get_contact_person_2()->get_id());
+ if($this->get_contact_person_2())
+ {
+ $contact_2 =
activitycalendar_socontactperson::get_instance()->get_org_contact_name($this->get_contact_person_2()->get_id());
+ }
+ else
+ {
+ $contact_2 = null;
+ }
$desc =
activitycalendar_soorganization::get_instance()->get_description($this->get_organization_id());
}
}
Modified: trunk/activitycalendar/inc/model/class.arena.inc.php
===================================================================
--- trunk/activitycalendar/inc/model/class.arena.inc.php 2012-07-09
18:27:02 UTC (rev 9755)
+++ trunk/activitycalendar/inc/model/class.arena.inc.php 2012-07-11
09:01:40 UTC (rev 9756)
@@ -10,6 +10,9 @@
protected $arena_name;
protected $internal_arena_id;
protected $address;
+ protected $addressnumber;
+ protected $zip_code;
+ protected $city;
protected $reference;
protected $active;
@@ -68,6 +71,36 @@
{
return $this->address;
}
+
+ public function set_addressnumber($addressnumber)
+ {
+ $this->addressnumber = $addressnumber;
+ }
+
+ public function get_addressnumber()
+ {
+ return $this->addressnumber;
+ }
+
+ public function set_zip_code($zip_code)
+ {
+ $this->zip_code = $zip_code;
+ }
+
+ public function get_zip_code()
+ {
+ return $this->zip_code;
+ }
+
+ public function set_city($city)
+ {
+ $this->city = $city;
+ }
+
+ public function get_city()
+ {
+ return $this->city;
+ }
/**
* Get a static reference to the storage object associated with
this model object
@@ -89,6 +122,9 @@
'id' => $this->get_id(),
'arena_name' => $this->get_arena_name(),
'address' => $this->get_address(),
+ 'addressnumber' => $this->get_addressnumber(),
+ 'zip_code' => $this->get_zip_code(),
+ 'city' => $this->get_city(),
'active' =>
($this->is_active())?'Aktiv':'Inaktiv'
);
}
Modified: trunk/activitycalendar/inc/model/class.group.inc.php
===================================================================
--- trunk/activitycalendar/inc/model/class.group.inc.php 2012-07-09
18:27:02 UTC (rev 9755)
+++ trunk/activitycalendar/inc/model/class.group.inc.php 2012-07-11
09:01:40 UTC (rev 9756)
@@ -13,6 +13,7 @@
protected $shortname;
protected $change_type;
protected $transferred;
+ protected $original_group_id;
/**
* Constructor. Takes an optional ID. If a organization is
created from outside
@@ -81,6 +82,13 @@
public function get_transferred() { return $this->transferred; }
+ public function set_original_group_id($original_group_id)
+ {
+ $this->original_group_id = $original_group_id;
+ }
+
+ public function get_original_group_id() { return
$this->original_group_id; }
+
public function serialize()
{
return array(
Modified: trunk/activitycalendar/inc/model/class.organization.inc.php
===================================================================
--- trunk/activitycalendar/inc/model/class.organization.inc.php 2012-07-09
18:27:02 UTC (rev 9755)
+++ trunk/activitycalendar/inc/model/class.organization.inc.php 2012-07-11
09:01:40 UTC (rev 9756)
@@ -121,6 +121,36 @@
public function get_original_org_id() { return
$this->original_org_id; }
+ public function set_addressnumber($addressnumber)
+ {
+ $this->addressnumber = $addressnumber;
+ }
+
+ public function get_addressnumber()
+ {
+ return $this->addressnumber;
+ }
+
+ public function set_zip_code($zip_code)
+ {
+ $this->zip_code = $zip_code;
+ }
+
+ public function get_zip_code()
+ {
+ return $this->zip_code;
+ }
+
+ public function set_city($city)
+ {
+ $this->city = $city;
+ }
+
+ public function get_city()
+ {
+ return $this->city;
+ }
+
public function serialize()
{
$so_org =
activitycalendar_soorganization::get_instance();
@@ -134,6 +164,9 @@
'email' => $this->get_email(),
'phone' => $this->get_phone(),
'address' => $this->get_address(),
+ 'addressnumber' =>
$this->get_addressnumber(),
+ 'zip_code' => $this->get_zip_code(),
+ 'city' => $this->get_city(),
'show_in_portal' => $this->get_show_in_portal(),
'change_type' => lang($this->get_change_type()),
'transferred' => $this->get_transferred(),
Modified: trunk/activitycalendar/setup/phpgw_no.lang
===================================================================
--- trunk/activitycalendar/setup/phpgw_no.lang 2012-07-09 18:27:02 UTC (rev
9755)
+++ trunk/activitycalendar/setup/phpgw_no.lang 2012-07-11 09:01:40 UTC (rev
9756)
@@ -398,7 +398,7 @@
inactive_arena activitycalendar no Inaktiv
change_type activitycalendar no Endringstype
added activitycalendar no Lagt til i organisasjonsregisteret
-store activitycalendar no Overfør til organisasjonsregister
+store activitycalendar no Lagre til organisasjonsregisteret
back activitycalendar no Tilbake
arena_saved_form activitycalendar no Arena ble lagret
activity_saved_form activitycalendar no Aktiviteten ble lagret
@@ -434,4 +434,4 @@
edit_contact_info_org activitycalendar no Gå til
organisasjonsopplysninger
edit_contact_info_group activitycalendar no Gå til
gruppeopplysninger
arena_helptext activitycalendar no I feltet Navn skal det stå navn
på arena, som det heter på folkemunne.<br/>Når du redigerer feltet
besøksadresse, gjøres det automatisk oppslag i gatetabellen, dette for å sikre
at adresser skrives riktig, og kan kobles mot kart.<br/>Når du har funnet rett
gateadresse , gå til feltet Husnummer og legg inn husnummer.<br/>Trykk lagre.
-org_not_transferred activitycalendar no Organisasjonen/gruppen
som aktiviteten er tilknyttet er ikke overført til
organisasjonsregisteret.<br/>Før aktiviteten kan redigeres, må denne overføres.
\ No newline at end of file
+org_not_transferred activitycalendar no Organisasjonen som
aktiviteten er tilknyttet er ikke overført til organisasjonsregisteret.<br/>Før
aktiviteten kan redigeres, må denne overføres.
\ No newline at end of file
Modified: trunk/activitycalendar/setup/setup.inc.php
===================================================================
--- trunk/activitycalendar/setup/setup.inc.php 2012-07-09 18:27:02 UTC (rev
9755)
+++ trunk/activitycalendar/setup/setup.inc.php 2012-07-11 09:01:40 UTC (rev
9756)
@@ -1,6 +1,6 @@
<?php
$setup_info['activitycalendar']['name'] = 'activitycalendar';
- $setup_info['activitycalendar']['version'] = '0.1.8';
+ $setup_info['activitycalendar']['version'] = '0.1.11';
$setup_info['activitycalendar']['app_order'] = 60;
$setup_info['activitycalendar']['enable'] = 1;
$setup_info['activitycalendar']['app_group'] = 'office';
@@ -30,7 +30,7 @@
$setup_info['activitycalendar']['depends'][] = array(
'appname' => 'booking',
- 'versions' => array('0.2.05','0.2.06','0.2.07','0.2.08')
+ 'versions' =>
array('0.2.05','0.2.06','0.2.07','0.2.08','0.2.09')
);
$setup_info['activitycalendar']['depends'][] = array(
Modified: trunk/activitycalendar/setup/tables_current.inc.php
===================================================================
--- trunk/activitycalendar/setup/tables_current.inc.php 2012-07-09 18:27:02 UTC
(rev 9755)
+++ trunk/activitycalendar/setup/tables_current.inc.php 2012-07-11 09:01:40 UTC
(rev 9756)
@@ -24,7 +24,8 @@
'contact_person_2_address' => array('type' =>
'varchar','precision' => '255'),
'contact_person_2_zip' => array('type' =>
'varchar','precision' => '255'),
'frontend' => array('type' => 'bool','nullable'
=> true,'default' => 'false'),
- 'new_org' => array('type' => 'bool','nullable'
=> true,'default' => 'false')
+ 'new_org' => array('type' => 'bool','nullable'
=> true,'default' => 'false'),
+ 'new_group' => array('type' =>
'bool','nullable' => true,'default' => 'false')
),
'pk' => array('id'),
'fk' => array(),
@@ -37,6 +38,9 @@
'internal_arena_id' => array('type' => 'int',
'precision' => 4, 'nullable' => True),
'arena_name' => array('type' =>
'varchar','precision' => '255','nullable' => false),
'address' => array('type' =>
'varchar','precision' => '255','nullable' => True),
+ 'addressnumber' => array('type' =>
'varchar','precision' => '255','nullable' => True),
+ 'zip_code' => array('type' => 'varchar','precision' =>
'255','nullable' => True),
+ 'city' => array('type' => 'varchar','precision' =>
'255','nullable' => True),
'active' => array('type' => 'bool','nullable'
=> true,'default' => 'true')
),
'pk' => array('id'),
@@ -54,6 +58,9 @@
'email' => array('type' =>
'varchar','precision' => '255','nullable' => false),
'phone' => array('type' =>
'varchar','precision' => '255','nullable' => false),
'address' => array('type' =>
'varchar','precision' => '255','nullable' => false),
+ 'addressnumber' => array('type' =>
'varchar','precision' => '255','nullable' => True),
+ 'zip_code' => array('type' => 'varchar','precision' =>
'255','nullable' => True),
+ 'city' => array('type' => 'varchar','precision' =>
'255','nullable' => True),
'orgno' => array('type' =>
'varchar','precision' => '255','nullable' => false),
'change_type' => array('type' =>
'varchar','precision' => '255','nullable' => false),
'transferred' => array('type' =>
'bool','nullable' => true,'default' => 'false'),
@@ -71,7 +78,8 @@
'name' => array('type' => 'varchar','precision'
=> '255','nullable' => false),
'description' => array('type' =>
'text','nullable' => false),
'change_type' => array('type' =>
'varchar','precision' => '255','nullable' => false),
- 'transferred' => array('type' =>
'bool','nullable' => true,'default' => 'false')
+ 'transferred' => array('type' =>
'bool','nullable' => true,'default' => 'false'),
+ 'original_group_id' => array('type' =>
'int','precision' => 4,'nullable' => true)
),
'pk' => array('id'),
'fk' => array(),
Modified: trunk/activitycalendar/setup/tables_update.inc.php
===================================================================
--- trunk/activitycalendar/setup/tables_update.inc.php 2012-07-09 18:27:02 UTC
(rev 9755)
+++ trunk/activitycalendar/setup/tables_update.inc.php 2012-07-11 09:01:40 UTC
(rev 9756)
@@ -171,4 +171,72 @@
return $GLOBALS['setup_info']['activitycalendar']['currentver'];
}
+ $test[] = '0.1.8';
+ function activitycalendar_upgrade0_1_8()
+ {
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('activity_organization','addressnumber',array(
+ 'type' => 'varchar',
+ 'precision' => '255',
+ 'nullable' => true
+ ));
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('activity_organization','zip_code',array(
+ 'type' => 'varchar',
+ 'precision' => '255',
+ 'nullable' => true
+ ));
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('activity_organization','city',array(
+ 'type' => 'varchar',
+ 'precision' => '255',
+ 'nullable' => true
+ ));
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('activity_arena','addressnumber',array(
+ 'type' => 'varchar',
+ 'precision' => '255',
+ 'nullable' => true
+ ));
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('activity_arena','zip_code',array(
+ 'type' => 'varchar',
+ 'precision' => '255',
+ 'nullable' => true
+ ));
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('activity_arena','city',array(
+ 'type' => 'varchar',
+ 'precision' => '255',
+ 'nullable' => true
+ ));
+
+ $GLOBALS['setup_info']['activitycalendar']['currentver'] =
'0.1.9';
+ return $GLOBALS['setup_info']['activitycalendar']['currentver'];
+ }
+
+ $test[] = '0.1.9';
+ function activitycalendar_upgrade0_1_9()
+ {
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('activity_activity','new_group',array(
+ 'type' => 'bool',
+ 'default' => 'false',
+ 'nullable' => true
+ ));
+
+ $GLOBALS['setup_info']['activitycalendar']['currentver'] =
'0.1.10';
+ return $GLOBALS['setup_info']['activitycalendar']['currentver'];
+ }
+
+ $test[] = '0.1.10';
+ function activitycalendar_upgrade0_1_10()
+ {
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('activity_group','original_group_id',array(
+ 'type' => 'int',
+ 'precision' => 4,
+ 'nullable' => true
+ ));
+
+ $GLOBALS['setup_info']['activitycalendar']['currentver'] =
'0.1.11';
+ return $GLOBALS['setup_info']['activitycalendar']['currentver'];
+ }
?>
Modified: trunk/activitycalendar/templates/base/activity.php
===================================================================
--- trunk/activitycalendar/templates/base/activity.php 2012-07-09 18:27:02 UTC
(rev 9755)
+++ trunk/activitycalendar/templates/base/activity.php 2012-07-11 09:01:40 UTC
(rev 9756)
@@ -179,11 +179,25 @@
<?php
if($activity->get_group_id())
{
- echo
activitycalendar_sogroup::get_instance()->get_description($activity->get_group_id());
+
if($activity->get_new_group())
+ {
+ echo
activitycalendar_sogroup::get_instance()->get_description_local($activity->get_group_id());
+ }
+ else
+ {
+ echo
activitycalendar_sogroup::get_instance()->get_description($activity->get_group_id());
+ }
}
else
if($activity->get_organization_id())
{
- echo
activitycalendar_soorganization::get_instance()->get_description($activity->get_organization_id());
+ if($activity->get_new_org())
+ {
+ echo
activitycalendar_soorganization::get_instance()->get_description_local($activity->get_organization_id());
+ }
+ else
+ {
+ echo
activitycalendar_soorganization::get_instance()->get_description($activity->get_organization_id());
+ }
}
?>
</dd>
@@ -499,9 +513,16 @@
</dt>
<dd>
<?php
- $current_group_id =
$activity->get_group_id();
if ($editable)
{
+ $current_group_id =
$activity->get_group_id();
+ if($activity->get_new_group())
+ {
+ echo "<input type=\"hidden\"
name=\"group_id\" id=\"group_id\" value=\"".$local_group->get_id()."\" />";
+ echo $local_group->get_name();
+ }
+ else
+ {
?>
<div id="group_select">
<select name="group_id"
id="group_id">
@@ -510,7 +531,8 @@
</div>
<?php if($current_group_id){?>
<br/><?php echo
lang('edit_contact_info')?> <a
href="index.php?menuaction=booking.uigroup.show&id=<?php echo $current_group_id
?>"><?php echo lang('edit_contact_info_group')?></a>
- <?php }?>
+ <?php }
+ }?>
<?php
?>
<?php
@@ -518,7 +540,14 @@
else
{
if($activity->get_group_id()){
- echo
activitycalendar_sogroup::get_instance()->get_group_name($activity->get_group_id());
+
if($activity->get_new_group())
+ {
+ echo
activitycalendar_sogroup::get_instance()->get_group_name_local($activity->get_group_id());
+ }
+ else
+ {
+ echo
activitycalendar_sogroup::get_instance()->get_group_name($activity->get_group_id());
+ }
}
}
?>
@@ -535,7 +564,14 @@
<?php
if($activity->get_group_id())
{
- echo
$contpers_so->get_group_contact_name($activity->get_contact_person_1());
+
if($activity->get_new_group())
+ {
+ echo
$contpers_so->get_group_contact_name_local($activity->get_contact_person_1());
+ }
+ else
+ {
+ echo
$contpers_so->get_group_contact_name($activity->get_contact_person_1());
+ }
}
else
if($activity->get_organization_id())
{
@@ -555,7 +591,14 @@
<?php
if($activity->get_group_id())
{
- echo
$contpers_so->get_group_contact_name($activity->get_contact_person_2());
+
if($activity->get_new_group())
+ {
+ echo
$contpers_so->get_group_contact_name_local($activity->get_contact_person_2());
+ }
+ else
+ {
+ echo
$contpers_so->get_group_contact_name($activity->get_contact_person_2());
+ }
}
else
if($activity->get_organization_id())
{
Modified: trunk/activitycalendar/templates/base/dashboard.php
===================================================================
--- trunk/activitycalendar/templates/base/dashboard.php 2012-07-09 18:27:02 UTC
(rev 9755)
+++ trunk/activitycalendar/templates/base/dashboard.php 2012-07-11 09:01:40 UTC
(rev 9756)
@@ -13,6 +13,7 @@
$extra_cols = array(array("key" => "change_type", "label" =>
lang('change_type'), "sortable" => true, "index" => 5));
include('organization_list_partial.php');
?>
+<?php /*?>
<h2><?php echo lang('group')?></h2>
<?php
$list_form = true;
@@ -21,7 +22,7 @@
$nosearch = true;
$extra_cols = array(array("key" => "change_type", "label" =>
lang('change_type'), "sortable" => true, "index" => 5));
include('organization_list_partial.php');
-?>
+*/?>
<h2><?php echo lang('activities') ?></h2>
<?php
$list_form = true;
Modified: trunk/activitycalendar/templates/base/organization.php
===================================================================
--- trunk/activitycalendar/templates/base/organization.php 2012-07-09
18:27:02 UTC (rev 9755)
+++ trunk/activitycalendar/templates/base/organization.php 2012-07-11
09:01:40 UTC (rev 9756)
@@ -153,7 +153,6 @@
<div class="form-buttons">
<?php
if ($editable) {
- echo '<input type="submit"
name="save_organization" value="' . lang('save') . '"/>';
if($organization->get_original_org_id() && $organization->get_original_org_id()
> 0)
{
echo '<input
type="submit" name="update_organization" value="' . lang('update_org') . '"/>';
Modified: trunk/activitycalendar/templates/base/organization_list_changed.php
===================================================================
--- trunk/activitycalendar/templates/base/organization_list_changed.php
2012-07-09 18:27:02 UTC (rev 9755)
+++ trunk/activitycalendar/templates/base/organization_list_changed.php
2012-07-11 09:01:40 UTC (rev 9756)
@@ -13,6 +13,7 @@
$extra_cols = array(array("key" => "change_type", "label" =>
lang('change_type'), "sortable" => true, "index" => 5));
include('organization_list_partial.php');
?>
+<?php /*
<h2><?php echo lang('group')?></h2>
<?php
$list_form = true;
@@ -21,4 +22,4 @@
$nosearch = true;
$extra_cols = array(array("key" => "change_type", "label" =>
lang('change_type'), "sortable" => true, "index" => 5));
include('organization_list_partial.php');
-?>
\ No newline at end of file
+*/?>
\ No newline at end of file
Added: trunk/activitycalendarfrontend/images/hjelp.gif
===================================================================
(Binary files differ)
Property changes on: trunk/activitycalendarfrontend/images/hjelp.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php
===================================================================
--- trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php 2012-07-09
18:27:02 UTC (rev 9755)
+++ trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php 2012-07-11
09:01:40 UTC (rev 9756)
@@ -13,11 +13,7 @@
class activitycalendarfrontend_uiactivity extends
activitycalendar_uiactivities
{
- private $so_activity;
- private $so_arena;
private $so_organization;
- private $so_group;
- private $so_contact;
public $public_functions = array
(
@@ -34,11 +30,7 @@
public function __construct()
{
parent::__construct();
- $this->so_activity =
activitycalendar_soactivity::get_instance();
- $this->so_arena =
activitycalendar_soarena::get_instance();
$this->so_organization =
activitycalendar_soorganization::get_instance();
- $this->so_group =
activitycalendar_sogroup::get_instance();
- $this->so_contact =
activitycalendar_socontactperson::get_instance();
}
/**
@@ -47,8 +39,7 @@
public function add()
{
//$GLOBALS['phpgw']->redirect_link('/activitycalendarfrontend/index.php',
array('menuaction' => 'activitycalendarfrontend.uiactivity.edit', 'action' =>
'new_activity'));
- $GLOBALS['phpgw']->js->validate_file( 'json', 'json',
'phpgwapi' );
-
+ $GLOBALS['phpgw']->js->validate_file( 'json', 'json',
'phpgwapi' );
$c =
createobject('phpgwapi.config','activitycalendarfrontend');
$c->read();
$config = $c->config_data;
@@ -65,30 +56,72 @@
$activity = new activitycalendar_activity();
- $g_id = phpgw::get_var('group_id');
$o_id = phpgw::get_var('organization_id');
+ $o_id_new = phpgw::get_var('organization_id_hidden');
if(isset($_POST['step_1'])) //activity shall be
registred on a new organization
{
- if($o_id == "new_org")
+ if($o_id_new == "new_org")
{
- $new_org = true;
- $this->render('activity_new_org.php',
array
- (
- 'activity' =>
$activity,
- 'new_organization' =>
true,
- 'arenas' => $arenas,
- 'buildings' =>
$buildings,
- 'categories' =>
$categories,
- 'targets' => $targets,
- 'districts' =>
$districts,
- 'offices' => $offices,
- 'editable' => true,
- 'message' =>
isset($message) ? $message : phpgw::get_var('message'),
- 'error' =>
isset($error) ? $error : phpgw::get_var('error'),
- 'ajaxURL' => $ajaxUrl
- )
- );
+ //add new organization to internal
activitycalendar organization register
+ $org_info['name'] = phpgw::get_var('orgname');
+ $org_info['orgnr'] = phpgw::get_var('orgno');
+ $org_info['homepage'] =
phpgw::get_var('homepage');
+ $org_info['street'] = phpgw::get_var('address');
+ $org_info['streetnumber'] =
phpgw::get_var('number');
+ $org_info['zip'] = phpgw::get_var('postzip');
+ $org_info['postaddress'] =
phpgw::get_var('postaddress');
+ $org_info['status'] = "new";
+ $o_id =
$this->so_activity->add_organization_local($org_info);
+
+ //add contact persons
+ $contact1 = array();
+ $contact1['name'] =
phpgw::get_var('org_contact1_name');
+ $contact1['phone'] =
phpgw::get_var('org_contact1_phone');
+ $contact1['mail'] =
phpgw::get_var('org_contact1_mail');
+ $contact1['org_id'] = $o_id;
+ $contact1['group_id'] = 0;
+
$this->so_activity->add_contact_person_local($contact1);
+
+ $person_arr =
$this->so_contact->get_local_contact_persons($o_id);
+ foreach($person_arr as $p)
+ {
+ $persons[] = $p;
+ }
+
+ $person_ids =
$this->so_organization->get_contacts_local($o_id);
+ $desc = phpgw::get_var('org_description');
+ $organization =
$this->so_organization->get_organization_local($o_id);
+ $new_org = true;
+
+ $organization =
$this->so_organization->get_organization_local($o_id);
+ $person_arr =
$this->so_organization->get_contacts_local_as_objects($o_id);
+ foreach($person_arr as $p)
+ {
+ //var_dump($p);
+ $persons[] = $p;
+ }
+
+ $message = lang('organization_saved_form');
+
+ $this->render('activity_new.php', array
+ (
+ 'activity' => $activity,
+ 'new_organization' => true,
+ 'organization' => $organization,
+ 'contact1' => $persons[0],
+ 'arenas' => $arenas,
+ 'buildings' => $buildings,
+ 'categories' => $categories,
+ 'targets' => $targets,
+ 'districts' => $districts,
+ 'offices' => $offices,
+ 'editable' => true,
+ 'message' => isset($message) ?
$message : phpgw::get_var('message'),
+ 'error' => isset($error) ?
$error : phpgw::get_var('error'),
+ 'ajaxURL' => $ajaxUrl
+ )
+ );
}
else
{
@@ -101,7 +134,6 @@
$persons[] = $p;
}
- $groups = $this->so_group->get(null,
null, null, null, null, null, array('org_id' => $o_id));
$activity->set_organization_id($o_id);
$activity->set_description($organization->get_description());
@@ -113,8 +145,6 @@
'new_organization' =>
false,
'organization' =>
$organization,
'contact1' =>
$persons[0],
- 'contact2' =>
$persons[1],
- 'groups' => $groups,
'arenas' => $arenas,
'buildings' =>
$buildings,
'categories' =>
$categories,
@@ -128,99 +158,12 @@
)
);
}
- }
- else if(isset($_POST['save_organization']))
- {
- //add new organization to internal
activitycalendar organization register
- $org_info['name'] = phpgw::get_var('orgname');
- $org_info['orgnr'] = phpgw::get_var('orgno');
- $org_info['homepage'] =
phpgw::get_var('homepage');
- $org_info['phone'] = phpgw::get_var('phone');
- $org_info['email'] = phpgw::get_var('email');
- $org_info['description'] =
phpgw::get_var('org_description');
- $org_info['street'] = phpgw::get_var('address')
. ' ' . phpgw::get_var('number') . ', ' . phpgw::get_var('postaddress');
- //$org_info['zip'] =
phpgw::get_var('postaddress');
- $org_info['district'] =
phpgw::get_var('org_district');
- $org_info['status'] = "new";
- $o_id =
$this->so_activity->add_organization_local($org_info);
-
- //add contact persons
- $contact1 = array();
- $contact1['name'] =
phpgw::get_var('org_contact1_name');
- $contact1['phone'] =
phpgw::get_var('org_contact1_phone');
- $contact1['mail'] =
phpgw::get_var('org_contact1_mail');
- $contact1['org_id'] = $o_id;
- $contact1['group_id'] = 0;
-
$this->so_activity->add_contact_person_local($contact1);
-
- if(phpgw::get_var('org_contact2_name'))
- {
- $contact2 = array();
- $contact2['name'] =
phpgw::get_var('org_contact2_name');
- $contact2['phone'] =
phpgw::get_var('org_contact2_phone');
- $contact2['mail'] =
phpgw::get_var('org_contact2_mail');
- $contact2['org_id'] = $o_id;
- $contact2['group_id'] = 0;
-
$this->so_activity->add_contact_person_local($contact2);
- }
- else
- {
-
$this->so_activity->add_contact_person_local($contact1);
- }
-
- //$persons =
$this->so_organization->get_contacts_local_as_objects($o_id);
- //var_dump($persons);
- $person_arr =
$this->so_contact->get_local_contact_persons($o_id);
- foreach($person_arr as $p)
- {
- //var_dump($p);
- $persons[] = $p;
- }
-
- $person_ids =
$this->so_organization->get_contacts_local($o_id);
- $desc = phpgw::get_var('org_description');
- $organization =
$this->so_organization->get_organization_local($o_id);
- $new_org = true;
-
- $organization =
$this->so_organization->get_organization_local($o_id);
- $person_arr =
$this->so_organization->get_contacts_local_as_objects($o_id);
- foreach($person_arr as $p)
- {
- //var_dump($p);
- $persons[] = $p;
- }
-
- $message = lang('organization_saved_form');
-
- $this->render('activity_new.php', array
- (
- 'activity' => $activity,
- 'new_organization' => true,
- 'organization' => $organization,
- 'contact1' => $persons[0],
- 'contact2' => $persons[1],
- 'groups' => $groups,
- 'arenas' => $arenas,
- 'buildings' => $buildings,
- 'categories' => $categories,
- 'targets' => $targets,
- 'districts' => $districts,
- 'offices' => $offices,
- 'editable' => true,
- 'message' => isset($message) ?
$message : phpgw::get_var('message'),
- 'error' => isset($error) ?
$error : phpgw::get_var('error'),
- 'ajaxURL' => $ajaxUrl
- )
- );
- }
+ }
else if(isset($_POST['save_activity']))
{
- //$persons =
$this->so_organization->get_contacts($o_id);
- //$organization =
$this->so_organization->get_single($o_id);
-
$get_org_from_local = false;
$new_org_group = false;
- $new_org = phpgw::get_var('new_org');
+ $new_org = phpgw::get_var('new_organization');
if($new_org != null && $new_org == 'yes')
{
$get_org_from_local = true;
@@ -229,100 +172,70 @@
if($get_org_from_local)
{
$activity->set_new_org(true);
- $person_arr =
$this->so_contact->get_local_contact_persons($o_id);
+ //$person_arr =
$this->so_contact->get_local_contact_persons($o_id);
+ //foreach($person_arr as $p)
+ //{
+ //$persons[] = $p;
+ //}
+ //$person_ids =
$this->so_organization->get_contacts_local($o_id);
+ //$desc =
$this->so_organization->get_description_local($o_id);
+ $organization =
$this->so_organization->get_organization_local($o_id);
+ $new_org = true;
+ //$new_org_group = true;
+
+ //Add new group for the activity
+ $group_info['name'] =
phpgw::get_var('title');
+ $group_info['organization_id'] = $o_id;
+ $group_info['description'] =
phpgw::get_var('description');
+ $group_info['status'] = "new";
+ $g_id =
$this->so_activity->add_group_local($group_info);
+
+ //add contact persons
+ $contact1 = array();
+ $contact1['name'] =
phpgw::get_var('contact_name');
+ $contact1['phone'] =
phpgw::get_var('contact_phone');
+ $contact1['mail'] =
phpgw::get_var('contact_mail');
+ $contact1['org_id'] = $o_id;
+ $contact1['group_id'] = $g_id;
+
$this->so_activity->add_contact_person_local($contact1);
+
+ $person_arr =
$this->so_contact->get_local_contact_persons($g_id, true);
foreach($person_arr as $p)
{
- //var_dump($p);
$persons[] = $p;
}
- $person_ids =
$this->so_organization->get_contacts_local($o_id);
- $desc =
$this->so_organization->get_description_local($o_id);
- $organization =
$this->so_organization->get_organization_local($o_id);
- $new_org = true;
- $new_org_group = true;
- //var_dump($organization);
+ $desc = phpgw::get_var('description');
+ $group =
$this->so_group->get_group_local($g_id);
+ $person_ids =
$this->so_group->get_contacts_local($g_id);
+ $new_group = true;
}
else if(is_numeric($o_id) && $o_id > 0)
- {
- if(isset($g_id) && $g_id == "new_group")
+ {
+ $group_info['name'] =
phpgw::get_var('title');
+ $group_info['organization_id'] = $o_id;
+ $group_info['description'] =
phpgw::get_var('description');
+ $group_info['status'] = "new";
+ $g_id =
$this->so_activity->add_group_local($group_info);
+
+ //add contact persons
+ $contact1 = array();
+ $contact1['name'] =
phpgw::get_var('contact_name');
+ $contact1['phone'] =
phpgw::get_var('contact_phone');
+ $contact1['mail'] =
phpgw::get_var('contact_mail');
+ $contact1['org_id'] = 0;
+ $contact1['group_id'] = $g_id;
+
$this->so_activity->add_contact_person_local($contact1);
+
+ $person_arr =
$this->so_contact->get_local_contact_persons($g_id, true);
+ foreach($person_arr as $p)
{
- $group_info['name'] =
phpgw::get_var('groupname');
- $group_info['organization_id']
= $o_id;
- $group_info['description'] =
phpgw::get_var('group_description');
- $group_info['status'] = "new";
- $g_id =
$this->so_activity->add_group_local($group_info);
-
- //add contact persons
- $contact1 = array();
- $contact1['name'] =
phpgw::get_var('group_contact1_name');
- $contact1['phone'] =
phpgw::get_var('group_contact1_phone');
- $contact1['mail'] =
phpgw::get_var('group_contact1_mail');
- $contact1['org_id'] = 0;
- $contact1['group_id'] = $g_id;
-
$this->so_activity->add_contact_person_local($contact1);
-
- $contact2 = array();
- $contact2['name'] =
phpgw::get_var('group_contact2_name');
- $contact2['phone'] =
phpgw::get_var('group_contact2_phone');
- $contact2['mail'] =
phpgw::get_var('group_contact2_mail');
- $contact2['org_id'] = 0;
- $contact2['group_id'] = $g_id;
-
$this->so_activity->add_contact_person_local($contact2);
-
- //$persons =
$this->so_group->get_contacts_local_as_objects($g_id);
- $person_arr =
$this->so_contact->get_local_contact_persons($g_id, true);
- foreach($person_arr as $p)
- {
- //var_dump($p);
- $persons[] = $p;
- }
- $desc =
phpgw::get_var('group_description');
- $group =
$this->so_group->get_group_local($g_id);
- $person_ids =
$this->so_group->get_contacts_local($g_id);
- $organization =
$this->so_organization->get_single($o_id);
- $new_org_group = true;
+ $persons[] = $p;
}
- else if(isset($g_id) &&
is_numeric($g_id) && $g_id > 0)
- {
- $person_ids =
$this->so_group->get_contacts($g_id);
- //$person_arr =
$this->so_contact->get_local_contact_persons($g_id, true);
- $person_arr =
$this->so_contact->get_booking_contact_persons($g_id, true);
- foreach($person_arr as $p)
- {
- //var_dump($p);
- $persons[] = $p;
- }
- $desc =
$this->so_group->get_description($g_id);
- $organization =
$this->so_organization->get_single($o_id);
- $group =
$this->so_group->get_single($g_id);
- }
- else if(isset($o_id) &&
is_numeric($o_id) && $o_id > 0)
- {
- if($get_org_from_local)
- {
- $person_arr =
$this->so_contact->get_local_contact_persons($o_id);
- foreach($person_arr as
$p)
- {
- //var_dump($p);
- $persons[] = $p;
- }
- $person_ids =
$this->so_organization->get_contacts_local($o_id);
- $desc =
$this->so_organization->get_description_local($o_id);
- $organization =
$this->so_organization->get_organization_local($o_id);
- }
- else
- {
- $person_ids =
$this->so_organization->get_contacts($o_id);
- $person_arr =
$this->so_contact->get_local_contact_persons($o_id);
- foreach($person_arr as
$p)
- {
- //var_dump($p);
- $persons[] = $p;
- }
- $desc =
$this->so_organization->get_description($o_id);
- $organization =
$this->so_organization->get_single($o_id);
- }
- }
+ $desc = phpgw::get_var('description');
+ $group =
$this->so_group->get_group_local($g_id);
+ $person_ids =
$this->so_group->get_contacts_local($g_id);
+ $organization =
$this->so_organization->get_single($o_id);
+ $new_group = true;
}
if(strlen($desc) > 254)
@@ -330,31 +243,48 @@
$desc = substr($desc,0,254);
}
- $arena_id = phpgw::get_var('arena_id');
- if($arena_id != null && $arena_id ==
'new_arena')
+ $arena_id = phpgw::get_var('internal_arena_id');
+ $new_arena = phpgw::get_var('new_arena_hidden');
+ if($new_arena != null && $new_arena ==
'new_arena')
{
$arena = new activitycalendar_arena();
$arena_name =
phpgw::get_var('arena_name');
- $arena_address =
phpgw::get_var('arena_address') . ' ' . phpgw::get_var('arena_number') . ', ' .
phpgw::get_var('arena_postaddress');
+ $arena_address =
phpgw::get_var('arena_address');
+ $arena_addressnumber =
phpgw::get_var('arena_number');
+ $arena_zip_code =
phpgw::get_var('arena_zip_code');
+ $arena_city =
phpgw::get_var('arena_city');
$arena->set_arena_name($arena_name);
$arena->set_address($arena_address);
+
$arena->set_addressnumber($arena_addressnumber);
+ $arena->set_zip_code($arena_zip_code);
+ $arena->set_city($arena_city);
$arena->set_active(true);
// All is good, store arena
if ($this->so_arena->store($arena)) {
$arena_id = $arena->get_id();
+ $activity->set_arena($arena_id);
}
}
-
+ else
+ {
+ $arena_arr = explode($arena_id,"_");
+ if($arena_arr[0] == 'i')
+ {
+
$activity->set_internal_arena($arena_arr[1]);
+ }
+ else
+ {
+ $activity->set_arena($arena_arr[1]);
+ }
+ }
+
//... set all parameters
$activity->set_title(phpgw::get_var('title'));
$activity->set_organization_id($o_id);
$activity->set_group_id($g_id);
- $activity->set_arena($arena_id);
-
$activity->set_internal_arena(phpgw::get_var('internal_arena_id'));
- $district_array = phpgw::get_var('district');
- $activity->set_district(implode(",",
$district_array));
+
$activity->set_district(phpgw::get_var('district'));
$activity->set_office(phpgw::get_var('office'));
$activity->set_state(1);
$activity->set_category(phpgw::get_var('category'));
@@ -362,13 +292,13 @@
$activity->set_target(implode(",",
$target_array));
$activity->set_description($desc);
$activity->set_time(phpgw::get_var('time'));
- $activity->set_contact_persons($person_ids);
+ $activity->set_contact_persons($persons);
$activity->set_special_adaptation(phpgw::get_var('special_adaptation'));
$activity->set_contact_person_2_address(phpgw::get_var('contact2_address') . ",
" . phpgw::get_var('contact2_number'));
$activity->set_contact_person_2_zip(phpgw::get_var('contact2_postaddress'));
$activity->set_frontend(true);
- $activity->set_new_org($new_org_group);
-
+ $activity->set_new_org($new_org);
+ $activity->set_new_group($new_group);
$target_ok = false;
$district_ok = false;
if($activity->get_target() &&
$activity->get_target() != '')
@@ -400,7 +330,6 @@
'organization' => $organization,
'group'
=> $group,
'contact1' => $persons[0],
-
'contact2' => $persons[1],
'arenas' => $arenas,
'buildings' => $buildings,
'categories' => $categories,
@@ -463,7 +392,7 @@
{
$errorMsgs = array();
$infoMsgs = array();
- $activity =
activitycalendar_soactivity::get_instance()->get_single((int)phpgw::get_var('id'));
+ $activity =
$this->so_activity->get_single((int)phpgw::get_var('id'));
if($activity == null) // Not found
{
Modified: trunk/activitycalendarfrontend/setup/phpgw_no.lang
===================================================================
--- trunk/activitycalendarfrontend/setup/phpgw_no.lang 2012-07-09 18:27:02 UTC
(rev 9755)
+++ trunk/activitycalendarfrontend/setup/phpgw_no.lang 2012-07-11 09:01:40 UTC
(rev 9756)
@@ -1,11 +1,11 @@
activitycalendarfrontend common no Aktivitetsoversikt Frontend
Activitycalendarfrontend common no Aktivitetsoversikt Frontend
office activitycalendarfrontend no Hovedansvarlig kulturkontor
-arena activitycalendarfrontend no Arena
+arena activitycalendarfrontend no Lokale
description activitycalendarfrontend no Beskrivelse
date_start activitycalendarfrontend no Startdato
date_end activitycalendarfrontend no Sluttdato
-special_adaptation activitycalendarfrontend no Spesielt
tilpasset for utviklingshemmede
+special_adaptation activitycalendarfrontend no Ja, aktiviteten
er spesielt tilpasset for utviklingshemmede
target activitycalendarfrontend no Målgruppe
contact_person_1 activitycalendarfrontend no Kontaktperson 1
contact_person_2 activitycalendarfrontend no Kontaktperson 2
@@ -71,12 +71,14 @@
who activitycalendarfrontend no HVEM
arena_helptext activitycalendarfrontend no Oppgi arena ved å velge
kommunalt bygg eller eksterne bygg.<br/>Dersom ikke arena som skal benyttes
finnes i listen, kan du registrere en ny.<br/>Velg "Ny arena" i nedtrekksmenyen
for Eksterne bygg og oppgi deretter riktig navn og adresse på arenaen.
new_arena activitycalendarfrontend no Ny Arena
+register_new_arena activitycalendarfrontend no Registrer nytt
lokale
external_arena activitycalendarfrontend no Eksterne bygg
category_helptext activitycalendarfrontend no Velg kategori
target_helptext activitycalendarfrontend no Velg
målgruppe(r)
district_helptext activitycalendarfrontend no Velg bydel(er)
hvor aktiviteten foregår
adaptation_helptext activitycalendarfrontend no Kryss av om
aktiviteten er spesielt tilpasset
time_helptext activitycalendarfrontend no Oppgi tidspunkt for
aktiviteten, f.eks. onsdag kl. 20-21
+time activitycalendarfrontend no Dag og tid
office_helptext activitycalendarfrontend no Oppgi kontor
som saksbehandler aktiviteten
contact_info activitycalendarfrontend no Kontaktinformasjon for
kulturkontoret
contact_info_helptext activitycalendarfrontend no Hentes fra
booking/organisasjonsregister ved lagring.
@@ -98,8 +100,14 @@
save_organization_next activitycalendarfrontend no Lagre
organisasjon og gå videre til Ny aktivitet
new_organization activitycalendarfrontend no Ny organisasjon
organization_saved_form activitycalendarfrontend no
Organisasjonen er opprettet i aktivitetsoversikten.<br/>Du kan nå registrere en
aktivitet tilknyttet den nye organisasjonen.
-required_fields activitycalendarfrontend no Felter merket
med (*) er påkrevde felt.
+required_fields activitycalendarfrontend no Felt merket med
(*) er påkrevde felt.
mailBaseURL activitycalendarfrontend no Base-URL for e-post
ajaxURL activitycalendarfrontend no URL for AJAX-kall
Anonymous_user activitycalendarfrontend no Brukernavn for frontend
-Anonymous_password activitycalendarfrontend no Passord for
frontend
\ No newline at end of file
+Anonymous_password activitycalendarfrontend no Passord for
frontend
+new_activity_helptext activitycalendarfrontend no Hvem arrangerer
aktiviteten?
+responsible activitycalendarfrontend no Arrangør
+choose_org activitycalendarfrontend no Velg organisasjon
+activity_title activitycalendarfrontend no Navn på aktiviteten
+location activitycalendarfrontend no Lokale
+contact_person activitycalendarfrontend no Kontaktperson for
aktiviteten
\ No newline at end of file
Modified: trunk/activitycalendarfrontend/setup/setup.inc.php
===================================================================
--- trunk/activitycalendarfrontend/setup/setup.inc.php 2012-07-09 18:27:02 UTC
(rev 9755)
+++ trunk/activitycalendarfrontend/setup/setup.inc.php 2012-07-11 09:01:40 UTC
(rev 9756)
@@ -21,7 +21,7 @@
$setup_info['activitycalendarfrontend']['depends'][] = array(
'appname' => 'booking',
- 'versions' => Array('0.2.00',
'0.2.01','0.2.02','0.2.03','0.2.04','0.2.05','0.2.06','0.2.07','0.2.08')
+ 'versions' => Array('0.2.00',
'0.2.01','0.2.02','0.2.03','0.2.04','0.2.05','0.2.06','0.2.07','0.2.08','0.2.09')
);
$setup_info['activitycalendarfrontend']['depends'][] = array(
@@ -31,7 +31,7 @@
$setup_info['activitycalendarfrontend']['depends'][] = array(
'appname' => 'activitycalendar',
- 'versions' =>
Array('0.1.3','0.1.4','0.1.5','0.1.6','0.1.7','0.1.8')
+ 'versions' =>
Array('0.1.3','0.1.4','0.1.5','0.1.6','0.1.7','0.1.8','0.1.9','0.1.10','0.1.11')
);
/* The hooks this app includes, needed for hooks registration */
Modified: trunk/activitycalendarfrontend/templates/base/activity.php
===================================================================
--- trunk/activitycalendarfrontend/templates/base/activity.php 2012-07-09
18:27:02 UTC (rev 9755)
+++ trunk/activitycalendarfrontend/templates/base/activity.php 2012-07-11
09:01:40 UTC (rev 9756)
@@ -4,26 +4,28 @@
$act_so = activitycalendar_soactivity::get_instance();
$contpers_so = activitycalendar_socontactperson::get_instance();
?>
-<div class="yui-content" style="width: 100%;">
+<div class="yui-content">
<div id="details">
-
- <?php if($message){?>
- <div class="success">
- <?php echo $message;?>
+ <?php if($message){?>
+ <div class="success">
+ <?php echo $message;?>
+ </div>
+ <?php }else if($error){?>
+ <div class="error">
+ <?php echo $error;?>
+ </div>
+ <?php }?>
</div>
- <?php }else if($error){?>
- <div class="error">
- <?php echo $error;?>
- </div>
- <?php }?>
- </div>
+ <DIV class="pageTop">
<h1><?php echo lang('activity') ?></h1>
- <form action="#" method="post">
- <input type="hidden" name="id" value="<?php
if($activity->get_id()){ echo $activity->get_id(); } else { echo '0'; } ?>"/>
- <dl class="proplist-col" style="width: 60%">
- <h2><?php echo lang('what')?></h2>
+ </DIV>
+ <form action="#" method="post">
+ <input type="hidden" name="id" value="<?php
if($activity->get_id()){ echo $activity->get_id(); } else { echo '0'; } ?>"/>
+ <dl class="proplist-col">
+ <FIELDSET title="Hva">
+ <LEGEND>Hva</LEGEND>
<dt>
- <label for="title"><?php echo
lang('title') ?></label>
+ <label for="title"><?php echo
lang('activity_title') ?></label>
</dt>
<dd>
<?php echo $activity->get_title();?>
@@ -45,6 +47,8 @@
}
?>
</dd>
+ </FIELDSET>
+ <FIELDSET id="hvem"><legend>For hvem</legend>
<dt>
<label for="target"><?php echo
lang('target') ?></label>
</dt>
@@ -61,50 +65,40 @@
?>
</dd>
<dt>
- <label for="district"><?php echo
lang('district') ?></label>
+ <input type="checkbox"
name="special_adaptation" id="special_adaptation"<?php echo
$activity->get_special_adaptation() ? ' checked="checked"' : '' ?>
disabled="disabled" /><label for="special_adaptation"><?php echo
lang('special_adaptation') ?></label>
</dt>
- <dd>
- <?php
- if($activity->get_district()){
- $current_district_ids =
$activity->get_district();
-
$current_district_id_array=explode(",", $current_district_ids);
-
foreach($current_district_id_array as $curr_district)
- {
- echo
$act_so->get_district_name($curr_district).'<br/>';
- }
- }
- ?>
- </dd>
+ </FIELDSET>
+ <FIELDSET title="hvor">
+ <LEGEND>Hvor og når</LEGEND>
+ <?php if($activity->get_internal_arena()) { ?>
<dt>
- <label for="special_adaptation"><?php
echo lang('special_adaptation') ?></label>
+ <label for="arena"><?php echo
lang('building') ?></label>
</dt>
<dd>
- <input type="checkbox"
name="special_adaptation" id="special_adaptation"<?php echo
$activity->get_special_adaptation() ? ' checked="checked"' : '' ?>
disabled="disabled" />
+ <?php echo
activitycalendar_soarena::get_instance()->get_building_name($activity->get_internal_arena());
?>
</dd>
- <hr />
- <h2><?php echo lang('where_when')?></h2>
+ <?php }?>
+ <?php if($activity->get_arena()) { ?>
<dt>
- <?php
if($activity->get_internal_arena()) { ?>
- <label for="arena"><?php echo
lang('building') ?></label>
- <?php }?>
+ <label for="arena"><?php echo
lang('arena') ?></label>
</dt>
<dd>
- <?php
-
if($activity->get_internal_arena()){
- echo
activitycalendar_soarena::get_instance()->get_building_name($activity->get_internal_arena());
- }
- ?>
+ <?php echo
activitycalendar_soarena::get_instance()->get_arena_name($activity->get_arena());
?>
</dd>
+ <?php } ?>
<dt>
- <?php if($activity->get_arena()) { ?>
- <label for="arena"><?php echo
lang('arena') ?></label>
- <?php } ?>
+ <label for="district"><?php echo
lang('district') ?></label>
</dt>
<dd>
<?php
- if($activity->get_arena()){
- echo
activitycalendar_soarena::get_instance()->get_arena_name($activity->get_arena());
+ if($activity->get_district()){
+ $current_district_ids =
$activity->get_district();
+
$current_district_id_array=explode(",", $current_district_ids);
+
foreach($current_district_id_array as $curr_district)
+ {
+ echo
$act_so->get_district_name($curr_district).'<br/>';
}
+ }
?>
</dd>
<dt>
@@ -113,40 +107,20 @@
<dd>
<?php echo $activity->get_time();?>
</dd>
- <dt>
- <label for="office"><?php echo
lang('office') ?></label>
- </dt>
+ </FIELDSET>
+ <FIELDSET id="arr">
+ <legend>Arrangør</legend>
<dd>
- <?php
- if($activity->get_office()){
- echo
$act_so->get_office_name($activity->get_office());
- }
- ?>
- </dd>
- <hr />
- <h2><?php echo lang('who')?></h2>
- <dt>
- <label for="organization_id"><?php echo
lang('organization') ?></label>
- </dt>
- <dd>
<?php echo $organization->get_name();?>
<?php if(!$activity->get_new_org()){?>
<a
href="index.php?menuaction=activitycalendarfrontend.uiactivity.edit_organization_values&organization_id=<?php
echo $organization->get_id();?>"><?php echo lang('edit_organization');?></a>
<?php }?>
</dd>
+ <br/>
+ <LEGEND>Kontaktperson</LEGEND>
<dt>
- <label for="group_id"
id="group_label"><?php echo lang('group') ?></label>
- </dt>
- <dd>
- <?php
- if($activity->get_group_id()){
- echo $group->get_name();?>
- <?php }
- ?>
- </dd>
- <dt>
<?php
if($activity->get_contact_person_1()) { ?>
- <label for="contact_person_1"><?php
echo lang('contact_person_1') ?></label>
+ <label for="contact_person_1"><?php
echo lang('contact_person') ?></label>
<?php } ?>
</dt>
<dd>
@@ -155,32 +129,23 @@
<label
for="contact1_phone">Telefon</label>
<?php echo
isset($contact1)?$contact1->get_phone():''?><br/>
<label
for="contact1_mail">E-post</label>
- <?php echo
isset($contact1)?$contact1->get_email():''?><br/>
+ <?php echo
isset($contact1)?$contact1->get_email():''?>
</dd>
- <dt>
- <?php
if($activity->get_contact_person_2()) { ?>
- <label for="contact_person_2"><?php
echo lang('contact_person_2') ?></label>
- <?php } ?>
+ </FIELDSET>
+ <FIELDSET>
+ <BR>
+ <dt>
+ <LABEL for="office">Kulturkontor</label>
</dt>
<dd>
- <label for="contact2_name">Navn</label>
- <?php echo
isset($contact2)?$contact2->get_name():''?><br/>
- <label
for="contact2_phone">Telefon</label>
- <?php echo
isset($contact2)?$contact2->get_phone():''?><br/>
- <label
for="contact2_mail">E-post</label>
- <?php echo
isset($contact2)?$contact2->get_email():''?><br/>
+ <?php
+ if($activity->get_office()){
+ echo
$act_so->get_office_name($activity->get_office());
+ }
+ ?>
</dd>
-
- </dl>
- <div class="form-buttons">
- <?php
- if ($editable) {
- echo '<input type="submit"
name="save_activity" value="' . lang('save') . '" onclick="return allOK();"/>';
- }
- ?>
- </div>
-
- </form>
-
- </div>
+ </FIELDSET>
+ </dl>
+ <div class="form-buttons"> </div>
+ </form>
</div>
\ No newline at end of file
Modified: trunk/activitycalendarfrontend/templates/base/activity_new.php
===================================================================
--- trunk/activitycalendarfrontend/templates/base/activity_new.php
2012-07-09 18:27:02 UTC (rev 9755)
+++ trunk/activitycalendarfrontend/templates/base/activity_new.php
2012-07-11 09:01:40 UTC (rev 9756)
@@ -6,32 +6,57 @@
?>
<script type="text/javascript">
-
-function checkNewGroup()
-{
- var group_selected = document.getElementById('group_id').value;
- if(group_selected == 'new_group')
- {
- document.getElementById('new_group_fields').style.display =
"block";
+function toggle() {
+ var ele = document.getElementById("toggleText");
+ var text = document.getElementById("displayText");
+ var arenahidden = document.getElementById("new_arena_hidden");
+ if(ele.style.display == "block") {
+ ele.style.display = "none";
+ text.innerHTML = "Registrer nytt lokale";
+ }
+ else {
+ ele.style.display = "block";
+ text.innerHTML = "";
+ arenahidden.value="new_arena";
}
- else
- {
- document.getElementById('new_group_fields').style.display =
"none";
+}
+function toggle2() {
+ var ele = document.getElementById("toggleText2");
+ var text = document.getElementById("displayText2");
+ if(ele.style.display == "block") {
+ ele.style.display = "none";
+ text.innerHTML = "Legg til alternativ kontaktperson";
+ }
+ else {
+ ele.style.display = "block";
+ text.innerHTML = "";
}
}
-
-function checkNewArena()
-{
- var arena_selected = document.getElementById('arena_id').value;
- if(arena_selected == 'new_arena')
- {
- document.getElementById('new_arena_fields').style.display =
"block";
+function toggle3() {
+ var ele = document.getElementById("toggleText3");
+ var text = document.getElementById("displayText3");
+ if(ele.style.display == "block") {
+ ele.style.display = "none";
+ text.innerHTML = "Registrer ny organisasjon";
+ }
+ else {
+ ele.style.display = "block";
+ text.innerHTML = "(X)";
}
- else
- {
- document.getElementById('new_arena_fields').style.display =
"none";
- }
}
+function showhide(id)
+{
+ if(id == "org")
+ {
+ document.getElementById('orgf').style.display = "block";
+ document.getElementById('no_orgf').style.display = "none";
+ }
+ else
+ {
+ document.getElementById('orgf').style.display = "none";
+ document.getElementById('no_orgf').style.display = "block";
+ }
+}
function get_address_search()
{
@@ -133,67 +158,59 @@
}
}
-function run_checks()
+function allOK()
{
- check_external();
- checkNewArena();
-}
-
-function check_internal()
-{
- if(document.getElementById('internal_arena_id').value != null &&
document.getElementById('internal_arena_id').value > 0)
+ alert(document.getElementById('district').value);
+ if(document.getElementById('title').value == null ||
document.getElementById('title').value == '')
{
- //disable external arena drop-down
- document.getElementById('arena_id').disabled="disabled";
- document.getElementById('new_arena_fields').style.display =
"none";
+ alert("Tittel må fylles ut!");
+ return false;
}
- else
+ if(document.getElementById('description').value == null ||
document.getElementById('description').value == '')
{
- //enable external arena drop-down
- document.getElementById('arena_id').disabled="";
+ alert("Beskrivelse må fylles ut!");
+ return false;
}
-}
-
-function check_external()
-{
- if(document.getElementById('arena_id').value != null &&
(document.getElementById('arena_id').value > 0 ||
document.getElementById('arena_id').value == 'new_arena'))
+ if(document.getElementById('category').value == null ||
document.getElementById('category').value == 0)
{
- //disable internal arena drop-down
-
document.getElementById('internal_arena_id').disabled="disabled";
+ alert("Kategori må fylles ut!");
+ return false;
+ }
+ if((document.getElementById('internal_arena_id').value == null ||
document.getElementById('internal_arena_id').value == 0) &&
(document.getElementById('new_arena_hidden').value==null ||
document.getElementById('new_arena_hidden').value==''))
+ {
+ alert("Lokale må fylles ut!");
+ return false;
}
- else
+ if(document.getElementById('time').value == null ||
document.getElementById('time').value == '')
{
- //enable internal arena drop-down
- document.getElementById('internal_arena_id').disabled="";
- document.getElementById('new_arena_fields').style.display =
"none";
+ alert("Dag og tid må fylles ut!");
+ return false;
}
-}
-
-function allOK()
-{
- if(document.getElementById('title').value == null ||
document.getElementById('title').value == '')
+ if(document.getElementById('contact_name').value == null ||
document.getElementById('contact_name').value == '')
{
- alert("Tittel må fylles ut!");
+ alert("Navn på kontaktperson må fylles ut!");
return false;
- }
- if(document.getElementById('internal_arena_id').value == null ||
document.getElementById('internal_arena_id').value == 0)
+ }
+ if(document.getElementById('contact_phone').value == null ||
document.getElementById('contact_phone').value == '')
{
- if(document.getElementById('arena_id').value == null ||
document.getElementById('arena_id').value == 0)
- {
- alert("Arena må fylles ut!");
- return false;
- }
+ alert("Telefonnummer til kontaktperson må fylles ut!");
+ return false;
}
- if(document.getElementById('time').value == null ||
document.getElementById('time').value == '')
+ if(document.getElementById('contact_mail').value == null ||
document.getElementById('contact_mail').value == '')
{
- alert("Tid må fylles ut!");
+ alert("E-postadresse til kontaktperson må fylles ut!");
return false;
}
- if(document.getElementById('category').value == null ||
document.getElementById('category').value == 0)
+ if(document.getElementById('contact_mail2').value == null ||
document.getElementById('contact_mail2').value == '')
{
- alert("Kategori må fylles ut!");
+ alert("Begge felter for E-post må fylles ut!");
return false;
}
+ if(document.getElementById('contact_mail').value !=
document.getElementById('contact_mail2').value)
+ {
+ alert("E-post må være den samme i begge felt!");
+ return false;
+ }
if(document.getElementById('office').value == null ||
document.getElementById('office').value == 0)
{
alert("Hovedansvarlig kulturkontor må fylles ut!");
@@ -205,7 +222,7 @@
</script>
-<div class="yui-content" style="width: 100%;">
+<div class="yui-content">
<div id="details">
<?php if($message){?>
@@ -218,240 +235,235 @@
</div>
<?php }?>
</div>
- <h1><?php echo lang('new_activity') ?></h1>
- <div>
- <?php echo lang('required_fields')?>
+ <div class="pageTop">
+ <h1><?php echo lang('new_activity') ?></h1>
+ <div>
+ <?php echo lang('required_fields')?>
+ </div>
</div>
<form action="#" method="post">
<input type="hidden" name="id" value="<?php
if($activity->get_id()){ echo $activity->get_id(); } else { echo '0'; } ?>"/>
- <dl class="proplist-col" style="width: 200%">
- <h2><?php echo lang('what')?></h2>
- <dt>
- <label for="title"><?php echo
lang('title') ?> (*)</label>
- </dt>
- <dd>
- <?php echo lang('title_helptext')?><br/>
- <input type="text" name="title"
id="title" value="<?php echo $activity->get_title() ?>" size="60"/>
- </dd>
- <dt>
- <label for="category"><?php echo
lang('category') ?> (*)</label>
- </dt>
- <dd>
- <?php
- $current_category_id =
$activity->get_category();
- ?>
- <select name="category" id="category">
- <option value="0">Ingen
kategori valgt</option>
- <?php
- foreach($categories as
$category)
- {
- echo "<option
".($current_category_id == $category->get_id() ? 'selected="selected"' : "")."
value=\"{$category->get_id()}\">".$category->get_name()."</option>";
- }
- ?>
- </select>
- </dd>
- <dt>
- <label for="target"><?php echo
lang('target') ?> (*)</label>
- </dt>
- <dd>
- <?php
- $current_target_ids =
$activity->get_target();
- $current_target_id_array=explode(",",
$current_target_ids);
- foreach($targets as $t)
- {
- ?>
- <input name="target[]"
type="checkbox" value="<?php echo $t->get_id()?>" <?php echo
(in_array($t->get_id(), $current_target_id_array) ? 'checked' : "")?>/><?php
echo $t->get_name()?><br/>
- <?php
- }
- ?>
- </dd>
- <dt>
- <label for="district"><?php echo
lang('district') ?> (*)</label>
- </dt>
- <dd>
- <?php
- foreach($districts as $d)
- {
- ?>
- <input name="district[]"
type="checkbox" value="<?php echo $d['part_of_town_id']?>" /><?php echo
$d['name']?><br/>
- <?php
- }
- ?>
- </dd>
- <dt>
- <label for="special_adaptation"><?php
echo lang('special_adaptation') ?></label>
- </dt>
- <dd>
- <input type="checkbox"
name="special_adaptation" id="special_adaptation" />
- </dd>
- <hr />
- <h2><?php echo lang('where_when')?></h2>
- <dt>
- <label for="arena"><?php echo
lang('arena') ?> (*)</label>
- <br/><?php echo lang('arena_helptext')?>
- </dt>
- <dt>
- <label for="internal_arena_id"><?php
echo lang('building') ?></label>
- </dt>
- <dd>
- <?php
- $current_internal_arena_id =
$activity->get_internal_arena();
- ?>
- <select name="internal_arena_id"
id="internal_arena_id" onchange="javascript: check_internal();">
- <option value="0">Ingen
kommunale bygg valgt</option>
- <?php
- foreach($buildings as
$building_id => $building_name)
- {
- echo "<option
".($current_internal_arena_id == $building_id? 'selected="selected"' : "")."
value=\"{$building_id}\">".$building_name."</option>";
- }
- ?>
- </select>
- </dd>
- <dt>
- <label for="arena_id"><?php echo
lang('external_arena') ?></label>
- </dt>
- <dd>
- <?php
- $current_arena_id =
$activity->get_arena();
- ?>
- <select name="arena_id" id="arena_id"
style="width: 400px;" onchange="javascript: run_checks();">
- <option value="0">Ingen arena
valgt</option>
- <option value="new_arena">Ny
arena</option>
- <?php
- foreach($arenas as $arena)
- {
- echo "<option
".($current_arena_id == $arena->get_id() ? 'selected="selected"' : "")."
value=\"{$arena->get_id()}\"
title=\"{$arena->get_arena_name()}\">".$arena->get_arena_name()."</option>";
- }
- ?>
- </select>
- </dd>
- <span id="new_arena_fields" style="display:
none;">
+ <input type="hidden" name="organization_id"
value="<?php echo $organization->get_id() ?>"/>
+ <?php if($new_organization){?>
+ <input type="hidden" name="new_organization"
value="yes"/>
+ <?php }?>
+ <input type="hidden" name="new_arena_hidden"
id="new_arena_hidden" value=""/>
+ <dl class="proplist-col">
+ <fieldset title="<?php echo lang('what')?>">
+ <legend>Hva</legend>
+ <dt>
+ <label for="title"><?php echo
lang('activity_title') ?> (*) <A
onclick="window.open('hjelp.html','name','height=255,
width=350,toolbar=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no'); return false;"
+ href="http://dl-web.dropbox.com/u/44022695/Aktivitetsoversikt/hjelp.html"
+ target="name"><IMG alt="Hjelp"
+ src="/aktivitetsoversikt/images/hjelp.gif"></A></label>
+ </dt>
+ <dd>
+ <input type="text" name="title"
id="title" value="<?php echo $activity->get_title() ?>" size="83"/>
+ </dd>
+ <DT><LABEL for="org_description"><?php echo
lang('description')?> (*) <A
onclick="window.open('hjelp.html','name','height=255,
width=350,toolbar=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no'); return false;"
+
href="http://dl-web.dropbox.com/u/44022695/Aktivitetsoversikt/hjelp.html"
+ target="name"><IMG alt="Hjelp"
+
src="/aktivitetsoversikt/images/hjelp.gif"></A></LABEL></DT>
+ <DD><TEXTAREA cols="80" rows="4" name="description"
id="description"></TEXTAREA></DD>
+ <dt>
+ <label for="category"><?php echo
lang('category') ?> (*) <A
onclick="window.open('hjelp.html','name','height=255,
width=350,toolbar=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no'); return false;"
+
href="http://dl-web.dropbox.com/u/44022695/Aktivitetsoversikt/hjelp.html"
+ target="name"><IMG alt="Hjelp"
+
src="/aktivitetsoversikt/images/hjelp.gif"></A></label>
+ </dt>
+ <dd>
+ <?php
+ $current_category_id =
$activity->get_category();
+ ?>
+ <select name="category" id="category">
+ <option value="0">Ingen
kategori valgt</option>
+ <?php
+ foreach($categories as
$category)
+ {
+ echo "<option
".($current_category_id == $category->get_id() ? 'selected="selected"' : "")."
value=\"{$category->get_id()}\">".$category->get_name()."</option>";
+ }
+ ?>
+ </select>
+ </dd>
+ </fieldset>
+ <fieldset id="hvem"><legend>For hvem</legend>
+ <dt>
+ <label for="target"><?php echo
lang('target') ?> (*) <A onclick="window.open('hjelp.html','name','height=255,
width=350,toolbar=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no'); return false;"
+
href="http://dl-web.dropbox.com/u/44022695/Aktivitetsoversikt/hjelp.html"
+ target="name"><IMG alt="Hjelp"
+ src="/aktivitetsoversikt/images/hjelp.gif"></A>
+ </label>
+ </dt>
+ <dd>
+ <?php
+ $current_target_ids =
$activity->get_target();
+ $current_target_id_array=explode(",",
$current_target_ids);
+ foreach($targets as $t)
+ {
+ ?>
+ <input name="target[]"
type="checkbox" value="<?php echo $t->get_id()?>" <?php echo
(in_array($t->get_id(), $current_target_id_array) ? 'checked' : "")?>/><?php
echo $t->get_name()?><br/>
+ <?php
+ }
+ ?>
+ </dd>
+ <dt>
+ <input type="checkbox"
name="special_adaptation" id="special_adaptation" />
+ <label for="special_adaptation"><?php
echo lang('special_adaptation') ?></label>
+ <A
onclick="window.open('hjelp.html','name','height=255,
width=350,toolbar=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no'); return false;"
+
href="http://dl-web.dropbox.com/u/44022695/Aktivitetsoversikt/hjelp.html"
+ target="name"><IMG alt="Hjelp"
+ src="/aktivitetsoversikt/images/hjelp.gif"></A>
+ </dt>
+ </fieldset>
+ <fieldset title="hvor">
+ <LEGEND>Hvor og når</LEGEND>
<dt>
- <label for="new_arena"><?php
echo lang('new_arena') ?></label>
- </dt>
- <dt><label for="arena_name"><?php echo
lang('name') ?></label></dt>
- <dd><input type="text"
name="arena_name" id="arena_name" /></dd>
- <dt><label for="arena_address"><?php
echo lang('address') ?></label></dt>
- <dd><input type="text"
name="arena_address" id="arena_address"
onkeyup="javascript:get_address_search_arena()"/>
- <div id="arena_address_container"></div>
- <label for="arena_number">Nummer</label>
- <input type="text"
name="arena_number"/><br/>
- <label
for="arena_postaddress">Postnummer og Sted</label>
- <input type="text"
name="arena_postaddress"/></dd>
- </span>
- <dt>
- <label for="time"><?php echo
lang('time') ?> (*)</label>
- </dt>
- <dd>
- <input type="text" name="time"
id="time" value="<?php echo $activity->get_time() ?>" />
- </dd>
- <dt>
- <label for="office"><?php echo
lang('office') ?> (*)</label>
- </dt>
- <dd>
- <?php
- $selected_office =
$activity->get_office();
- ?>
- <select name="office" id="office">
- <option value="0">Ingen kontor
valgt</option>
- <?php
- foreach($offices as $office)
- {
- echo "<option
".($selected_office == $office['id'] ? 'selected="selected"' : "")."
value=\"{$office['id']}\">".$office['name']."</option>";
- }
- ?>
- </select>
- </dd>
- <dt>Kontaktinformasjon for kulturkontoret
(*)</dt>
- <dt><label
for="contact2_address">Adresse</label>
- <dd><input type="text" name="contact2_address"
id="contact2_address" onkeyup="javascript:get_address_search_cp2()"/>
- <div id="contact2_address_container"></div></dd>
- <dt><label
for="contact2_number">Husnummer</label></dt>
- <dd><input type="text"
name="contact2_number"/></dd>
- <dt><label
for="contact2_postaddress">Postnummer og Sted</label>
- <dd><input type="text"
name="contact2_postaddress" size="100"/></dd>
- <hr />
- <h2><?php echo lang('who')?></h2>
- <dt>
- <label for="organization_id"><?php echo
lang('organization') ?> (*)</label>
- </dt>
- <?php if($new_organization){?>
- <input type="hidden" name="new_org"
id="new_org" value="yes" />
- <?php }?>
- <input type="hidden"
name="organization_id" id="organization_id" value="<?php echo
$organization->get_id()?>" />
- <dt><label
for="orgname">Organisasjonsnavn</label></dt>
- <dd><?php echo
$organization->get_name()?></dd>
- <dt><label
for="orgno">Organisasjonsnummer</label></dt>
- <dd><?php echo
$organization->get_organization_number()?></dd>
- <dt><label
for="homepage">Hjemmeside</label></dt>
- <dd><?php echo
$organization->get_homepage()?></dd>
- <dt><label
for="email">E-post</label></dt>
- <dd><?php echo
$organization->get_email()?></dd>
- <dt><label
for="phone">Telefon</label></dt>
- <dd><?php echo
$organization->get_phone()?></dd>
- <dt><label
for="street">Adresse</label></dt>
- <dd><?php echo
$organization->get_address()?></dd>
- <dt><label
for="org_description">Beskrivelse av aktiviteten</label></dt>
- <dd><?php echo
$organization->get_description()?></dd>
- <hr/>
- <dt>Kontaktperson 1</dt>
- <dt><label for="contact1_name">Navn</label></dt>
- <dd><?php echo
isset($contact1)?$contact1->get_name():''?></dd>
- <dt><label
for="contact1_phone">Telefon</label></dt>
- <dd><?php echo
isset($contact1)?$contact1->get_phone():''?></dd>
- <dt><label
for="contact1_mail">E-post</label></dt>
- <dd><?php echo
isset($contact1)?$contact1->get_email():''?></dd>
- <dt>Kontaktperson 2</dt>
- <dt><label for="contact2_name">Navn</label></dt>
- <dd><?php echo
isset($contact2)?$contact2->get_name():''?></dd>
- <dt><label
for="contact2_phone">Telefon</label></dt>
- <dd><?php echo
isset($contact2)?$contact2->get_phone():''?></dd>
- <dt><label
for="contact2_mail">E-post</label></dt>
- <dd><?php echo
isset($contact2)?$contact2->get_email():''?></dd>
- <hr/>
- <?php if(!$new_organization){?>
- <dt>
- <label for="group_id"
id="group_label"><?php echo lang('group') ?></label>
- </dt>
- <dd>
- <?php echo lang('group_helptext')?><br/>
- <select name="group_id" id="group_id"
onchange="javascript:checkNewGroup()">
- <option value="0">Ingen gruppe
valgt</option>
- <option value='new_group'>Ny
gruppe</option>
- <?php foreach($groups as $group){?>
- <option value="<?php echo
$group->get_id()?>"><?php echo $group->get_name()?></option>
- <?php }?>
- </select>
- </dd>
- <span id="new_group_fields" style="display:
none;">
- <dt><label for="groupname">Navn
(*)</label></dt>
- <dd><input type="text" name="groupname"
size="100"/><br/></dd>
- <dt><label
for="group_description">Beskrivelse av aktiviteten (*)</label></dt>
- <dd><textarea rows="10" cols="100"
name="group_description"></textarea></dd>
- <hr/>
- <dt>Kontaktperson 1</dt>
- <dt><label for="contact1_name">Navn
(*)</label></dt>
- <dd><input type="text"
name="group_contact1_name" value="<?php echo
isset($contact1)?$contact1->get_name():''?>"/></dd>
- <dt><label for="contact1_phone">Telefon
(*)</label></dt>
- <dd><input type="text"
name="group_contact1_phone" value="<?php echo
isset($contact1)?$contact1->get_phone():''?>"/></dd>
- <dt><label for="contact1_mail">E-post
(*)</label></dt>
- <dd><input type="text"
name="group_contact1_mail" value="<?php echo
isset($contact1)?$contact1->get_email():''?>"/></dd>
- <dt>Kontaktperson 2</dt>
- <dt><label
for="contact2_name">Navn</label></dt>
- <dd><input type="text"
name="group_contact2_name" value="<?php echo
isset($contact2)?$contact2->get_name():''?>"/></dd>
- <dt><label
for="contact2_phone">Telefon</label></dt>
- <dd><input type="text"
name="group_contact2_phone" value="<?php echo
isset($contact2)?$contact2->get_phone():''?>"/></dd>
- <dt><label
for="contact2_mail">E-post</label></dt>
- <dd><input type="text"
name="group_contact2_mail" value="<?php echo
isset($contact2)?$contact2->get_email():''?>"/></dd>
- <hr/>
- </span>
- <?php }?>
+ <br/>
+ <label for="arena"><?php echo
lang('location') ?> (*) <A
onclick="window.open('hjelp.html','name','height=255,
width=350,toolbar=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no'); return false;"
+
href="http://dl-web.dropbox.com/u/44022695/Aktivitetsoversikt/hjelp.html"
+ target="name"><IMG alt="Hjelp"
+ src="/aktivitetsoversikt/images/hjelp.gif"></A>
+ </label>
+ </dt>
+ <dd>
+ <select name="internal_arena_id"
id="internal_arena_id" style="width: 200px;">
+ <option value="0">Lokale ikke
valgt</option>
+ <optgroup label="<?php echo
lang('building') ?>">
+ <?php
+ foreach($buildings as
$building_id => $building_name)
+ {
+ echo "<option
value=\"i_{$building_id}\">".$building_name."</option>";
+ }
+ ?>
+ </optgroup>
+ <optgroup label="<?php echo
lang('building') ?>">
+ <?php
+ foreach($arenas as $arena)
+ {
+ echo "<option
value=\"e_{$arena->get_id()}\"
title=\"{$arena->get_arena_name()}\">".$arena->get_arena_name()."</option>";
+ }
+ ?>
+ </optgroup>
+ </select>
+ <BR>
+ <A id="displayText"
href="javascript:toggle();">Ikke i listen? Registrer nytt lokale</A>
+ </dd>
+ <DIV style="overflow: auto; display: none;"
id="toggleText">
+ <DT>
+ <label for="new_arena"><?php echo
lang('register_new_arena') ?></label>
+ <A
onclick="window.open('hjelp.html','name','height=255,
width=350,toolbar=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no'); return false;"
+
href="http://dl-web.dropbox.com/u/44022695/Aktivitetsoversikt/hjelp.html"
+ target="name"><IMG alt="Hjelp"
src="/aktivitetsoversikt/images/hjelp.gif"></A>
+ </DT>
+ <DT><LABEL for="arena_name"><?php echo lang('name') ?>
(*) <A onclick="window.open('hjelp.html','name','height=255,
width=350,toolbar=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no'); return false;"
+
href="http://dl-web.dropbox.com/u/44022695/Aktivitetsoversikt/hjelp.html"
+ target="name"><IMG alt="Hjelp"
+
src="/aktivitetsoversikt/images/hjelp.gif"></A></LABEL></DT>
+ <DD><INPUT id="arena_name" name="arena_name" size="50"
type="text"></DD>
+ <DT style="margin-right: 20px; float: left;">
+ <LABEL
+ for="arena_address">Gateadresse (*) <A
onclick="window.open('hjelp.html','name','height=255,
width=350,toolbar=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no'); return false;"
+
href="http://dl-web.dropbox.com/u/44022695/Aktivitetsoversikt/hjelp.html"
+ target="name"><IMG alt="Hjelp"
+ src="/aktivitetsoversikt/images/hjelp.gif"></A>
+ </LABEL><BR>
+ <INPUT id="arena_address"
+ onkeyup="javascript:get_address_search_arena()"
name="arena_address" size="50"
+ type="text"><BR>
+ <DIV id="arena_address_container"></DIV></DT>
+ <DT style="clear: right; float: left;"><LABEL
+ for="arena_number">Husnummer</LABEL><BR><INPUT
name="arena_number" size="5"
+ type="text"></DT><BR>
+ <DT style="clear: left; margin-right: 20px; float:
left;"><LABEL for="postaddress">Postnummer(*)</LABEL><BR><INPUT
+ name="postaddress" size="5" type="text"></DT>
+ <DT style="float: left;">
+ <LABEL for="arena_postaddress">Poststed
(*)</LABEL><BR>
+ <INPUT name="arena_postaddress" size="40"
type="text">
+ </DT>
+ <BR>
+ </DIV>
+ <dt>
+ <br/>
+ <label for="district"><?php echo
lang('district') ?> (*) <A
onclick="window.open('hjelp.html','name','height=255,
width=350,toolbar=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no'); return false;"
+
href="http://dl-web.dropbox.com/u/44022695/Aktivitetsoversikt/hjelp.html"
+ target="name"><IMG alt="Hjelp"
+ src="/aktivitetsoversikt/images/hjelp.gif"></A>
+ </label>
+ </dt>
+ <dd>
+ <?php
+ foreach($districts as $d)
+ {
+ ?>
+ <input name="district"
type="radio" value="<?php echo $d['part_of_town_id']?>" /><?php echo
$d['name']?><br/>
+ <?php
+ }
+ ?>
+ </dd>
+ <dt>
+ <br/>
+ <label for="time"><?php echo
lang('time') ?> (*) <A onclick="window.open('hjelp.html','name','height=255,
width=350,toolbar=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no'); return false;"
+
href="http://dl-web.dropbox.com/u/44022695/Aktivitetsoversikt/hjelp.html"
+ target="name"><IMG alt="Hjelp"
+ src="/aktivitetsoversikt/images/hjelp.gif"></A></label>
+ </dt>
+ <dd>
+ <input type="text" name="time"
id="time" value="<?php echo $activity->get_time() ?>" size="80" />
+ </dd>
+ </fieldset>
+ <FIELDSET
id="arr"><LEGEND>Kontaktperson</LEGEND><BR>
+ Kontaktperson for aktiviteten <A
onclick="window.open('hjelp.html','name','height=255,
width=350,toolbar=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no'); return false;"
+
href="http://dl-web.dropbox.com/u/44022695/Aktivitetsoversikt/hjelp.html"
+ target="name"><IMG alt="Hjelp"
src="/aktivitetsoversikt/images/hjelp.gif"></A><BR>
+ <DT><LABEL for="contact_name">Navn (*)</LABEL></DT>
+ <DD><INPUT name="contact_name" id="contact_name" size="80"
type="text"></DD>
+ <DT><LABEL for="contact_phone">Telefon (*)</LABEL></DT>
+ <DD><INPUT name="contact_phone" id="contact_phone"
type="text"></DD>
+ <DT><LABEL for="contact_mail">E-post (*)</LABEL></DT>
+ <DD><INPUT name="contact_mail" id="contact_mail" size="50"
type="text"></DD>
+ <DT><LABEL for="contact2_mail2">Gjenta e-post
(*)</LABEL></DT>
+ <DD><INPUT name="contact_mail2" id="contact_mail2" size="50"
type="text"></DD><!-- <a id="displayText2" href="javascript:toggle2();">Legg
til alternativ kontaktperson</a><br>
+ <div id="toggleText2" style="display: none">
+
+ Alternativ kontaktperson <a href="hjelp.html"
target="name"
+onclick="window.open('hjelp.html','name','height=255,
width=350,toolbar=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no'); return false;"
+><img src="images/hjelp.gif" alt="Hjelp"></a><br>
+ <dt><label for="contact1_name">Navn
(*)</label></dt>
+ <dd><input name="org_contact1_name" size="80"
type="text"></dd>
+ <dt><label for="contact1_phone">Telefon
(*)</label></dt>
+ <dd><input name="org_contact1_phone"
type="text"></dd>
+ <dt><label for="contact1_mail">E-post
(*)</label></dt>
+ <dd><input name="org_contact1_mail" type="text"
size="50"></dd>
+ </div><br> -->
+ </FIELDSET>
+ <FIELDSET>
+ <BR>
+ <DT><LABEL for="office">Hvilket kulturkontor skal motta
registreringen (*) <A
+ onclick="window.open('hjelp.html','name','height=255,
width=350,toolbar=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no'); return false;"
+
href="http://dl-web.dropbox.com/u/44022695/Aktivitetsoversikt/hjelp.html"
+ target="name"><IMG alt="Hjelp"
+
src="/aktivitetsoversikt/images/hjelp.gif"></A></LABEL></DT>
+ <dd>
+ <?php
+ $selected_office =
$activity->get_office();
+ ?>
+ <select name="office" id="office">
+ <option value="0">Ingen kontor
valgt</option>
+ <?php
+ foreach($offices as $office)
+ {
+ echo "<option
".($selected_office == $office['id'] ? 'selected="selected"' : "")."
value=\"{$office['id']}\">".$office['name']."</option>";
+ }
+ ?>
+ </select>
+ </dd>
+ </FIELDSET>
+ <br/>
<div class="form-buttons">
<input type="submit"
name="save_activity" value="<?php echo lang('save_activity') ?>"
onclick="return allOK();"/>
</div>
</dl>
</form>
-
</div>
</div>
\ No newline at end of file
Modified: trunk/activitycalendarfrontend/templates/base/activity_new_step_1.php
===================================================================
--- trunk/activitycalendarfrontend/templates/base/activity_new_step_1.php
2012-07-09 18:27:02 UTC (rev 9755)
+++ trunk/activitycalendarfrontend/templates/base/activity_new_step_1.php
2012-07-11 09:01:40 UTC (rev 9756)
@@ -1,12 +1,134 @@
<?php ?>
<script type="text/javascript">
+ function toggle() {
+ var ele = document.getElementById("toggleText");
+ var text = document.getElementById("displayText");
+ if(ele.style.display == "block") {
+ ele.style.display = "none";
+ text.innerHTML = "Registrer nytt lokale";
+ }
+ else {
+ ele.style.display = "block";
+ text.innerHTML = "(X)";
+ }
+ }
+ function toggle2() {
+ var ele = document.getElementById("toggleText2");
+ var text = document.getElementById("displayText2");
+ if(ele.style.display == "block") {
+ ele.style.display = "none";
+ text.innerHTML = "Legg til alternativ kontaktperson";
+ }
+ else {
+ ele.style.display = "block";
+ text.innerHTML = "(X)";
+ }
+ }
+ function toggle3() {
+ var ele = document.getElementById("toggleText3");
+ var org_id = document.getElementById("organization_id_hidden");
+ var text = document.getElementById("displayText3");
+ if(ele.style.display == "block") {
+ ele.style.display = "none";
+ text.innerHTML = "Registrer ny organisasjon";
+ }
+ else {
+ ele.style.display = "block";
+ text.innerHTML = "";
+ org_id.value = "new_org";
+ }
+ }
+function showhide(id)
+{
+ if(id == "org")
+ {
+ document.getElementById('orgf').style.display = "block";
+ document.getElementById('no_orgf').style.display = "none";
+ }
+ else
+ {
+ document.getElementById('orgf').style.display = "none";
+ document.getElementById('no_orgf').style.display = "block";
+ }
+}
+
+function get_address_search()
+{
+ var address = document.getElementById('address').value;
+ var div_address = document.getElementById('address_container');
+ div_address.style.display="block";
+
+ //url =
"/aktivby/registreringsskjema/ny/index.php?menuaction=activitycalendarfrontend.uiactivity.get_address_search&phpgw_return_as=json&search="
+ address;
+ url = "<?php echo
$ajaxURL?>index.php?menuaction=activitycalendarfrontend.uiactivity.get_address_search&phpgw_return_as=json&search="
+ address;
+
+var divcontent_start = "<select name=\"address_select\" id=\"address_select\"
size=\"5\" onChange='setAddressValue(this)'>";
+var divcontent_end = "</select>";
+
+ var callback = {
+ success: function(response){
+ div_address.innerHTML =
divcontent_start + JSON.parse(response.responseText) + divcontent_end;
+ },
+ failure: function(o) {
+ alert("AJAX doesn't work"); //FAILURE
+ }
+ }
+ var trans = YAHOO.util.Connect.asyncRequest('GET', url, callback, null);
+
+}
+
+function setAddressValue(field)
+{
+ var address = document.getElementById('address');
+ var div_address = document.getElementById('address_container');
+
+ address.value=field.value;
+ div_address.style.display="none";
+}
+
+
function isOK()
{
- if(document.getElementById('organization_id').value == null ||
document.getElementById('organization_id').value == '')
+ if(document.getElementById('organization_id_hidden').value == null ||
document.getElementById('organization_id_hidden').value == ''){
+ if(document.getElementById('organization_id').value == null ||
document.getElementById('organization_id').value == '')
+ {
+ alert("Du må velge om aktiviteten skal knyttes mot en
eksisterende\norganisasjon, eller om det skal registreres en ny organisasjon!");
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+ if(document.getElementById('orgname').value == null ||
document.getElementById('orgname').value == '')
{
- alert("Du må velge om aktiviteten skal knyttes mot en
eksisterende\norganisasjon, eller om det skal registreres en ny organisasjon!");
+ alert("Organisasjonsnavn må fylles ut!");
return false;
}
+ if(document.getElementById('org_contact1_name').value == null ||
document.getElementById('org_contact1_name').value == '')
+ {
+ alert("Navn på kontaktperson må fylles ut!");
+ return false;
+ }
+ if(document.getElementById('org_contact1_phone').value == null ||
document.getElementById('org_contact1_phone').value == '')
+ {
+ alert("Telefonnummer til kontaktperson må fylles ut!");
+ return false;
+ }
+ if(document.getElementById('org_contact1_mail').value == null ||
document.getElementById('org_contact1_mail').value == '')
+ {
+ alert("E-post for kontaktperson må fylles ut!");
+ return false;
+ }
+ if(document.getElementById('org_contact2_mail').value == null ||
document.getElementById('org_contact2_mail').value == '')
+ {
+ alert("Begge felter for E-post må fylles ut!");
+ return false;
+ }
+ if(document.getElementById('org_contact1_mail').value !=
document.getElementById('org_contact2_mail').value)
+ {
+ alert("E-post må være den samme i begge felt!");
+ return false;
+ }
else
{
return true;
@@ -15,29 +137,91 @@
</script>
<div class="yui-content" style="width: 100%;">
- <h1><?php echo lang('new_activity') ?></h1>
- <form action="#" method="post">
- <dl class="proplist-col" style="width: 200%">
- <dt>
- <?php echo
lang('org_helptext_step1')?><br/><br/>
- </dt>
- <dd>
- <select name="organization_id"
id="organization_id">
- <option value="">Ingen organisasjon
valgt</option>
- <option value="new_org">Ny
organisasjon</option>
- <?php
- foreach($organizations as $organization)
- {
- echo "<option
value=\"{$organization->get_id()}\">".$organization->get_name()."</option>";
- }
- ?>
- </select>
+ <div class="pageTop">
+ <h1><?php echo lang('new_activity_helptext') ?></h1>
+ <form action="#" method="post">
+ <input type="hidden" name="organization_id_hidden"
id="organization_id_hidden" value="" />
+ <dl class="proplist-col">
+ <fieldset>
+ <legend><?php echo lang('responsible')
?></legend>
+
+ <dt>
+ <label for="organization_id">
+ <?php echo lang('choose_org')?>
+ </label>
+ <a
onclick="window.open('hjelp.html','name','height=255,
width=350,toolbar=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no'); return false;"
href="http://dl-web.dropbox.com/u/44022695/Aktivitetsoversikt/hjelp.html"
target="name"><img alt="Hjelp" src="/aktivitetsoversikt/images/hjelp.gif"></a>
+ </dt>
+ <dd>
+ <select name="organization_id"
id="organization_id">
+ <option value="">Ingen organisasjon
valgt</option>
+ <?php
+ foreach($organizations as $organization)
+ {
+ echo "<option
value=\"{$organization->get_id()}\">".$organization->get_name()."</option>";
+ }
+ ?>
+ </select>
+ <br/>
+ </dd>
+ <a id="displayText3" href="javascript:toggle3();">Ikke
i listen? Registrer ny organisasjon</a><br/>
+ <DIV style="overflow: auto; display: none;"
id="toggleText3">
+ <DIV style="overflow: auto;">
+ <P>Registrer ny organisasjon <A
onclick="window.open('hjelp.html','name','height=255,
width=350,toolbar=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no'); return false;"
+
href="http://dl-web.dropbox.com/u/44022695/Aktivitetsoversikt/hjelp.html"
+ target="name"><IMG
alt="Hjelp" src="/aktivitetsoversikt/images/hjelp.gif"></A>
+ </P>
+ Felt merket med (*) er påkrevde
felt <BR/><BR/>
+ <P></P>
+
+ <dt><label
for="orgname">Organisasjonsnavn (*)</label>
+ <A
onclick="window.open('hjelp.html','name','height=255,
width=350,toolbar=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no'); return false;"
+
href="http://dl-web.dropbox.com/u/44022695/Aktivitetsoversikt/hjelp.html"
+ target="name"><IMG
alt="Hjelp" src="/aktivitetsoversikt/images/hjelp.gif"></A>
+ </dt>
+ <dd><input type="text"
name="orgname" id="orgname" size="80"/></dd>
+ <dt><label
for="orgno">Organisasjonsnummer</label></dt>
+ <dd><input type="text"
name="orgno"/></dd>
+ <DT style="margin-right: 20px;
float: left;"><label for="street">Gateadresse</label>
+ <A
onclick="window.open('hjelp.html','name','height=255,
width=350,toolbar=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no'); return false;"
+
href="http://dl-web.dropbox.com/u/44022695/Aktivitetsoversikt/hjelp.html"
+
target="name"><IMG alt="Hjelp"
src="/aktivitetsoversikt/images/hjelp.gif"></A><BR/>
+ <INPUT id="address"
onkeyup="javascript:get_address_search()" name="address" size="50"
type="text"><BR/>
+ <DIV
id="address_container"></DIV>
+ </DT>
+ <DT style="clear: right; float:
left;"><LABEL for="number">Husnummer</LABEL><BR/>
+ <INPUT name="number"
size="5" type="text">
+ </DT><BR/>
+ <DT style="clear: left;
margin-right: 20px; float: left;"><LABEL for="postzip">Postnummer</LABEL><BR/>
+ <INPUT name="postzip"
size="5" type="text">
+ </DT>
+ <DT style="float: left;"><LABEL
for="postaddress">Poststed</LABEL><BR/>
+ <INPUT name="postaddress" size="40" type="text">
+ </DT><BR><BR>
+ </DIV>
+ <DT><LABEL for="homepage">Hjemmeside <A
onclick="window.open('hjelp.html','name','height=255,
width=350,toolbar=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no'); return false;"
href="http://dl-web.dropbox.com/u/44022695/Aktivitetsoversikt/hjelp.html"
target="name">
+ <IMG alt="Hjelp"
src="/aktivitetsoversikt/images/hjelp.gif"></A></LABEL>
+ </DT>
+ <DD><INPUT name="homepage" value="http://" size="80"
type="text"></DD><BR/><BR/>
+ <DIV style="overflow: auto;">
+ Kontaktperson for organisasjonen <A
onclick="window.open('hjelp.html','name','height=255,
width=350,toolbar=no,directories=no,status=no,
menubar=no,scrollbars=no,resizable=no'); return false;"
href="http://dl-web.dropbox.com/u/44022695/Aktivitetsoversikt/hjelp.html"
target="name">
+ <IMG alt="Hjelp"
src="/aktivitetsoversikt/images/hjelp.gif"></A><BR/>
+ <DT><LABEL for="contact1_name">Navn (*)</LABEL></DT>
+ <DD><INPUT name="org_contact1_name"
id="org_contact1_name" size="80" type="text"></DD>
+ <DT><LABEL for="contact1_phone">Telefon
(*)</LABEL></DT>
+ <DD><INPUT name="org_contact1_phone"
id="org_contact1_phone" type="text"></DD>
+ <DT><LABEL for="contact1_mail">E-post (*)</LABEL></DT>
+ <DD><INPUT name="org_contact1_mail"
id="org_contact1_mail" size="50" type="text"></DD>
+ <DT><LABEL for="contact2_mail">Gjenta e-post
(*)</LABEL></DT>
+ <DD><INPUT name="org_contact2_mail"
id="org_contact2_mail" size="50" type="text"></DD>
+ </DIV>
+ </DIV>
+ </fieldset>
<br/><br/>
- </dd>
- <div class="form-buttons">
- <input type="submit" name="step_1" value="<?php
echo lang('next') ?>" onclick="return isOK();"/>
- </div>
- </dl>
-
- </form>
+ <div class="form-buttons">
+ <input type="submit" name="step_1" value="<?php
echo lang('next') ?>" onclick="return isOK();"/>
+ </div>
+ </dl>
+
+ </form>
+ </div>
</div>
\ No newline at end of file
Modified: trunk/phpgwapi/templates/activitycalendar/css/frontend.css
===================================================================
--- trunk/phpgwapi/templates/activitycalendar/css/frontend.css 2012-07-09
18:27:02 UTC (rev 9755)
+++ trunk/phpgwapi/templates/activitycalendar/css/frontend.css 2012-07-11
09:01:40 UTC (rev 9756)
@@ -1,634 +1,537 @@
+html {
+ background: white; font: small/normal verdana, sans-serif; margin: 0px;
height: 100% !important; text-align: left; font-size-adjust: none;
font-stretch: normal;
+}
body {
- font: normal small verdana,sans-serif;
- margin: 0;
- text-align: left;
- background: white;
+ background: white; font: small/normal verdana, sans-serif; margin: 0px;
height: 100% !important; text-align: left; font-size-adjust: none;
font-stretch: normal;
}
-button { padding: .3em .6em; margin: .4em 0;}
-a:link, a:visited { color: black;}
-div#wrapper {}
+button {
+ margin: 0.4em 0px; padding: 0.3em 0.6em;
+}
+a:link {
+ color: black;
+}
+a:visited {
+ color: black;
+}
+div#wrapper {
+
+}
ul#metanav {
- float: right;
- list-style-type: none;
- padding-top: 10px;
+ padding-top: 10px; float: right; list-style-type: none;
}
-ul#metanav a, ul#sidebar a { color: #700; }
+ul#metanav a {
+ color: rgb(119, 0, 0);
+}
+ul#sidebar a {
+ color: rgb(119, 0, 0);
+}
div#content {
- margin: 0 2em;
- min-height: 500px;
+ margin: 0px 2em; min-height: 500px;
}
-#header-search {
- float: right;
- margin: -1.5em 1em 1em 1em;
+#header-search {
+ margin: -1.5em 1em 1em; float: right;
}
-#header-search.hidden { display: none; }
-#header-search .query { width: 15em;}
-
+.hidden#header-search {
+ display: none;
+}
+#header-search .query {
+ width: 15em;
+}
div#header {
- background: url(../images/header_bg.png) repeat-x;
- height: 129px;
+ background: url("../images/header_bg.png") repeat-x; height: 129px;
}
div#header a {
float: left;
}
div#logo {
- width: 125px;
- height: 114px;
- margin-left: 10px;
+ width: 125px; height: 114px; margin-left: 10px;
}
div#centerimage {
-/* background: url(../images/header_fg.png) no-repeat;
- background-position: bottom center;*/
- margin: 0 auto;
- padding-top: 4px;
- height: 109px;
- overflow: hidden;
+ margin: 0px auto; height: 109px; overflow: hidden; padding-top: 4px;
}
div#footer {
- border-top: 1px solid #aaa;
- padding-top: .3em;
- color: #666;
- font-size: 90%;
+ color: rgb(102, 102, 102); padding-top: 0.3em; font-size: 90%;
border-top-color: rgb(170, 170, 170); border-top-width: 1px; border-top-style:
solid;
}
-ul.nav {
- list-style-type: 0;
- padding-left: 0;
+ul.nav {
+ padding-left: 0px;
}
-div.clr {clear: both;}
-ul.nav a { color: inherit; }
-ul.nav li { display: inline;}
-ul.nav li:before { content: '⇒ '; font-size: 90%; color: #444;}
-ul.nav li:first-child:before { display: none; }
+div.clr {
+ clear: both;
+}
+ul.nav a {
+ color: inherit;
+}
+ul.nav li {
+ display: inline;
+}
+ul.nav li::before {
+ color: rgb(68, 68, 68); font-size: 90%; content: "⇒ ";
+}
+ul.nav li:first-child::before {
+ display: none;
+}
#login-bar {
- clear: right;
- float: right;
- padding: .5em 1em 0 0;
+ padding: 0.5em 1em 0px 0px; clear: right; float: right;
}
form#search {
- text-align: center;
- padding-top: 5em;
+ text-align: center; padding-top: 5em;
}
input#search {
- font-size: 120%;
- color: #666;
- width: 20em;
+ width: 20em; color: rgb(102, 102, 102); font-size: 120%;
}
div.hint {
- margin-top: 0.4em;
- font-size: 90%;
- color: #444;
+ color: rgb(68, 68, 68); font-size: 90%; margin-top: 0.4em;
}
-div.hint i { color: #383;}
-
+div.hint i {
+ color: rgb(51, 136, 51);
+}
ol#result {
- padding-left: 0;
+ padding-left: 0px;
}
-ol#result dl { margin: 0; }
-
+ol#result dl {
+ margin: 0px;
+}
ol#result .header {
- font-size: 120%;
- background-color: #eee;
- border-top: 1px solid #ccc;
- border-bottom: 1px solid #ccc;
- padding: .1em 0em .25em .2em;
- margin-top: .5em;
+ padding: 0.1em 0em 0.25em 0.2em; font-size: 120%; margin-top: 0.5em;
border-top-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204);
border-top-width: 1px; border-bottom-width: 1px; border-top-style: solid;
border-bottom-style: solid; background-color: rgb(238, 238, 238);
}
ol#result .details {
+
}
ol#result .details h4 {
- margin: 0.2em 0 0 0;
- font-weight: normal;
- font-style: italic;
- color: #888;
+ margin: 0.2em 0px 0px; color: rgb(136, 136, 136); font-style: italic;
font-weight: normal;
}
ol#result .details .col {
- padding: 0em 0.2em 0.4em 0.2em;
- /*float: left;*/
- width: 50%;
- /*border: 1px solid #eee;*/
+ padding: 0em 0.2em 0.4em; width: 50%;
}
ol#result .details .moreInfo {
- margin-top: .4em;
+ margin-top: 0.4em;
}
-
ol#result li:last-child {
- border-bottom: 1px solid #ccc;
+ border-bottom-color: rgb(204, 204, 204); border-bottom-width: 1px;
border-bottom-style: solid;
}
-
-dl.form {}
-
+dl.form {
+
+}
dl.form dt {
- font-style: italic;
- font-weight: bolder;
- margin: .5em 0 .1em 0;
- color: #002;
+ margin: 0.5em 0px 0.1em; color: rgb(0, 0, 34); font-style: italic;
font-weight: bolder;
}
-
-dl.form dt label { font-size: 90%; color: #733; font-style: italic;}
+dl.form dt label {
+ color: rgb(119, 51, 51); font-size: 90%; font-style: italic;
+}
dl.form dd {
- float: left;
- margin: 0 0 0 .4em;
+ margin: 0px 0px 0px 0.4em; float: left;
}
table.fancyTable {
- border-spacing: 0;
- border: 1px solid #ccc;
+ border: 1px solid rgb(204, 204, 204); border-spacing: 0;
}
table.fancyTable thead th {
- font-weight: normal;
- border-bottom: 1px solid #777;
- padding: .1em .3em;
- font-size: 85%;
- font-style: italic;
- color: #744;
+ padding: 0.1em 0.3em; color: rgb(119, 68, 68); font-size: 85%;
font-style: italic; font-weight: normal; border-bottom-color: rgb(119, 119,
119); border-bottom-width: 1px; border-bottom-style: solid;
}
table.fancyTable tbody td {
- padding: .2em .7em;
- border-bottom: 1px solid white;
+ padding: 0.2em 0.7em; border-bottom-color: white; border-bottom-width:
1px; border-bottom-style: solid;
}
table.fancyTable tbody tr:hover td {
- background: #ffe;
- border-bottom-color: #cca;
+ background: rgb(255, 255, 238); border-bottom-color: rgb(204, 204, 170);
}
-table.fancyTable tbody td.godkand { color: #474; }
-table.fancyTable tbody td.avslag { color: #744; }
-table.fancyTable tbody td.inskickad { color: #447; }
-table.fancyTable tbody td.ny { color: #447; }
-table.fancyTable tbody td a{ color: inherit; text-decoration: inherit;}
-
+table.fancyTable tbody td.godkand {
+ color: rgb(68, 119, 68);
+}
+table.fancyTable tbody td.avslag {
+ color: rgb(119, 68, 68);
+}
+table.fancyTable tbody td.inskickad {
+ color: rgb(68, 68, 119);
+}
+table.fancyTable tbody td.ny {
+ color: rgb(68, 68, 119);
+}
+table.fancyTable tbody td a {
+ color: inherit; text-decoration: inherit;
+}
div#help {
- width: 15em;
- float: right;
- background: #3287d8;
- border: 1px solid #66a;
- border-radius: .6em;
- -moz-border-radius: .6em;
- -webkit-border-radius: .6em;
- color: white;
+ background: rgb(50, 135, 216); border-radius: 0.6em; border: 1px solid
rgb(102, 102, 170); width: 15em; color: white; float: right;
-moz-border-radius: .6em; -webkit-border-radius: .6em;
}
-div#help dl { margin: .2em .8em; min-height: 10em;}
-div#help dl dd { font-style: italic;}
-div#help h2 {
- margin: 0;
- font-size: 80%;
- padding: .1em .5em;
- font-weight: normal;
- border-bottom: 1px solid #67b1ff;
+div#help dl {
+ margin: 0.2em 0.8em; min-height: 10em;
}
-#weekView tr.time td { border-top: 1px solid #aaa;}
-#weekView tr td:first-child { background: #ddd;}
-
-
+div#help dl dd {
+ font-style: italic;
+}
+div#help h2 {
+ margin: 0px; padding: 0.1em 0.5em; font-size: 80%; font-weight: normal;
border-bottom-color: rgb(103, 177, 255); border-bottom-width: 1px;
border-bottom-style: solid;
+}
+#weekView tr.time td {
+ border-top-color: rgb(170, 170, 170); border-top-width: 1px;
border-top-style: solid;
+}
+#weekView tr td:first-child {
+ background: rgb(221, 221, 221);
+}
#cloud {
- text-align: center;
- list-style-type: none;
- padding-left: 0;
- color: #888;
- margin: 3em 0;
- font-size: 120%;
+ margin: 3em 0px; text-align: center; color: rgb(136, 136, 136);
padding-left: 0px; font-size: 120%; list-style-type: none;
}
-#cloud div { padding: .2em};
-#cloud strong { padding: .2em};
-
-#cloud li { display: inline; white-space: nowrap; padding: 0 .2em;}
-#cloud li.small { font-size: 100%;}
-#cloud li.medium { font-size: 130%;}
-#cloud li.large { font-size: 200%; color: #777;}
-#cloud li.xlarge { font-size: 240%; color: #555;}
-#cloud li:hover { text-decoration: underline; cursor: pointer; }
-
-dl.tooltip { width: 300px;}
-
+#cloud div {
+ padding: 0.2em;
+}
+#cloud li.small {
+ font-size: 100%;
+}
+#cloud li.medium {
+ font-size: 130%;
+}
+#cloud li.large {
+ color: rgb(119, 119, 119); font-size: 200%;
+}
+#cloud li.xlarge {
+ color: rgb(85, 85, 85); font-size: 240%;
+}
+#cloud li:hover {
+ text-decoration: underline; cursor: pointer;
+}
+dl.tooltip {
+ width: 300px;
+}
dl.tooltip dt {
- float: left;
- clear: left;
- width: 7em;
- font-style: italic;
+ width: 7em; clear: left; font-style: italic; float: left;
}
-
dl.tooltip dd {
- float: left;
+ float: left;
}
-
-div.info:hover {
- background-image: url(../images/info.png);
- background-repeat: no-repeat;
- background-position: 100% 0%;
+div.info:hover {
+ background-position: 100% 0%; background-image:
url("../images/info.png"); background-repeat: no-repeat;
}
-
-dl.contactinfo {}
+dl.contactinfo {
+
+}
dl.contactinfo dt {
- margin-left: 1em;
+ margin-left: 1em;
}
dl.contactinfo dd {
- margin-left: 2em;
+ margin-left: 2em;
}
-
-/*#frontend {
- width: 900px;
-}*/
-
#frontend dl.proplist-col {
width: 300px;
}
-
-#frontend dl.proplist-col.main {
+#frontend dl.main.proplist-col {
width: 400px;
}
-
-#frontend dl.proplist-col.images {
- float:right;
- clear:right;
+#frontend dl.images.proplist-col {
+ clear: right; float: right;
}
-
-
-
-#frontend h2 { margin-bottom: 0.1em;}
-#frontend dl.proplist.images dd img { width: 300px; border:1px solid #777;
padding: 1px;}
-#frontend dl.proplist.images dl { margin-bottom: 1.5em; }
-
-#frontend #result dl.proplist.images dt { display: none;}
-#frontend #result dl.proplist.images dd { display: inline; padding-right: 1em;}
-#frontend #result dl.proplist.images dd img { width: auto; height: 120px;
border:1px solid black;}
-
-
+#frontend h2 {
+ margin-bottom: 0.1em;
+}
+#frontend dl.images.proplist dd img {
+ padding: 1px; border: 1px solid rgb(119, 119, 119); width: 300px;
+}
+#frontend dl.images.proplist dl {
+ margin-bottom: 1.5em;
+}
+#frontend #result dl.images.proplist dt {
+ display: none;
+}
+#frontend #result dl.images.proplist dd {
+ padding-right: 1em; display: inline;
+}
+#frontend #result dl.images.proplist dd img {
+ border: 1px solid black; width: auto; height: 120px;
+}
#agegroup {
- background: #eee;
- white-space: nowrap;
+ background: rgb(238, 238, 238); white-space: nowrap;
}
-#agegroup, #agegroup td, #agegroup th { width: 1%; }
-#agegroup td, #agegroup th { padding: .1em .3em;}
-#agegroup td input { width: 3em; }
-
-#overlay-info { padding: 1em; }
-#overlay-info h3 { margin: 0 0 .9em 0; }
-#overlay-info dt { font-style: italic; font-weight: bolder; font-size: 90%;}
-#overlay-info dd { padding-left: 2em; }
-#overlay-info .close { float: right; }
-#overlay-info .actions { margin-top: 1em;}
-
+#agegroup {
+ width: 1%;
+}
+#agegroup td {
+ width: 1%;
+}
+#agegroup th {
+ width: 1%;
+}
+#agegroup td {
+ padding: 0.1em 0.3em;
+}
+#agegroup th {
+ padding: 0.1em 0.3em;
+}
+#agegroup td input {
+ width: 3em;
+}
+#overlay-info {
+ padding: 1em;
+}
+#overlay-info h3 {
+ margin: 0px 0px 0.9em;
+}
+#overlay-info dt {
+ font-size: 90%; font-style: italic; font-weight: bolder;
+}
+#overlay-info dd {
+ padding-left: 2em;
+}
+#overlay-info .close {
+ float: right;
+}
+#overlay-info .actions {
+ margin-top: 1em;
+}
.yui-calendar td.calcell {
- border:0px !important;
+ border: 0px currentColor !important;
}
-.yui-skin-sam .yui-dt TABLE TH{
- border: none !important;
+.yui-skin-sam .yui-dt table th {
+ border: currentColor !important;
}
-.yui-skin-sam .yui-dt TABLE TD{
- border: none !important;
+.yui-skin-sam .yui-dt table td {
+ border: currentColor !important;
}
-
-/* CSS for newlayout */
-body{
-color: #575757;
-margin:0;
-padding:0;
-width:100%;
-height:100%;
-background: #fff url('../images/newlayout/bodyBg.gif') repeat-x;text-align:
center;width:100%;
+body {
+ background: url("../images/newlayout/bodyBg.gif") repeat-x rgb(255,
255, 255); margin: 0px; padding: 0px; width: 100%; height: 100%; text-align:
center; color: rgb(87, 87, 87);
}
-
-#wrapper{
-background-color: #fff;
-width: 1000px;
-textalign: left;
-margin: 0 auto;
-overflow: hidden;
-padding: 0 0px 40px;
+#wrapper {
+ margin: 0px auto; padding: 0px 0px 40px; width: 1000px; overflow:
hidden; background-color: rgb(255, 255, 255); textalign: left;
}
-
-#header{
-overflow: hidden;
-line-height: 1;
-width: 1000px;
-background-image: none !important;
-height: 130px !important;
+#header {
+ width: 1000px; height: 130px !important; line-height: 1; overflow:
hidden; background-image: none !important;
}
-
-#login-bar{
-margin-top:10px;
+#login-bar {
+ margin-top: 10px;
}
-
-#login-bar a{
-border-right: 1px solid #575757;
-padding: 0 0.5em;
-line-height: 1.2em;
+#login-bar a {
+ padding: 0px 0.5em; line-height: 1.2em; border-right-color: rgb(87, 87,
87); border-right-width: 1px; border-right-style: solid;
}
-
-#logo{
-background: url(../images/newlayout/logo.png) no-repeat;
-float: left;
-height: 75px;
-width: 102px;
-margin: 14px 0 0 49px !important;
+#logo {
+ background: url("../images/newlayout/logo.png") no-repeat; margin: 14px
0px 0px 49px !important; width: 102px; height: 75px; float: left;
}
-
-#centerimage{
-display: block !important;
-margin-right: 5px !important;
-width: 172px !important;
-height: 108px !important;
-/*background: url(../images/newlayout/aktivby_logo.jpg) no-repeat !important;*/
-/*background-position: bottom center !important;*/
-padding: 22px 0px 0px 100px !important;
+#centerimage {
+ padding: 22px 0px 0px 100px !important; width: 172px !important;
height: 108px !important; margin-right: 5px !important; display: block
!important;
}
-
-#header-search{
-margin: -3em 1em 1em 1em;
+#header-search {
+ margin: -3em 1em 1em;
}
-
-#frontend{
-/*background-image: url(../images/newlayout/pageContainerBg.gif);*/
-/*background-repeat: repeat-x;*/
+#frontend {
+
}
-
-#line{
-border-top: 5px solid #B11F24;
-clear: left;
-height: 30px;
-width: 960px;
-margin-left: 20px;
+#line {
+ width: 960px; height: 30px; clear: left; margin-left: 20px;
border-top-color: rgb(2, 118, 58); border-top-width: 5px; border-top-style:
solid;
}
- #content{
-text-align:left;
+#content {
+ text-align: left;
}
-
-#cloud{
-text-align:left;
-margin-left: 280px;
+#cloud {
+ text-align: left; margin-left: 280px;
}
-
-#footer{
-border: none !important;
-background:url('../images/newlayout/footerFjell_inkl_bunnlinje.gif') no-repeat
scroll center top transparent;
-clear:both;
-overflow:auto;
-height:160px;
+#footer {
+ background: url("../images/newlayout/footerFjell_inkl_bunnlinje.gif")
no-repeat top; border: currentColor !important; height: 160px; overflow: auto;
clear: both;
}
-
-#footer_address{
-padding-top: 1.5em;
+#footer_address {
+ padding-top: 1.5em;
}
-
-
-dl.proplist,
+dl.proplist {
+ margin: 1em 0px; padding-left: 2em;
+}
dl.proplist-col {
- margin: 1em 0;
- padding-left: 2em;
+ margin: 1em 0px; padding-left: 2em;
}
-dl.proplist dt,
-dl.proplist-col dt {
- font-style: italic;
- font-weight: bolder;
- font-size: 90%;
- margin: .8em 0 .1em 0;
+dl.proplist dt {
+ margin: 0.8em 0px 0.1em; font-size: 90%; font-style: italic;
font-weight: bolder;
}
-
-dl.proplist-col,
+dl.proplist-col dt {
+ margin: 0.8em 0px 0.1em; font-size: 90%; font-style: italic;
font-weight: bolder;
+}
+dl.proplist-col {
+ width: 18em; text-align: left; float: left;
+}
dl.form-col {
- width: 18em;
- float: left;
- text-align: left;
+ width: 18em; text-align: left; float: left;
}
-
#frontend dl.proplist-col {
- width: 600px; !important
+ width: 600px;
}
-
table#header {
margin: 2em;
-
- }
-
+}
div#unit_selector {
}
-
div#all_units_key_data {
padding-left: 2em;
- }
-
+}
div#unit_image {
margin-left: 2em;
- }
-
+}
div#unit_image img {
- height:170px;
+ height: 170px;
}
-
div.yui-navset {
- padding-left: 2em;
- padding-right: 2em;
- }
-
+ padding-right: 2em; padding-left: 2em;
+}
div#contract_selector {
- padding-left: 1em;
- padding-top: 1em;
- }
-
+ padding-top: 1em; padding-left: 1em;
+}
img.list_image {
- margin-right: 5px;
- float:left;
- }
-
+ margin-right: 5px; float: left;
+}
a.list_image {
- float:left;
- display:inline;
- }
-
+ float: left; display: inline;
+}
ol.list_image {
float: left;
- }
-
+}
ol.list_image li {
padding: 1px;
}
-
-dl#key_data {
+dl#key_data {
padding: 2px;
- }
-
-
+}
dl#key_data dd {
padding-bottom: 1em;
}
-
table#key_data td {
- padding-right: 1em;
padding: 5px;
- }
-
-
+}
.user_menu {
- list-style:none;
- height: 100%;
- padding: 2px;
- border-style: none none none solid;
- border-width: 1px;
- border-color: grey;
- padding-left: 5px;
+ border-width: 1px; border-style: none none none solid; border-color:
grey; list-style: none; padding: 2px 2px 2px 5px; height: 100%;
}
-
.user_menu li {
margin: 13px;
- }
-
+}
#area_and_price {
- list-style:none;
- height: 100%;
- padding: 2px;
- padding-left: 5px;
- float:right;
- padding:0.5em 1em 0 0;
+ list-style: none; padding: 0.5em 1em 0px 0px; height: 100%; float:
right;
}
-
#area_and_price li {
margin: 13px;
- }
-
+}
#org_units {
- list-style: none;
- height: 100%;
- padding: 2px;
- padding-left: 5px;
- float:right;
- padding:0.5em 1em 0 0;
+ list-style: none; padding: 0.5em 1em 0px 0px; height: 100%; float:
right;
}
-
#org_units li {
margin: 13px;
- }
-
+}
#information {
- list-style:none;
- height: 100%;
- padding: 2px;
- padding-left: 5px;
- float:right;
- padding:0.5em 1em 0 0;
+ list-style: none; padding: 0.5em 1em 0px 0px; height: 100%; float:
right;
}
-
#information li {
margin: 13px;
- }
-
+}
a.header_link {
- text-decoration: none;
- float: none;
- }
-
+ text-decoration: none; float: none;
+}
#logo_holder {
- border: 0 none;
- font-family:Arial,sans-serif;
-font-size:65%;
-line-height:1.166;
-position: absolute;
-padding:2em;
+ padding: 2em; border: 0px currentColor; line-height: 1.166;
font-family: Arial,sans-serif; font-size: 65%; position: absolute;
}
-
em#bold {
font-weight: bold;
- }
-
+}
div#header a {
float: none;
}
-
-.yui-skin-sam .yui-navset .yui-nav, .yui-skin-sam .yui-navset .yui-navset-top
.yui-nav {
- border-color: #BF0005;
- border-width:0 0 2px;
- }
-
+.yui-skin-sam .yui-navset .yui-nav {
+ border-width: 0px 0px 2px; border-color: rgb(191, 0, 5);
+}
+.yui-skin-sam .yui-navset .yui-navset-top .yui-nav {
+ border-width: 0px 0px 2px; border-color: rgb(191, 0, 5);
+}
.yui-skin-sam .yui-navset .yui-content {
- background: none repeat scroll 0 0 #F4F2ED;
+ background: 0px 0px rgb(244, 242, 237);
}
-
-.yui-skin-sam .yui-navset .yui-nav .selected a, .yui-skin-sam .yui-navset
.yui-nav .selected a:focus, .yui-skin-sam .yui-navset .yui-nav .selected
a:hover {
-/* background:url("../../../../assets/skins/sam/sprite.png") repeat-x
scroll left -1400px #2647A0;*/
- }
+.yui-skin-sam .yui-navset .yui-nav .selected a {
+}
+.yui-skin-sam .yui-navset .yui-nav .selected a:focus {
+
+}
+.yui-skin-sam .yui-navset .yui-nav .selected a:hover {
+
+}
div.tickets {
margin-top: 1em;
- }
-
+}
em.select_header {
- font-size: larger;
- padding-top: 10px;
- }
-
+ padding-top: 10px; font-size: larger;
+}
#contract_price_and_area {
- float: left;
- margin: 1em 2em 0 0;
+ margin: 1em 2em 0px 0px; float: left;
}
-
#contract_price_and_area li {
- margin-bottom: 1em;
- }
-
+ margin-bottom: 1em;
+}
#contract_essentials {
- float: left;
- margin: 1em 2em 0 2em;
- }
-
+ margin: 1em 2em 0px; float: left;
+}
#composites {
- float: left;
- margin: 1em 2em 0 2em;
- }
-
-
+ margin: 1em 2em 0px; float: left;
+}
#comment {
- float: left;
- margin: 1em 2em 0 2em;
- }
-
- #contract_essentials li {
- margin-bottom: 1em;
- }
-
+ margin: 1em 2em 0px; float: left;
+}
+#contract_essentials li {
+ margin-bottom: 1em;
+}
#contract_parts {
- float: left;
- margin: 1em 2em 0 2em;
- }
-
+ margin: 1em 2em 0px; float: left;
+}
div.toolbar {
-background-color:#EEEEEE;
-border:1px solid #BBBBBB;
-float:left;
-width:100%;
+ border: 1px solid rgb(187, 187, 187); width: 100%; float: left;
background-color: rgb(238, 238, 238);
}
-
div.toolbar_manual {
-background-color:#EEEEEE;
-border:1px solid #BBBBBB;
-float:left;
-width:100%;
+ border: 1px solid rgb(187, 187, 187); width: 100%; float: left;
background-color: rgb(238, 238, 238);
}
-
.yui-pg-container {
white-space: normal;
- }
-
+}
li.ticket_detail {
- padding: 5px;
- margin-left: 5px;
- }
-
+ padding: 5px; margin-left: 5px;
+}
div.success {
- font-weight: normal;
- margin:10px;
- padding:5px;
- font-size:1.1em;
- text-align: left;
- background-color: green;
- border:1px solid #9F6000;
- color: white;
+ margin: 10px; padding: 5px; border: 1px solid rgb(159, 96, 0);
text-align: left; color: white; font-size: 1.1em; font-weight: normal;
background-color: green;
}
-
div.error {
+ margin: 10px; padding: 5px; border: 1px solid rgb(159, 96, 0);
text-align: left; color: white; font-size: 1.1em; font-weight: normal;
background-color: red;
+}
+#line {
+ width: 960px; height: 30px; clear: left; margin-left: 20px;
border-top-color: rgb(2, 118, 58); border-top-width: 5px; border-top-style:
solid;
+}
+h1 {
+ color: rgb(87, 87, 87); font-family: Georgia,"Times New
Roman",Times,serif; font-weight: normal; margin-bottom: 0.2em;
+}
+h2 {
+ color: rgb(87, 87, 87); font-family: Georgia,"Times New
Roman",Times,serif; font-size: 1.5em; font-weight: normal; margin-bottom: 0.2em;
+}
+input[type=checkbox] {
+ margin-right: 10px;
+}
+input[type=radio] {
+ margin-right: 10px;
+}
+.pageTop {
+ padding: 0em 0em 0em 2em; text-align: left;
+}
+dl.proplist dt {
+ font-size: 90%; font-style: normal; font-weight: normal;
+}
+dl.proplist-col dt {
+ font-size: 90%; font-style: normal; font-weight: normal;
+}
+dt {
+
+}
+dd {
+ padding-bottom: 0.4em;
+}
+label {
+ margin-bottom: 0.2em; display: inline-block;
+}
+fieldset {
+ margin-top: 2.5em; border-top-color: rgb(167, 127, 0);
border-top-width: 1px; border-top-style: dashed;
+}
+fieldset legend {
+ color: rgb(167, 127, 0); padding-right: 20px; font-family:
Georgia,"Times New Roman",Times,serif; font-size: 1.5em; font-weight: normal;
background-color: rgb(255, 255, 255);
+}
+a:link {
+ color: rgb(73, 102, 128);
+}
+a:visited {
+ color: rgb(73, 102, 128);
+}
+h3 {
font-weight: normal;
- margin:10px;
- padding:5px;
- font-size:1.1em;
- text-align: left;
- background-color: red;
- border:1px solid #9F6000;
- color: white;
-}
\ No newline at end of file
+}
Added: trunk/phpgwapi/templates/activitycalendar/css/reset-fonts-grids.css
===================================================================
--- trunk/phpgwapi/templates/activitycalendar/css/reset-fonts-grids.css
(rev 0)
+++ trunk/phpgwapi/templates/activitycalendar/css/reset-fonts-grids.css
2012-07-11 09:01:40 UTC (rev 9756)
@@ -0,0 +1,720 @@
+html {
+ background: rgb(255, 255, 255); color: rgb(0, 0, 0);
+}
+body {
+ margin: 0px; padding: 0px;
+}
+div {
+ margin: 0px; padding: 0px;
+}
+dl {
+ margin: 0px; padding: 0px;
+}
+dt {
+ margin: 0px; padding: 0px;
+}
+dd {
+ margin: 0px; padding: 0px;
+}
+ul {
+ margin: 0px; padding: 0px;
+}
+ol {
+ margin: 0px; padding: 0px;
+}
+li {
+ margin: 0px; padding: 0px;
+}
+h1 {
+ margin: 0px; padding: 0px;
+}
+h2 {
+ margin: 0px; padding: 0px;
+}
+h3 {
+ margin: 0px; padding: 0px;
+}
+h4 {
+ margin: 0px; padding: 0px;
+}
+h5 {
+ margin: 0px; padding: 0px;
+}
+h6 {
+ margin: 0px; padding: 0px;
+}
+pre {
+ margin: 0px; padding: 0px;
+}
+code {
+ margin: 0px; padding: 0px;
+}
+form {
+ margin: 0px; padding: 0px;
+}
+fieldset {
+ margin: 0px; padding: 0px;
+}
+legend {
+ margin: 0px; padding: 0px;
+}
+input {
+ margin: 0px; padding: 0px;
+}
+button {
+ margin: 0px; padding: 0px;
+}
+textarea {
+ margin: 0px; padding: 0px;
+}
+select {
+ margin: 0px; padding: 0px;
+}
+p {
+ margin: 0px; padding: 0px;
+}
+blockquote {
+ margin: 0px; padding: 0px;
+}
+th {
+ margin: 0px; padding: 0px;
+}
+td {
+ margin: 0px; padding: 0px;
+}
+table {
+ border-collapse: collapse; border-spacing: 0;
+}
+fieldset {
+ border: 0px currentColor;
+}
+img {
+ border: 0px currentColor;
+}
+address {
+ font: inherit; font-size-adjust: inherit; font-stretch: inherit;
+}
+button {
+ font: inherit; font-size-adjust: inherit; font-stretch: inherit;
+}
+caption {
+ font: inherit; font-size-adjust: inherit; font-stretch: inherit;
+}
+cite {
+ font: inherit; font-size-adjust: inherit; font-stretch: inherit;
+}
+code {
+ font: inherit; font-size-adjust: inherit; font-stretch: inherit;
+}
+dfn {
+ font: inherit; font-size-adjust: inherit; font-stretch: inherit;
+}
+em {
+ font: inherit; font-size-adjust: inherit; font-stretch: inherit;
+}
+input {
+ font: inherit; font-size-adjust: inherit; font-stretch: inherit;
+}
+optgroup {
+ font: inherit; font-size-adjust: inherit; font-stretch: inherit;
+}
+option {
+ font: inherit; font-size-adjust: inherit; font-stretch: inherit;
+}
+select {
+ font: inherit; font-size-adjust: inherit; font-stretch: inherit;
+}
+strong {
+ font: inherit; font-size-adjust: inherit; font-stretch: inherit;
+}
+textarea {
+ font: inherit; font-size-adjust: inherit; font-stretch: inherit;
+}
+th {
+ font: inherit; font-size-adjust: inherit; font-stretch: inherit;
+}
+var {
+ font: inherit; font-size-adjust: inherit; font-stretch: inherit;
+}
+del {
+ text-decoration: none;
+}
+ins {
+ text-decoration: none;
+}
+li {
+ list-style: none;
+}
+caption {
+ text-align: left;
+}
+th {
+ text-align: left;
+}
+h1 {
+ font-size: 100%; font-weight: normal;
+}
+h2 {
+ font-size: 100%; font-weight: normal;
+}
+h3 {
+ font-size: 100%; font-weight: normal;
+}
+h4 {
+ font-size: 100%; font-weight: normal;
+}
+h5 {
+ font-size: 100%; font-weight: normal;
+}
+h6 {
+ font-size: 100%; font-weight: normal;
+}
+q::before {
+ content: "";
+}
+q::after {
+ content: "";
+}
+abbr {
+ border: 0px currentColor; font-variant: normal;
+}
+acronym {
+ border: 0px currentColor; font-variant: normal;
+}
+sup {
+ vertical-align: baseline;
+}
+sub {
+ vertical-align: baseline;
+}
+legend {
+ color: rgb(0, 0, 0);
+}
+body {
+ font: 13px/1.231 arial, helvetica, clean, sans-serif; font-size-adjust:
none; font-stretch: normal;
+}
+select {
+ font: 99%/normal arial, helvetica, clean, sans-serif; font-size-adjust:
none; font-stretch: normal;
+}
+input {
+ font: 99%/normal arial, helvetica, clean, sans-serif; font-size-adjust:
none; font-stretch: normal;
+}
+textarea {
+ font: 99%/normal arial, helvetica, clean, sans-serif; font-size-adjust:
none; font-stretch: normal;
+}
+button {
+ font: 99%/normal arial, helvetica, clean, sans-serif; font-size-adjust:
none; font-stretch: normal;
+}
+table {
+ font-size: inherit;
+}
+pre {
+ line-height: 100%; font-family: monospace;
+}
+code {
+ line-height: 100%; font-family: monospace;
+}
+kbd {
+ line-height: 100%; font-family: monospace;
+}
+samp {
+ line-height: 100%; font-family: monospace;
+}
+tt {
+ line-height: 100%; font-family: monospace;
+}
+body {
+ text-align: center;
+}
+#doc {
+ margin: auto; width: 57.69em; text-align: left;
+}
+#doc2 {
+ margin: auto; width: 57.69em; text-align: left;
+}
+#doc3 {
+ margin: auto; width: 57.69em; text-align: left;
+}
+#doc4 {
+ margin: auto; width: 57.69em; text-align: left;
+}
+.yui-t1 {
+ margin: auto; width: 57.69em; text-align: left;
+}
+.yui-t2 {
+ margin: auto; width: 57.69em; text-align: left;
+}
+.yui-t3 {
+ margin: auto; width: 57.69em; text-align: left;
+}
+.yui-t4 {
+ margin: auto; width: 57.69em; text-align: left;
+}
+.yui-t5 {
+ margin: auto; width: 57.69em; text-align: left;
+}
+.yui-t6 {
+ margin: auto; width: 57.69em; text-align: left;
+}
+.yui-t7 {
+ margin: auto; width: 57.69em; text-align: left;
+}
+#doc2 {
+ width: 73.07em;
+}
@@ Diff output truncated at 153600 characters. @@
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [9756] fixes for activitycalendar,
Erik Holm-Larsen <=