To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Show
Ignore:
Timestamp:
09/01/10 11:59:43 (21 months ago)
Author:
wjohnald
Message:

this commit resolves tickets: #144 and #347

Location:
plugins/apostrophePlugin/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostrophePlugin/trunk

  • plugins/apostrophePlugin/trunk/lib/form/BaseaPageSettingsForm.class.php

    r2016 r2107  
    9393    ))); 
    9494 
     95        // Tags 
     96        $tagstring = implode(', ', $this->getObject()->getTags());  // added a space after the comma for readability 
     97        // class tag-input enabled for typeahead support 
     98        $this->setWidget('tags', new sfWidgetFormInput(array('default' => $tagstring), array('class' => 'tags-input'))); 
     99        $this->setValidator('tags', new sfValidatorString(array('required' => false))); 
     100 
     101 
     102        // Meta Description 
     103        $metaDescription = $this->getObject()->getMetaDescription(); 
     104        $this->setWidget('meta_description', new sfWidgetFormTextArea(array('default' => html_entity_decode($metaDescription, ENT_COMPAT, 'UTF-8')))); 
     105        $this->setValidator('meta_description', new sfValidatorString(array('required' => false))); 
     106 
     107 
     108 
    95109    $this->addPrivilegeWidget('edit', 'editors'); 
    96110    $this->addPrivilegeWidget('manage', 'managers'); 
     
    236250    $object = parent::updateObject($values); 
    237251     
     252    // Update tags on Page 
     253    if ($this->getValue('tags') != '') 
     254    { 
     255            $this->getObject()->addTag($this->getValue('tags')); 
     256        } 
     257 
     258    // Update meta-description on Page 
     259    if ($this->getValue('meta_description') != '') 
     260    { 
     261            $this->getObject()->setMetaDescription(htmlentities($this->getValue('meta_description'))); 
     262        }     
     263     
    238264    // Check for cascading operations 
    239265    if($this->getValue('cascade_archived') || $this->getValue('cascade_view_is_secure'))