fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7790]


From: Erik Holm-Larsen
Subject: [Fmsystem-commits] [7790]
Date: Tue, 04 Oct 2011 06:28:19 +0000

Revision: 7790
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7790
Author:   erikhl
Date:     2011-10-04 06:28:18 +0000 (Tue, 04 Oct 2011)
Log Message:
-----------


Modified Paths:
--------------
    trunk/activitycalendar/inc/class.soorganization.inc.php
    trunk/activitycalendar/inc/model/class.organization.inc.php
    trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php
    trunk/activitycalendarfrontend/setup/phpgw_no.lang
    trunk/activitycalendarfrontend/templates/base/activity.php

Modified: trunk/activitycalendar/inc/class.soorganization.inc.php
===================================================================
--- trunk/activitycalendar/inc/class.soorganization.inc.php     2011-10-04 
06:11:43 UTC (rev 7789)
+++ trunk/activitycalendar/inc/class.soorganization.inc.php     2011-10-04 
06:28:18 UTC (rev 7790)
@@ -138,6 +138,7 @@
                                $columns[] = 'org.description';
                                $columns[] = 'org.address';
                                $columns[] = 'org.district';
+                               $columns[] = 'org.change_type';
                                $columns[] = 'org.orgno AS organization_number';
                                
                                $cols = implode(',',$columns);
@@ -349,6 +350,7 @@
                        
$organization->set_homepage($this->unmarshal($this->db->f('homepage'), 
'string'));
                        
$organization->set_district($this->unmarshal($this->db->f('district'), 
'string'));
                        
$organization->set_description($this->unmarshal($this->db->f('description'), 
'string'));
+                       
$organization->set_change_type($this->unmarshal($this->db->f('change_type'), 
'string'));
                        
$organization->set_show_in_portal($this->unmarshal($this->db->f('show_in_portal'),
 'int'));
                }
                return $organization;

Modified: trunk/activitycalendar/inc/model/class.organization.inc.php
===================================================================
--- trunk/activitycalendar/inc/model/class.organization.inc.php 2011-10-04 
06:11:43 UTC (rev 7789)
+++ trunk/activitycalendar/inc/model/class.organization.inc.php 2011-10-04 
06:28:18 UTC (rev 7790)
@@ -119,7 +119,7 @@
                                'phone' =>      $this->get_phone(),
                                'address'       =>      $this->get_address(),
                                'show_in_portal' => $this->get_show_in_portal(),
-                               'change_type' => $this->get_change_type(),
+                               'change_type' => lang($this->get_change_type()),
                                'office' => 
$so_org->get_office_from_district($so_org->get_district_from_name($this->get_district()))
                        );
                }

Modified: trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php
===================================================================
--- trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php 2011-10-04 
06:11:43 UTC (rev 7789)
+++ trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php 2011-10-04 
06:28:18 UTC (rev 7790)
@@ -158,6 +158,57 @@
                                        $desc = 
phpgw::get_var('org_description');
 
                                }
+                               else if($o_id == "change_org")
+                               {
+                                       $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['district'] = 
phpgw::get_var('org_district'); 
+                                       $org_info['status'] = "change";
+                                       $o_id = 
$so_activity->add_organization_local($org_info);
+                                       
+                                       //add contact persons
+                                       $contact1 = array();
+                                       $contact1['name'] = 
phpgw::get_var('contact1_name');
+                                       $contact1['phone'] = 
phpgw::get_var('contact1_phone');
+                                       $contact1['mail'] = 
phpgw::get_var('contact1_email');
+                                       $contact1['org_id'] = $o_id;
+                                       $contact1['group_id'] = 0;
+                                       
$so_activity->add_contact_person_local($contact1);
+                                       
+                                       $contact2 = array();
+                                       $contact2['name'] = 
phpgw::get_var('contact2_name');
+                                       $contact2['phone'] = 
phpgw::get_var('contact2_phone');
+                                       $contact2['mail'] = 
phpgw::get_var('contact2_email');
+                                       $contact2['org_id'] = $o_id;
+                                       $contact2['group_id'] = 0;
+                                       
$so_activity->add_contact_person_local($contact2);
+                                       
+                                       $message = lang('change_request_ok');
+                                       
+                                       
$GLOBALS['phpgw_info']['flags']['noframework'] = true;
+
+                                       $this->render('activity.php', array
+                                               (
+                                                       'activity'      => 
$activity,
+                                                       'organizations' => 
$organizations,
+                                                       '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')
+                                               )
+                       );
+                               }
                                else if(is_numeric($o_id) && $o_id > 0)
                                {
                                        if(isset($g_id) && $g_id == "new_group")

Modified: trunk/activitycalendarfrontend/setup/phpgw_no.lang
===================================================================
--- trunk/activitycalendarfrontend/setup/phpgw_no.lang  2011-10-04 06:11:43 UTC 
(rev 7789)
+++ trunk/activitycalendarfrontend/setup/phpgw_no.lang  2011-10-04 06:28:18 UTC 
(rev 7790)
@@ -60,4 +60,5 @@
 int_arena_helptext     activitycalendarfrontend        no      Dersom 
aktiviteten skal finne sted i et kommunalt bygg velges dette fra listen her.
 arena_helptext activitycalendarfrontend        no      Dersom aktiviteten skal 
finne sted på en ikke-kommunal arena, velges dette her.<br/>Dersom aktiviteten 
finner sted på flere arenaer, velg hovedarena her.
 messages_saved_form    activitycalendarfrontend        no      Aktiviteten ble 
lagret
-messages_form_error    activitycalendarfrontend        no      Det oppstod et 
problem under lagring
\ No newline at end of file
+messages_form_error    activitycalendarfrontend        no      Det oppstod et 
problem under lagring
+change_request_ok      activitycalendarfrontend        no      Endringsønske 
for organisasjon er sendt inn
\ No newline at end of file

Modified: trunk/activitycalendarfrontend/templates/base/activity.php
===================================================================
--- trunk/activitycalendarfrontend/templates/base/activity.php  2011-10-04 
06:11:43 UTC (rev 7789)
+++ trunk/activitycalendarfrontend/templates/base/activity.php  2011-10-04 
06:28:18 UTC (rev 7790)
@@ -18,7 +18,7 @@
        url = 
"index.php?menuaction=activitycalendarfrontend.uiactivity.get_organization_groups&amp;phpgw_return_as=json&amp;orgid="
 + org_id;
 <?php }?>
 
-       if(org_id != null && org_id == 'new_org')
+       if(org_id != null && (org_id == 'new_org' || org_id == 'change_org'))
        {
                //alert('new_org');
                document.getElementById('new_org').style.display = "block";
@@ -161,6 +161,7 @@
                                                <select name="organization_id" 
id="organization_id" onchange="javascript:get_available_groups();">
                                                        <option value="">Ingen 
organisasjon valgt</option>
                                                        <option 
value="new_org">Ny organisasjon</option>
+                                                       <option 
value="change_org">Endre organisasjon</option>
                                                        <?php
                                                        foreach($organizations 
as $organization)
                                                        {




reply via email to

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