fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7281] fixed display of part of town on activities


From: Erik Holm-Larsen
Subject: [Fmsystem-commits] [7281] fixed display of part of town on activities
Date: Tue, 10 May 2011 10:28:22 +0000

Revision: 7281
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7281
Author:   erikhl
Date:     2011-05-10 10:28:21 +0000 (Tue, 10 May 2011)
Log Message:
-----------
fixed display of part of town on activities
added checkbox for select on activity targets

Modified Paths:
--------------
    trunk/activitycalendar/inc/class.soactivity.inc.php
    trunk/activitycalendar/templates/base/activity.php

Modified: trunk/activitycalendar/inc/class.soactivity.inc.php
===================================================================
--- trunk/activitycalendar/inc/class.soactivity.inc.php 2011-05-10 10:09:42 UTC 
(rev 7280)
+++ trunk/activitycalendar/inc/class.soactivity.inc.php 2011-05-10 10:28:21 UTC 
(rev 7281)
@@ -337,10 +337,10 @@
                $result = "Ingen";
                if($district_id != null)
                {
-                       $sql = "SELECT descr FROM fm_district where 
id=$district_id";
+                       $sql = "SELECT name FROM fm_part_of_town where 
district_id=$district_id";
                        $this->db->query($sql, __LINE__, __FILE__);
                        while($this->db->next_record()){
-                               $result = $this->db->f('descr');
+                               $result = $this->db->f('name');
                        }
        }
                return $result;

Modified: trunk/activitycalendar/templates/base/activity.php
===================================================================
--- trunk/activitycalendar/templates/base/activity.php  2011-05-10 10:09:42 UTC 
(rev 7280)
+++ trunk/activitycalendar/templates/base/activity.php  2011-05-10 10:28:21 UTC 
(rev 7281)
@@ -195,18 +195,12 @@
                                        //echo 
$current_target_id_array[0]."*".$current_target_id_array[1];
                                        if ($editable)
                                        {
+                                               foreach($targets as $t)
+                                               {
                                                ?>
-                                               <select name="target[]" 
size="<?php echo count($targets)?>" multiple="multiple">
-                                                       <option value="0">Ingen 
målgruppe valgt</option>
-                                                       <?php
-                                                       foreach($targets as $t)
-                                                       {
-                                                               //echo 
in_array($target->get_id(), $current_target_id_array);
-                                                               echo "<option 
value=\"{$t->get_id()}\" ".(in_array($t->get_id(), $current_target_id_array) ? 
'selected' : "").">".$t->get_name()."</option>";
-                                                       }
-                                                       ?>
-                                               </select>
+                                                       <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
+                                               }
                                        }
                                        else
                                        {
@@ -221,6 +215,7 @@
                                        }
                                        ?>
                                </dd>
+                               
                                <dt>
                                        <?php if($activity->get_office() || 
$editable) { ?>
                                        <label for="office"><?php echo 
lang('office') ?></label>




reply via email to

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