diff options
author | Antonio Gallo <tonicucoz@gmail.com> | 2012-07-02 05:43:53 +0000 |
---|---|---|
committer | Antonio Gallo <tonicucoz@gmail.com> | 2012-07-02 05:43:53 +0000 |
commit | 1c1e9c704c57feacaec4af8e1ab3d07bd9dd5adc (patch) | |
tree | 9caa2965b22abbe97f1e674a10cb7c27e769a13e /h-source | |
parent | a935ddd2093fa73066ae409c35535daa33371b9c (diff) |
added preview in hardware talk pages - lammi87 issue
Diffstat (limited to 'h-source')
-rw-r--r-- | h-source/Application/Controllers/GenericController.php | 12 | ||||
-rw-r--r-- | h-source/Application/Views/Desktop/talk.php | 13 | ||||
-rw-r--r-- | h-source/Public/Css/main.css | 2 |
3 files changed, 27 insertions, 0 deletions
diff --git a/h-source/Application/Controllers/GenericController.php b/h-source/Application/Controllers/GenericController.php index 0c140b3..656060d 100644 --- a/h-source/Application/Controllers/GenericController.php +++ b/h-source/Application/Controllers/GenericController.php @@ -850,6 +850,18 @@ class GenericController extends BaseController } } + //if preview + if (isset($_POST['previewAction'])) + { + if ($this->s['registered']->status['status'] === 'logged') + { + if (!$this->s['registered']->checkCsrf($clean['token'])) $this->redirect($this->controller.'/catalogue/'.$this->lang,2,'wrong token..'); + + $data['preview_message'] = $this->request->post('message','','sanitizeHtml'); + $this->m['TalkModel']->result = false; + } + } + $data['table'] = $this->m['TalkModel']->select()->where(array('id_hard'=>$clean['id_hard']))->orderBy('id_talk')->send(); $data['values'] = $this->m['TalkModel']->getFormValues('insert','sanitizeHtml'); diff --git a/h-source/Application/Views/Desktop/talk.php b/h-source/Application/Views/Desktop/talk.php index 4f1e1b2..ac02490 100644 --- a/h-source/Application/Views/Desktop/talk.php +++ b/h-source/Application/Views/Desktop/talk.php @@ -116,6 +116,18 @@ <?php echo $notice;?> + <!--preiview--> + <?php if (isset($preview_message)) { ?> + <div class="message_preview_notice"> + <?php echo gtext("preview of the message");?>: + </div> + <div class="issues_message_item_preview"> + <div class="message_view_description"> + <?php echo decodeWikiText($preview_message);?> + </div> + </div> + <?php } ?> + <div class="notebooks_insert_form"> <form action="<?php echo $this->baseUrl."/".$this->controller."/talk/$lang/$id_hard/$token".$this->viewStatus;?>#form" method="POST"> @@ -131,6 +143,7 @@ <?php echo Html_Form::textarea('message',$values['message'],'talk_textarea_entry','bb_code');?> </div> + <input type="submit" name="previewAction" value="<?php echo gtext("Preview");?>"> <input type="submit" name="insertAction" value="<?php echo gtext("Save");?>"> </div> diff --git a/h-source/Public/Css/main.css b/h-source/Public/Css/main.css index 4be530a..344b063 100644 --- a/h-source/Public/Css/main.css +++ b/h-source/Public/Css/main.css @@ -712,6 +712,7 @@ ins border:1px solid #C7DAEF; -moz-border-radius: 15px; -webkit-border-radius: 15px; + border-radius: 15px; } .tables_of_contents a { @@ -1407,6 +1408,7 @@ ins { -moz-border-radius: 12px; -webkit-border-radius: 12px; + border-radius: 12px; padding:10px; margin:20px 0px; background:#eaf2f4; |