[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [9808] new style and logic on edit-mode
From: |
Erik Holm-Larsen |
Subject: |
[Fmsystem-commits] [9808] new style and logic on edit-mode |
Date: |
Thu, 19 Jul 2012 06:29:55 +0000 |
Revision: 9808
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9808
Author: erikhl
Date: 2012-07-19 06:29:53 +0000 (Thu, 19 Jul 2012)
Log Message:
-----------
new style and logic on edit-mode
Modified Paths:
--------------
trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php
trunk/activitycalendarfrontend/templates/base/activity_edit.php
trunk/activitycalendarfrontend/templates/base/activity_new.php
Modified: trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php
===================================================================
--- trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php 2012-07-17
14:44:14 UTC (rev 9807)
+++ trunk/activitycalendarfrontend/inc/class.uiactivity.inc.php 2012-07-19
06:29:53 UTC (rev 9808)
@@ -457,6 +457,7 @@
$secret_param = phpgw::get_var('secret', 'GET');
if(!isset($id) || $id == '')
{
+ var_dump(3);
//select activity to edit
$activities =
$this->so_activity->get(null, null, 'title', true, null, null,
array('activity_state' => 3));
$organizations =
$this->so_organization->get(null, null, 'org.name', true, null, null,
array('edit_from_frontend' => 'yes'));
@@ -539,25 +540,35 @@
{
if(isset($activity)) // If an
activity object is created
{
+ $act_description =
phpgw::get_var('description');
$old_state =
$activity->get_state();
$new_state =
phpgw::get_var('state');
// ... set all
parameters
$activity->set_title(phpgw::get_var('title'));
$activity->set_arena(phpgw::get_var('arena_id'));
$activity->set_internal_arena(phpgw::get_var('internal_arena_id'));
- $district_array =
phpgw::get_var('district');
-
$activity->set_district(implode(",", $district_array));
+ //$district_array =
phpgw::get_var('district');
+
$activity->set_district(phpgw::get_var('district'));
$activity->set_office(phpgw::get_var('office'));
$activity->set_state(2);
$activity->set_category(phpgw::get_var('category'));
$target_array =
phpgw::get_var('target');
$activity->set_target(implode(",", $target_array));
-
$activity->set_description($desc);
+
$activity->set_description($act_description);
$activity->set_time(phpgw::get_var('time'));
$activity->set_contact_persons($persons);
$activity->set_special_adaptation(phpgw::get_var('special_adaptation'));
$activity->set_frontend(true);
-
+
+ $contact_person =
array();
+ $cp_tmp =
$persons_array[0];
+
$contact_person['original_id'] = $cp_tmp->get_id();
+ $contact_person['name']
= phpgw::get_var('contact_name');
+
$contact_person['phone'] = phpgw::get_var('contact_phone');
+ $contact_person['mail']
= phpgw::get_var('contact_mail');
+
$contact_person['group_id'] = $activity->get_group_id();
+
+
$target_ok = false;
$district_ok = false;
if($activity->get_target() && $activity->get_target() != '')
@@ -575,6 +586,12 @@
if($this->so_activity->store($activity)) // ... and then try to store the object
{
$message = lang('messages_saved_form');
+
//update group description
+
if($activity->get_group_id())
+ {
+
$this->so_group->update_group_description($activity->get_group_id(),
$act_description);
+
$this->so_group->update_group_contact($contact_person);
+ }
}
else
{
@@ -589,7 +606,6 @@
'organization' => $organization,
'group' => $group,
'contact1' => $persons_array[0],
-
'contact2' => $persons_array[1],
'arenas' => $arenas,
'buildings' => $buildings,
'categories' => $categories,
@@ -617,7 +633,6 @@
'activity' => $activity,
'organization' => $organization,
'contact1' => $persons_array[0],
-
'contact2' => $persons_array[1],
'org_name' => $org_name,
'group' => $group,
'arenas' => $arenas,
@@ -646,7 +661,6 @@
'organization' => $organization,
'group' => $group,
'contact1' => $persons_array[0],
-
'contact2' => $persons_array[1],
'arenas' => $arenas,
'buildings' => $buildings,
'categories' => $categories,
Modified: trunk/activitycalendarfrontend/templates/base/activity_edit.php
===================================================================
--- trunk/activitycalendarfrontend/templates/base/activity_edit.php
2012-07-17 14:44:14 UTC (rev 9807)
+++ trunk/activitycalendarfrontend/templates/base/activity_edit.php
2012-07-19 06:29:53 UTC (rev 9808)
@@ -103,7 +103,7 @@
function get_address_search_cp2()
{
var address = document.getElementById('contact2_address').value;
- var div_address =
document.getElementById('contact2_address_container');'
+ var div_address = document.getElementById('contact2_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;
@@ -150,25 +150,52 @@
{
alert("Tittel må fylles ut!");
return false;
+ }
+ if(document.getElementById('description').value == null ||
document.getElementById('description').value == '')
+ {
+ alert("Beskrivelse må fylles ut!");
+ return false;
+ }
+ if(document.getElementById('category').value == null ||
document.getElementById('category').value == 0)
+ {
+ alert("Kategori må fylles ut!");
+ return false;
}
- if(document.getElementById('internal_arena_id').value == null ||
document.getElementById('internal_arena_id').value == 0)
+ 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==''))
{
- if(document.getElementById('arena_id').value == null ||
document.getElementById('arena_id').value == 0)
- {
- alert("Arena må fylles ut!");
- return false;
- }
+ alert("Lokale må fylles ut!");
+ return false;
}
if(document.getElementById('time').value == null ||
document.getElementById('time').value == '')
{
- alert("Tid må fylles ut!");
+ alert("Dag og tid må fylles ut!");
return false;
}
- if(document.getElementById('category').value == null ||
document.getElementById('category').value == 0)
+ if(document.getElementById('contact_name').value == null ||
document.getElementById('contact_name').value == '')
{
- alert("Kategori må fylles ut!");
+ alert("Navn på kontaktperson må fylles ut!");
return false;
}
+ if(document.getElementById('contact_phone').value == null ||
document.getElementById('contact_phone').value == '')
+ {
+ alert("Telefonnummer til kontaktperson må fylles ut!");
+ return false;
+ }
+ if(document.getElementById('contact_mail').value == null ||
document.getElementById('contact_mail').value == '')
+ {
+ alert("E-postadresse til kontaktperson må fylles ut!");
+ return false;
+ }
+ if(document.getElementById('contact_mail2').value == null ||
document.getElementById('contact_mail2').value == '')
+ {
+ 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!");
@@ -180,205 +207,214 @@
</script>
-<div class="yui-content" style="width: 100%;">
+<div class="yui-content">
<div id="details">
-
- <?php if($message){?>
- <div class="success">
- <?php echo $message;?>
- </div>
- <?php }else if($error){?>
- <div class="error">
- <?php echo $error;?>
- </div>
- <?php }?>
- </div>
- <h1><?php echo lang('activity') ?></h1>
+
+ <?php if($message){?>
+ <div class="success">
+ <?php echo $message;?>
+ </div>
+ <?php }else if($error){?>
+ <div class="error">
+ <?php echo $error;?>
+ </div>
+ <?php }?>
+ </div>
+ <div class="pageTop">
+ <h1><?php echo lang('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
- $current_district_ids =
$activity->get_district();
- $current_district_id_array=explode(",",
$current_district_ids);
- foreach($districts as $d)
- {
- ?>
- <input name="district[]"
type="checkbox" value="<?php echo $d['part_of_town_id']?>" <?php echo
(in_array($d['part_of_town_id'], $current_district_id_array) ? 'checked' :
"")?>/><?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" <?php echo
$activity->get_special_adaptation() ? ' checked="checked"' : '' ?>/>
- </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: check_external();">
- <option value="0">Ingen arena
valgt</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>
- <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>
- <hr />
- <h2><?php echo lang('who')?></h2>
- <dt>
- <label for="organization_id"><?php echo
lang('organization') ?></label>
- </dt>
- <input type="hidden" name="organization_id"
id="organization_id" value="<?php echo $organization->get_id()?>" />
- <dd><label
for="orgname">Organisasjonsnavn</label>:
- <?php echo $organization->get_name()?></dd>
- <dd><label
for="orgno">Organisasjonsnummer</label>:
- <?php echo
$organization->get_organization_number()?></dd>
- <dd><label for="homepage">Hjemmeside</label>:
- <?php echo $organization->get_homepage()?></dd>
- <dd><label for="email">E-post</label>:
- <?php echo $organization->get_email()?></dd>
- <dd><label for="phone">Telefon</label>:
- <?php echo $organization->get_phone()?></dd>
- <dd><label for="street">Adresse</label>:
- <?php echo $organization->get_address()?></dd>
- <dd><label
for="org_description">Beskrivelse</label>:<br/>
- <textarea rows="10" cols="100"
name="org_description" size="254"><?php echo
$organization->get_description()?></textarea></dd>
- <dt>
- <?php if($activity->get_group_id() ||
$editable) { ?>
- <label for="group_id"
id="group_label"><?php echo lang('group') ?></label>
- <?php } ?>
- </dt>
- <dd>
- <?php
- if($activity->get_group_id()){
- echo $group->get_name();
- }
- ?>
- </dd>
- <dt>
- <?php
if($activity->get_contact_person_1()) { ?>
- <label for="contact_person_1"><?php
echo lang('contact_person_1') ?></label>
- <?php } ?>
- </dt>
- <dd><label
for="contact1_name">Navn</label>:<?php echo
isset($contact1)?$contact1->get_name():''?></dd>
- <dd><label
for="contact1_phone">Telefon</label>:<?php echo
isset($contact1)?$contact1->get_phone():''?></dd>
- <dd><label
for="contact1_mail">E-post</label>:<?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 } ?>
- </dt>
- <dd><label
for="contact2_name">Navn</label>:<?php echo
isset($contact2)?$contact2->get_name():''?></dd>
- <dd><label
for="contact2_phone">Telefon</label>:<?php echo
isset($contact2)?$contact2->get_phone():''?></dd>
- <dd><label
for="contact2_mail">E-post</label>:<?php echo
isset($contact2)?$contact2->get_email():''?></dd>
- </dl>
- <div class="form-buttons">
+ <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"><?php echo $activity->get_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" <?php echo
$activity->get_special_adaptation() ? ' checked="checked"' : '' ?>/>
+ <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>
+ <br/>
+ <label for="arena"><?php echo
lang('arena') ?> (*) <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/>
+ </dt>
+ <dd>
+ <?php
+ $internal_arena_id =
$activity->get_internal_arena();
+ $arena_id = $activity->get_arena();
+ ?>
+ <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)
+ {
+
if($internal_arena_id && $internal_arena_id == $building_id)
+ $selected =
"selected";
+ else
+ $selected = "";
+ echo "<option
value=\"i_{$building_id}\" {$selected}>".$building_name."</option>";
+ }
+ ?>
+ </optgroup>
+ <optgroup label="<?php
echo lang('building') ?>">
+ <?php
+ foreach($arenas as
$arena)
+ {
+ if($arena_id &&
$arena_id == $arena->get_id())
+ $selected =
"selected";
+ else
+ $selected = "";
+ echo "<option
value=\"e_{$arena->get_id()}\" title=\"{$arena->get_arena_name()}\"
{$selected}>".$arena->get_arena_name()."</option>";
+ }
+ ?>
+ </optgroup>
+ </select>
+ <BR>
+ </dd>
+ <dt>
+ <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
+ $current_district_id =
$activity->get_district();
+
//$current_district_id_array=explode(",", $current_district_ids);
+ foreach($districts as $d)
+ {
+ ?>
+ <input name="district"
type="radio" value="<?php echo $d['part_of_town_id']?>" <?php echo
($d['part_of_town_id'] == $current_district_id) ? 'checked' : "" ?>/><?php echo
$d['name']?><br/>
+ <?php
+ }
+ ?>
+ </dd>
+ <dt>
+ <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" value="<?php echo $contact1->get_name()?>"></DD>
+ <DT><LABEL for="contact_phone">Telefon (*)</LABEL></DT>
+ <DD><INPUT name="contact_phone" id="contact_phone"
type="text" value="<?php echo $contact1->get_phone()?>"></DD>
+ <DT><LABEL for="contact_mail">E-post (*)</LABEL></DT>
+ <DD><INPUT name="contact_mail" id="contact_mail"
size="50" type="text" value="<?php echo $contact1->get_email()?>"></DD>
+ <DT><LABEL for="contact2_mail2">Gjenta e-post
(*)</LABEL></DT>
+ <DD><INPUT name="contact_mail2" id="contact_mail2"
size="50" type="text" value="<?php echo $contact1->get_email()?>"></DD>
+ </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>
+ <div class="form-buttons">
<?php
if ($editable) {
echo '<input type="submit"
name="save_activity" value="' . lang('save') . '" onclick="return allOK();"/>';
}
?>
- </div>
-
+ </div>
+ </dl>
</form>
-
</div>
</div>
\ No newline at end of file
Modified: trunk/activitycalendarfrontend/templates/base/activity_new.php
===================================================================
--- trunk/activitycalendarfrontend/templates/base/activity_new.php
2012-07-17 14:44:14 UTC (rev 9807)
+++ trunk/activitycalendarfrontend/templates/base/activity_new.php
2012-07-19 06:29:53 UTC (rev 9808)
@@ -225,16 +225,16 @@
<div class="yui-content">
<div id="details">
- <?php if($message){?>
- <div class="success">
- <?php echo $message;?>
- </div>
- <?php }else if($error){?>
- <div class="error">
- <?php echo $error;?>
- </div>
- <?php }?>
- </div>
+ <?php if($message){?>
+ <div class="success">
+ <?php echo $message;?>
+ </div>
+ <?php }else if($error){?>
+ <div class="error">
+ <?php echo $error;?>
+ </div>
+ <?php }?>
+ </div>
<div class="pageTop">
<h1><?php echo lang('new_activity') ?></h1>
<div>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [9808] new style and logic on edit-mode,
Erik Holm-Larsen <=