Changeset 24993

Show
Ignore:
Timestamp:
02/03/10 17:20:30 (7 months ago)
Author:
bergie
Message:

Hide country input if there are no countries in the DB, as location->country is a linked property. Fixes #875

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/ragnaroek/midcom/midcom.helper.datamanager2/widget/position.php

    r23972 r24993  
    516516            || count($this->_countrylist) == 1) 
    517517        { 
    518             $html .= "<label for='{$this->_element_id}_input_place_country' id='{$this->_element_id}_input_place_country_label'>"; 
    519             $html .= "<span class=\"field_text\">" . $_MIDCOM->i18n->get_string('xep_country', 'org.routamc.positioning') . "</span>"; 
    520             $html .= "<input size=\"30\" class=\"shorttext position_widget_input position_widget_input_place_country\" id=\"{$this->_element_id}_input_place_country\" name=\"{$this->_element_id}_input_place_country\" type=\"text\" value=\"{$current}\" />"; 
    521             $html .= "</label>"; 
    522  
    523518            return $html; 
    524519        } 
     
    634629            $city = new org_routamc_positioning_city_dba(); 
    635630            $city->city = $city_name; 
    636             $city->country = $results["{$this->_element_id}_input_place_country"]; 
     631             
     632            if (   isset($results["{$this->_element_id}_input_place_country"]) 
     633                && $results["{$this->_element_id}_input_place_country"]) 
     634            { 
     635                $city->country = $results["{$this->_element_id}_input_place_country"]; 
     636            } 
    637637            if (isset($results["{$this->_element_id}_input_place_region"])) 
    638638            {