Dotclear


Ignore:
Timestamp:
08/09/13 15:19:11 (12 years ago)
Author:
Dsls
Branch:
twig
Message:

Continuing with twig -> post.php

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/post.php

    r1315 r1319  
    130130               "label" => __('Entry lang:')))) 
    131131     ->addField( 
     132          new dcFieldText('post_password','',array( 
     133               "maxlength" => 32, 
     134               "label" => __('Entry password:')))) 
     135     ->addField( 
     136          new dcFieldText('post_url','',array( 
     137               "maxlength" => 255, 
     138               "label" => __('Basename:')))) 
     139     ->addField( 
    132140          new dcFieldHidden ('id','')) 
    133141; 
     
    146154     else 
    147155     { 
    148           $form->id = $post->post_id; 
     156          $form->id = $post_id = $post->post_id; 
    149157          $form->cat_id = $post->cat_id; 
    150158          $form->post_dt = date('Y-m-d H:i',strtotime($post->post_dt)); 
     
    165173          $form->can_edit_post = $post->isEditable(); 
    166174          $form->can_delete= $post->isDeletable(); 
     175          $page_title = __('Edit entry'); 
     176 
     177     } 
     178} 
     179if ($post_id) { 
     180     $_ctx->post_id = $post->post_id; 
     181 
     182     $_ctx->preview_url = 
     183          $core->blog->url.$core->url->getURLFor('preview',$core->auth->userID().'/'. 
     184          http::browserUID(DC_MASTER_KEY.$core->auth->userID().$core->auth->getInfo('user_pwd')). 
     185          '/'.$post->post_url); 
    167186           
    168      } 
     187      
     188     $form_comment = new dcForm($core,'add-comment','post.php'); 
     189     $form_comment 
     190          ->addField( 
     191               new dcFieldText('comment_author','', array( 
     192                    'maxlength'         => 255, 
     193                    'required'     => true, 
     194                    'label'        => __('Name:')))) 
     195          ->addField( 
     196               new dcFieldText('comment_email','', array( 
     197                    'maxlength'         => 255, 
     198                    'required'     => true, 
     199                    'label'        => __('Email:')))) 
     200          ->addField( 
     201               new dcFieldText('comment_site','', array( 
     202                    'maxlength'         => 255, 
     203                    'label'        => __('Web site:')))) 
     204          ->addField( 
     205               new dcFieldTextArea('comment_content','', array( 
     206                    'required'     => true, 
     207                    'label'        => __('Comment:')))) 
     208          ->addField( 
     209               new dcFieldSubmit('add',__('Save'),array( 
     210                    'action' => 'addComment'))) 
     211          ; 
     212 
     213      
    169214} 
    170215 
     
    182227 
    183228$_ctx 
     229     ->fillPageTitle(html::escapeHTML($core->blog->name)) 
    184230     ->fillPageTitle(__('Entries'),'posts.php') 
    185231     ->fillPageTitle($page_title) 
Note: See TracChangeset for help on using the changeset viewer.

Sites map