Show
Ignore:
Timestamp:
04/29/05 14:21:46 (7 years ago)
Author:
fproulx
Message:

2005-04-29 Fran�ois Proulx <francois.proulx@…>

  • Removed all inline unuseful javascript code on submit buttons onclick='submit()'
  • This conflicted with the actual click on the submit button in Safari
  • Fixed check in Network for isOwner, only check superAdmin
  • Fixed bug so you can't add an existing content group to itself ( deadlock )
  • Started coding Pattern language narrative display
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/wifidog/classes/Content/ContentGroup.php

    r593 r601  
    390390                        $html .= "<div class='admin_section_tools'>\n"; 
    391391                        $name = "content_group_".$this->id."_element_".$element->GetId()."_erase"; 
    392                         $html .= "<input type='submit' name='$name' value='"._("Delete")."' onclick='submit();'>"; 
     392                        $html .= "<input type='submit' name='$name' value='"._("Delete")."'>"; 
    393393                        $html .= "</div>\n"; 
    394394                        $html .= "</li>\n"; 
     
    397397        $html .= "<b>"._("Add a new content OR select previously created content")."</b><br>"; 
    398398                $html .= self :: getNewContentUI("content_group_{$this->id}_new_element")."<br>"; 
    399         $html .= self :: getSelectContentUI("content_group_{$this->id}_existing_element"); 
     399        $html .= self :: getSelectContentUI("content_group_{$this->id}_existing_element", "AND content_id != '$this->id'"); 
    400400        $html .= "<input type='submit' name='content_group_{$this->id}_existing_element_add' value='"._("Add")."'>"; 
    401401        $html .= "</li>\n"; 
     
    695695        /** Retreives the user interface of this object.  Anything that overrides this method should call the parent method with it's output at the END of processing. 
    696696         * @param $subclass_admin_interface Html content of the interface element of a children 
     697     * @param boolean $hide_elements allows the child class ( for example 
     698     * Pattern Language) to tell the content group not to display elements ) for 
     699     * elements that need to be hidden before subscription 
    697700         * @return The HTML fragment for this interface */ 
    698         public function getUserUI($subclass_user_interface = null) 
     701        public function getUserUI($subclass_user_interface = null, $hide_elements = false) 
    699702        { 
    700703                $html = ''; 
     
    702705                $html .= "<div class='user_ui_object_class'>ContentGroup (".get_class($this)." instance)</div>\n"; 
    703706 
    704                 $display_elements = $this->getDisplayElements(); 
    705                 if (count($display_elements) > 0) 
    706                 { 
    707                         foreach ($display_elements as $display_element) 
    708                         { 
    709                 // If the content group logging is disabled, all the children will inherit this property temporarly 
    710                 if($this->getLoggingStatus() == false) 
    711                     $display_element->setLoggingStatus(false); 
    712                                 $html .= $display_element->getUserUI(); 
    713                         } 
    714                 } 
    715                 else 
    716                 { 
    717                         $html .= '<p class="warningmsg">'._("Sorry, no elements available at this hotspot or all elements of the content group have already been shown")."</p>\n"; 
    718                 } 
     707                if($hide_elements == false) 
     708        { 
     709            $display_elements = $this->getDisplayElements(); 
     710                if (count($display_elements) > 0) 
     711                { 
     712                        foreach ($display_elements as $display_element) 
     713                        { 
     714                    // If the content group logging is disabled, all the children will inherit this property temporarly 
     715                    if($this->getLoggingStatus() == false) 
     716                        $display_element->setLoggingStatus(false); 
     717                                $html .= $display_element->getUserUI(); 
     718                        } 
     719                } 
     720                else 
     721                { 
     722                        $html .= '<p class="warningmsg">'._("Sorry, no elements available at this hotspot or all elements of the content group have already been shown")."</p>\n"; 
     723                } 
     724        } 
    719725 
    720726                $html .= $subclass_user_interface;