[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [9329]
From: |
Erik Holm-Larsen |
Subject: |
[Fmsystem-commits] [9329] |
Date: |
Wed, 09 May 2012 07:43:55 +0000 |
Revision: 9329
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9329
Author: erikhl
Date: 2012-05-09 07:43:54 +0000 (Wed, 09 May 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php
trunk/activitycalendarfrontend/templates/base/activity_new_org.php
Modified: trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php
===================================================================
--- trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php 2012-05-09
07:26:31 UTC (rev 9328)
+++ trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php 2012-05-09
07:43:54 UTC (rev 9329)
@@ -145,13 +145,20 @@
$contact1['group_id'] = 0;
$this->so_activity->add_contact_person_local($contact1);
- $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);
+ 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);
Modified: trunk/activitycalendarfrontend/templates/base/activity_new_org.php
===================================================================
--- trunk/activitycalendarfrontend/templates/base/activity_new_org.php
2012-05-09 07:26:31 UTC (rev 9328)
+++ trunk/activitycalendarfrontend/templates/base/activity_new_org.php
2012-05-09 07:43:54 UTC (rev 9329)
@@ -45,35 +45,50 @@
function allOK()
{
-/* if(document.getElementById('title').value == null ||
document.getElementById('title').value == '')
+ if(document.getElementById('orgname').value == null ||
document.getElementById('orgname').value == '')
{
- alert("Tittel må fylles ut!");
+ alert("Organisasjonsnavn må fylles ut!");
return false;
}
- if(document.getElementById('internal_arena_id').value == null ||
document.getElementById('internal_arena_id').value == 0)
+ if(document.getElementById('org_district').value == null ||
document.getElementById('org_district').value == 0)
{
- if(document.getElementById('arena_id').value == null ||
document.getElementById('arena_id').value == 0)
- {
- alert("Arena må fylles ut!");
- return false;
- }
+ alert("Bydel må fylles ut!");
+ return false;
}
- if(document.getElementById('time').value == null ||
document.getElementById('time').value == '')
+ if(document.getElementById('phone').value == null ||
document.getElementById('phone').value == '')
{
- alert("Tid må fylles ut!");
+ alert("Telefonnummer for organisasjonen må fylles ut!");
return false;
}
- if(document.getElementById('category').value == null ||
document.getElementById('category').value == 0)
+ if(document.getElementById('address').value == null ||
document.getElementById('address').value == 0)
{
- alert("Kategori må fylles ut!");
+ alert("Gateadresse må fylles ut!");
return false;
}
- if(document.getElementById('office').value == null ||
document.getElementById('office').value == 0)
+ if(document.getElementById('postaddress').value == null ||
document.getElementById('postaddress').value == '')
{
- alert("Hovedansvarlig kulturkontor må fylles ut!");
+ alert("Postnummer og sted må fylles ut!");
return false;
}
- else */
+ if(document.getElementById('org_description').value == null ||
document.getElementById('org_description').value == '')
+ {
+ alert("Beskrivelse for organisasjonen må fylles ut!");
+ return false;
+ }
+ if(document.getElementById('org_contact1_name').value == null ||
document.getElementById('org_contact1_name').value == '')
+ {
+ alert("Navn på kontaktperson 1 må fylles ut!");
+ return false;
+ }
+ if(document.getElementById('org_contact1_mail').value == null ||
document.getElementById('org_contact1_mail').value == '')
+ {
+ if(document.getElementById('org_contact1_phone').value == null
|| document.getElementById('org_contact1_phone').value == '')
+ {
+ alert("E-post eller telefon for kontaktperson 1 må
fylles ut!");
+ return false;
+ }
+ }
+ else
return true;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [9329],
Erik Holm-Larsen <=