Changeset 701 for trunk/app/views

Show
Ignore:
Timestamp:
08/08/08 16:03:49 (4 months ago)
Author:
aarkerio
Message:

New validates

Location:
trunk/app/views
Files:
8 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/entries/admin_add.ctp

    r633 r701  
    1313  <?php  
    1414     echo $form->input('Entry.title', array('size' => 50, 'maxlength' => 50, 'label'=>__('Title', true))); 
    15      echo $form->error('Entry.title', 'Title is required.'); 
     15     echo $form->error('Entry.title'); 
    1616 ?> 
    1717  </td> 
     
    3131     echo $form->textarea('Entry.body', array('cols'=>80, 'rows'=>30));  
    3232     echo $fck->load('EntryBody', 'Karamelo');  
     33     echo $form->error('Entry.body'); 
    3334   ?> 
    3435  </td></tr> 
  • trunk/app/views/entries/admin_edit.ctp

    r679 r701  
    5151  <td> 
    5252  <?php  
    53       echo $form->label('Entry.end', 'Finish edition' ); 
     53      echo $form->label('Entry.end', __('Finish edition', true) ); 
    5454      echo $form->checkbox('Entry.end', array('value'=>1));  
    5555  ?> 
     
    6262  </tr> 
    6363</table> 
    64  
    6564</fieldset> 
  • trunk/app/views/glossaries/admin_edit.ctp

    r318 r701  
    1 <div> 
    21<?php  
    3     echo $html->addCrumb('Control Tools', '/admin/entries/start');  
    4     echo $html->addCrumb('Glossaries', '/admin/catglossaries/listing');  
    5     echo $html->getCrumbs(' / ');  
    6 ?> 
    7 </div> 
    8  
    9 <?php  
     2   echo $html->addCrumb('Control Panel', '/admin/entries/start');  
     3   echo $html->addCrumb(__('Glossaries', true), '/admin/catglossaries/listing');  
     4   echo $html->getCrumbs(' / ');  
     5     
    106   echo $form->create('Glossary');  
    117   echo $form->hidden('Glossary.id'); 
     
    139?> 
    1410<fieldset> 
    15   <legend>Edit Item</legend> 
     11  <legend><?php __('Edit item'); ?></legend> 
    1612  <?php  
    17     echo $form->input('Glossary.item', array("size" => 30, "maxlength" => 90)); 
     13    echo $form->input('Glossary.item', array('size' => 30, 'maxlength' => 90)); 
    1814    echo $form->error('Glossary.item', 'An item  is required.'); 
    1915      
    20     echo $form->label('Glossary.definition', 'Definition:'); 
    21     echo $form->textarea('Glossary.definition', array("cols" => 40, "rows" => 6)); 
     16    echo $form->label('Glossary.definition', __('Definition', true)); 
     17    echo $form->textarea('Glossary.definition', array('cols' => 40, 'rows' => 6)); 
    2218    echo $form->error('Glossary.definition', 'A category definition is required.'); 
    23   ?> 
    24   <div style="clear:both"></div> 
    25   <br /></fieldset> 
    26   <?php echo $form->submit('Save'); ?> 
     19  
     20    echo $form->submit(__('Save', true));  
     21 ?> 
     22</fieldset> 
  • trunk/app/views/news/admin_add.ctp

    r620 r701  
    66   echo $html->addCrumb(__('News', true), '/admin/news/listing'); 
    77   echo $html->getCrumbs(' / '); 
    8    echo $form->create('News', array('onsubmit'=>'return validateNew()'));  
     8   echo $form->create('News');  
    99 
    1010   echo $html->div('title_section', __('Add new', true)); 
     
    1212<table> 
    1313<tr> 
     14<td><?php  echo $form->input('News.title', array('size' => 40, 'maxlength' => 120));  ?> </td> 
    1415<td> 
    15  <?php  
    16       echo $form->input('News.title', array('size' => 40, 'maxlength' => 120)); 
    17       echo $form->error('News.title', 'Title is required.');  
    18  ?> 
    19 </td><td> 
    2016 <?php  
    2117    echo $form->label('News.theme_id', __('Theme', true)); 
    2218    echo $form->select('News.theme_id', $themes, null, null, null, false, false);       
    2319  ?> 
    24 </td><td> 
    25 <?php  
    26    echo $form->input('News.reference', array('size'=> 30, 'maxlength'=> 250, 'value'=>'http://'));  
    27  ?> 
    28 </td><td> 
    29  <?php echo $html->link($html->image('admin/myimages.jpg', array("alt"=>"My Images", "title"=>"My Images")), '#', array("onclick"=>"javascript:window.open('/admin/images/listing/set', 'blank', 'toolbar=no, scrollbars=yes,width=700,height=500')"), null, false) ?></p> 
     20</td> 
     21<td><?php echo $form->input('News.reference', array('size'=> 30, 'maxlength'=> 340));  ?></td> 
     22<td> 
     23 <?php echo $html->link($html->image('admin/myimages.jpg', array('alt'=>__('My Images', true), 'title'=>__('My Images', true))), '#', array("onclick"=>"javascript:window.open('/admin/images/listing/set', 'blank', 'toolbar=no, scrollbars=yes,width=700,height=500')"), null, false) ?></p> 
    3024</td></tr> 
    31  
    3225<tr><td colspan="4"> 
    3326  <?php  
    34      echo $form->label('News.Body', 'Body:').'<br />'; 
     27     echo $form->error('News.body').'<br />'; 
    3528     echo $form->textarea('News.body', array('cols'=>80, 'rows'=>35)); 
    3629     echo $fck->load('NewsBody', 'Karamelo');  
     
    3932<tr><td> 
    4033  <?php  
    41      echo $form->label('News.status', 'Published:' ); 
     34     echo $form->label('News.status', __('Published', true) ); 
    4235     echo $form->checkbox('News.status', array('value'=>1));  
    4336  ?> 
    4437</td><td> 
    4538  <?php  
    46      echo $form->label('News.comments', 'Comments actived:' ); 
     39     echo $form->label('News.comments', __('Allow comments', true) ); 
    4740     echo $form->checkbox('News.comments', array('value'=>1));  
    4841  ?> 
     
    5043<td  colspan="2"> 
    5144   <?php  
    52      echo $form->label('News.end', 'Finish editing:'); 
     45     echo $form->label('News.end', __('Finish edition', true)); 
    5346     echo $form->checkbox('News.end', array('value'=>1));  
    5447    ?> 
    5548</td> 
    5649</tr> 
    57    
    58 <tr><td colspan="4">  <?php echo $form->end(__('Save', true)); ?> </td></tr> 
    59  
     50  <tr><td colspan="4">  <?php echo $form->end(__('Save', true)); ?> </td></tr> 
    6051</table> 
     52</fieldset> 
  • trunk/app/views/news/admin_edit.ctp

    r620 r701  
    55  echo $html->getCrumbs(' / ');  
    66 
    7   echo $html->para(null, $html->link($html->image('actions/new.png', array("alt"=>"Add new", "title"=>"Add new")), '/admin/news/add', null, false, false)); 
     7  echo $html->para(null, $html->link($html->image('actions/new.png', array('alt'=>__('Add new', true), 'title'=>__('Add new',true))), '/admin/news/add', null, false, false)); 
    88 
    9   echo $form->create('News', array('onsubmit'=>'return validateNew()'));  
     9  echo $form->create('News');  
    1010  echo $form->hidden('News.id'); 
    1111?> 
    1212<table> 
    1313<tr> 
    14 <td> 
    15 <?php  
    16   echo $form->input('News.title', array('size' => 40, 'maxlength' => 120, 'label'=>__('Title', true))); 
    17   echo $form->error('News.title', 'Title is required.');  
    18 ?> 
    19 </td> 
     14<td> <?php echo $form->input('News.title', array('size' => 40, 'maxlength' => 120, 'label'=>__('Title', true))); ?></td> 
    2015<td> 
    2116  <?php  
    22     echo $form->label('News.theme_id', 'Theme:' ); 
     17    echo $form->label('News.theme_id', __('Theme', true)); 
    2318    echo $form->select('News.theme_id', $themes, null, null, false);       
    2419  ?> 
    2520</td> 
    26 <td> 
    27   <?php echo $form->input('News.reference', array("size" => 30, "maxlength" => 250, 'value'=>'http://'));  ?> 
    28 </td> 
     21<td><?php  echo $form->input('News.reference', array('size'=> 30, 'maxlength' => 340)); ?></td> 
    2922<td> 
    3023  <?php echo $html->link($html->image('admin/myimages.jpg', array("alt"=>"My Images", "title"=>"My Images")), '#', array("onclick"=>"javascript:window.open('/admin/images/listing/set', 'blank', 'toolbar=no, scrollbars=yes,width=700,height=500')"), null, false) ?></p> 
     
    3326<tr><td colspan="4"> 
    3427  <?php  
    35      echo $form->label('News.Body', 'Body:') . '<br />'; 
     28     echo $form->error('News.body'); 
    3629     echo $form->textarea('News.body', array('cols'=>90, 'rows'=>35));  
    3730     echo $fck->load('NewsBody', 'Karamelo');  
     
    4134  <td> 
    4235 <?php  
    43      echo $form->label('News.status', 'Published:'); 
    44      echo $form->checkbox('News.status', array("value"=>1));  
     36     echo $form->label('News.status', __('Published', true)); 
     37     echo $form->checkbox('News.status', array('value'=>1));  
    4538  ?> 
    4639</td> 
    4740<td> 
    4841 <?php  
    49      echo $form->label('News.comments', 'Allow comments:' ); 
    50      echo $form->checkbox('News.comments', array("value"=>1));  
     42     echo $form->label('News.comments', __('Allow comments', true)); 
     43     echo $form->checkbox('News.comments', array('value'=>1));  
    5144 ?> 
    5245</td> 
    5346 <td colspan="2"> 
    5447 <?php  
    55       echo $form->label('News.end', 'Finish editing:'); 
    56       echo $form->checkbox('News.end', array("value"=>1));  
     48    echo $form->label('News.end', __('Finish edition', true)); 
     49    echo $form->checkbox('News.end', array('value'=>1));  
    5750 ?> 
    5851</td> 
     
    6053<tr><td colspan="4"> <?php echo $form->end(__('Save', true)); ?></td></tr> 
    6154</table> 
     55</fieldset> 
  • trunk/app/views/news/admin_listing.ctp

    r653 r701  
    11<?php 
    2 //die(debug($data)); 
    32  echo $html->div('title_section', __('News', true)); 
    43  echo $html->link($html->image('actions/new.png', array('alt'=>__('Add new', true), 'title'=>__('Add new', true))), '/admin/news/add', null, false, false); 
    54  echo '&nbsp;&nbsp;&nbsp;';  
    6   echo $html->link($html->image('static/forum.gif', array("alt"=>"See comments", "title"=>"See comments")), '/admin/discussions/listing', null, false, false); 
     5  echo $html->link($html->image('static/forum.gif', array('alt'=>__('See comments', true),'title'=>__('See comments', true))), '/admin/discussions/listing', null, false, false); 
    76?> 
    87<table class="tbadmin"> 
    98<?php 
    10  
    119$th = array(__('Edit', true), __('Title', true), __('Author', true), __('Status', true), __('Delete', true)); 
    1210echo $html->tableHeaders($th);   
     
    2523     
    2624endforeach; 
    27 ?> 
    28 </table> 
    2925 
    30 <?php  
     26echo '</table>'; 
     27 
    3128$t  = $html->div(null,$paginator->prev('« '.__('Previous', true). ' ',null,null,array('class'=>'disabled')),array('style'=>'width:100px;float:left')); 
    3229$t .= $html->div(null, $paginator->next(' '.__('Next', true). ' »', null, null, array('class' => 'disabled')),array('style'=>'width:100px;float:right')); 
  • trunk/app/views/quotes/admin_listing.ctp

    r610 r701  
    11<?php  
    2   echo $html->addCrumb('Control Panel', '/admin/entries/start');  
    3   echo $html->getCrumbs(' / ');  
     2 echo $html->addCrumb('Control Panel', '/admin/entries/start');  
     3 echo $html->getCrumbs(' / ');  
    44 
    5   echo $html->div('title_section', __('Quotes', true)); 
     5 echo $html->div('title_section', __('Quotes', true)); 
    66 
    7 echo $html->para(null, $html->link($html->image('actions/new.png', array('alt'=>'Add new quote','title'=>'Add new quote')), '#', array("onclick"=>"hU()"), false, false)); ?> 
     7 echo $html->para(null, $html->link($html->image('actions/new.png', array('alt'=>__('Add new', true),'title'=>__('Add new', true))), '#', array("onclick"=>"hU()"), false, false)); ?> 
    88 
    99<div id="trh" style="margin:0;padding:0;padding-left:40px;width:80%;display:none;"> 
     
    1212 <legend><?php __('New quote'); ?></legend> 
    1313   <?php  
    14    echo $form->input('Quote.quote', array("size" => 60, "maxlength"=>130)); 
     14   echo $form->input('Quote.quote', array('size'=> 60, 'maxlength'=>130)); 
    1515   echo $form->error('Quote.quote', 'A quote is required.');  
    1616    
     
    2121   <div style="clear:both"></div> 
    2222</fieldset> 
    23   <?php echo $form->end('Save'); ?> 
     23  <?php echo $form->end(__('Save', true)); ?> 
    2424 
    2525</div> 
  • trunk/app/views/users/admin_edit.ctp

    r686 r701  
    44 echo $javascript->link('myfunctions');  
    55 
    6  if ($this->data["User"]["id"] != $session->read('Auth.User.id')): 
    7      die('Error'); 
     6 if ($this->data['User']['id'] != $session->read('Auth.User.id')): 
     7     echo $this->getSupport(); 
    88 endif; 
    99 
     
    1515<fieldset> 
    1616<?php 
    17    
    18   echo '<legend>'.$session->read('Auth.User.username') .'\'s account</legend>'; 
    19   echo $form->input('User.pwd', array('size'=>9, 'maxlength'=>9, 'value'=>'', 'label'=>__('Password', true))) . '  '.__('Left empty if you do not want to change', true); 
    20   echo $html->para(null, '<br />');  
     17  
     18  echo '<legend>'.$session->read('Auth.User.username') .'\'s '.__('profile', true).'</legend>'; 
    2119   
    2220  echo $form->input('User.name', array('size' => 35, 'maxlength'=>50));  
    23   echo $form->error('User.name', 'A name is required.'); 
    2421   
    2522  echo $form->input('User.email', array('size' => 30, 'maxlength'=>50)); 
    26   echo $form->error('User.email', 'An email is required.');  
    2723   
    28   echo $form->label('User.layout', __('Layout',true).': ');  
     24  echo $form->label('User.layout', __('Layout',true));  
    2925  $styles = array('rubyx'=>'Rubyx', 'school'=>'School', 'paris'=>'Paris', 'basic'=>'Basic'); 
    3026  echo $form->select('User.layout', $styles, null, null, false); 
    3127   
    32   echo $form->label('User.cv', __('Profile',true) ); 
     28  echo $form->label('User.cv', __('profile',true) ); 
    3329  echo $form->textarea('User.cv', array('cols' => 70, 'rows' => 7)); 
    3430   
    3531  echo $form->input('User.quote', array('size' => 70, 'maxlength' => 150, 'label'=>__('Quote', true))); 
    3632   
    37   echo $form->input('User.name_blog', array('size' => 45, 'maxlength' => 150));  
     33  echo $form->input('User.name_blog', array('size' => 45, 'maxlength' => 150, 'label'=>__('eduBlog name', true)));  
    3834    
    3935  echo $form->label('User.newsletter', __('Subscribe to newsletter', true).': '); 
    4036  echo $form->checkbox('User.newsletter', array('value' => 1));  
     37 
     38  echo $html->div(null, $form->input('User.pwd', array('size'=>9, 'maxlength'=>9, 'value'=>'', 'label'=>__('Password', true))) . '  '.__('Left empty if you do not want to change', true), array('style'=>'clear:both;margin:25px 0 16px 0;')); 
    4139   
    4240  echo $form->end(__('Save', true));