Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

'Changes saved' message appearing in every steps

edited June 2009 in Vanilla 1.0 Help
Hi I have just started studying Vanilla.I tried to write an extension which actually worked so far but I have some problem with the success message which is supposed to appear after the changes have been saved.But it is appearing right at the time when I get into that extension setting page.Below is my render function : function Render() { if ($this->IsPostBack) { $this->CallDelegate('PreRender'); $this->PostBackParams->Clear(); if ($this->PostBackAction == 'Twitter') { $this->PostBackParams->Set('PostBackAction', 'ProcessTwitter'); echo ' <div id="Form" class="Account AttachmentSettings">'; if (ForceIncomingBool('Success',0)) echo '<div id="Success">'.$this->Context->GetDefinition('ChangesSaved').'</div>'; echo ' <fieldset> <legend>'.$this->Context->GetDefinition('TwitterSettings').'</legend> '.$this->Get_Warnings().' '.$this->Get_PostBackForm('frmTwitter').' <ul> <li> <label for="twitterid">'.$this->Context->GetDefinition('Fillit').'</label> '.$this->Context->GetDefinition('twitter_url').'<input type="text" name="TWITTER_ID" id="twitterid" value="'.$this->ConfigurationManager->GetSetting('TWITTER_ID').'" maxlength="200" class="SmallInput" /> </li> <li> <label for="twitterimage">'.$this->Context->GetDefinition('Button_location').'</label> <input type="text" name="TWITTER_BUTTON_LOCATION" id="twitterimage" value="'.$this->ConfigurationManager->GetSetting('TWITTER_BUTTON_LOCATION').'" maxlength="200" class="SmallInput" /> </li> </ul> <div class="Submit"> <input type="submit" name="btnSave" value="'.$this->Context->GetDefinition('Save').'" class="Button SubmitButton" /> <a href="'.GetUrl($this->Context->Configuration, $this->Context->SelfUrl).'" class="CancelButton">'.$this->Context->GetDefinition('Cancel').'</a> </div> </form> </fieldset> </div>'; } } $this->CallDelegate('PostRender'); } Please help me get rid of that message ( if (ForceIncomingBool('Success',0)) echo '<div id="Success">'.$this->Context->GetDefinition('ChangesSaved').'</div>'; ) and only show it when the form is actually posted. Thanks

Comments

Sign In or Register to comment.