Changeset 907a0bad7bc78fb0dfa42ae4e77417288294d680

Show
Ignore:
Timestamp:
08/08/11 09:41:24 (10 months ago)
Author:
Xemle <xemle@phtagr.org>
Children:
9cf25c2b09c8670755ad77c3494075bc19cafca8
Parents:
a151cadb204796478796e90e9f8e96e679cc66a0
git-committer:
Xemle <xemle@phtagr.org> / 2011-08-08T09:41:24Z+0200
Message:

Improve login and register form

Files:
6 modified

Legend:

Unmodified
Added
Removed
  • controllers/users_controller.php

    ra151cad r907a0ba  
    443443    unset($this->data['User']['confirm']); 
    444444    unset($this->data['Captcha']['verification']); 
     445    $this->layout = 'default'; 
    445446  } 
    446447 
  • views/elements/explorer/menu.ctp

    r163132b r907a0ba  
    7878<?php  
    7979  $url = $breadcrumb->params($crumbs); 
    80   echo $form->create(null, array('id' => 'explorer', 'action' => 'edit/'.$url)); 
     80  echo $form->create(null, array('id' => 'explorer', 'action' => 'edit/'.$url, 'class' => 'explorer-menu')); 
    8181?> 
    8282<div id="p-explorer-edit-meta"> 
  • views/layouts/default.ctp

    r9c42fba r907a0ba  
    3232<div id="main"><div class="sub"> 
    3333 
    34 <div id="content"><div class="sub"> 
     34<div id="content content-<?php echo $this->params['controller']; ?>"><div class="sub"> 
    3535<?php echo $content_for_layout?> 
    3636</div></div><!-- #content/sub --> 
  • views/users/login.ctp

    ra151cad r907a0ba  
    99?> 
    1010</fieldset> 
     11<div class="submit"> 
    1112<?php  
    1213  $signup = ''; 
    13   echo $form->submit(__('Login', true)); 
    14   echo $html->link(__('Forgot your password', true), 'password'); 
     14   
     15  echo $form->submit(__('Login', true), array('div' => false)); 
    1516  if ($register) { 
    16     echo $html->link(__('Sign Up', true), 'register'); 
     17    echo " ".$html->link(__('Sign Up', true), 'register', array('class' => 'button'))." "; 
    1718  } 
     19  echo "<br/>".$html->link(__('Forgot your password', true), 'password'); 
     20?> 
     21</div> 
     22<?php  
    1823  echo $form->end(); 
    1924  $script = <<<'JS' 
     
    2126  $(document).ready(function() { 
    2227    $(':submit').button(); 
     28    $('.button').button(); 
    2329    $('.message').addClass("ui-widget ui-corner-all ui-state-highlight"); 
    2430  }); 
  • views/users/register.ctp

    r2b78924 r907a0ba  
    11<?php echo $session->flash(); ?> 
    22 
    3 <?php echo $form->create('User', array('action' => 'register')); ?> 
     3<?php echo $form->create('User', array('action' => 'register', 'class' => 'default')); ?> 
    44<fieldset> 
    55<legend><?php __('Create Account'); ?></legend> 
     
    1313?> 
    1414</fieldset> 
    15 <?php echo $form->end(__('Sign Up', true)); ?> 
     15<?php  
     16  echo $form->end(__('Sign Up', true));  
    1617 
     18  $script = <<<'JS' 
     19(function($) { 
     20  $(document).ready(function() { 
     21    $(':submit').button(); 
     22    $('.message').addClass("ui-widget ui-corner-all ui-state-highlight"); 
     23  });  
     24})(jQuery); 
     25JS; 
     26  echo $this->Html->scriptBlock($script, array('inline' => false)); 
     27?> 
  • webroot/css/default/_form.sass

    ra151cad r907a0ba  
    1616    background-color: #ffd 
    1717 
    18 =default-button 
    19   border: 1px solid #ddd 
    20   +border-radius(5px) 
    21   padding: 5px 15px 
    22   +linear-gradient(colour-stops(#eee, darken(#eee, 20%))) 
    23   color: #666 
    24   +text-shadow(white, 1px, 1px) 
    25   &:hover 
    26     background-color: $menuActiveBackgroundColor 
    27     +linear-gradient(colour-stops($menuActiveBackgroundColor, darken($menuActiveBackgroundColor, 20%))) 
    28     color: white 
    29     +text-shadow(black, -1px, -1px) 
    30     border-color: darken($menuActiveBackgroundColor, 20%)P 
     18form.default 
     19  margin: 10px 0 
     20  fieldset 
     21    legend 
     22      padding: 20px 0 10px 240px 
     23      font-size: 15pt 
     24    border: 0 
     25    > div 
     26      clear: left 
     27      label 
     28        +column(6) 
     29        margin-top: 15px 
     30        text-align: right 
     31      input 
     32        +column(6, true) 
     33        +default-input 
     34        font-size: 15pt 
     35        width: 224px 
     36        margin-top: 10px 
     37      > img 
     38        margin-top: 12px 
     39      > .error 
     40        clear: left 
     41        +prepend(6) 
     42        +column(6, true) 
     43        margin-top: 3px 
     44  div.submit 
     45    +prepend(6) 
     46    margin-top: 15px 
    3147 
    32 form 
    33   > fieldset, > div > fieldset 
    34     padding: 15px 0 
     48form.explorer-menu 
     49  fieldset 
     50    +column(12, true) 
     51    padding: 5px 0 
    3552    border: 0 
    36     > legend 
    37       color: white 
    38       +column(6, true) 
    39       font-family: Ubuntu-bold 
    40       text-align: right 
     53    legend 
     54      display: none  
    4155    > div 
    42       padding: 5px 0 
    43       position: relative 
    44       clear: both 
    45       > label 
     56      label 
    4657        +column(6) 
     58        margin-top: 12px 
    4759        text-align: right 
    48       > input[type=text], > input[type=password], > textarea 
    49         +column(6) 
     60      input[type=text], textarea 
     61        +column(6, true) 
     62        margin-top: 10px 
     63        width: 224px 
    5064        +default-input 
    51       > select 
    52         +column(6) 
     65      select 
     66        margin-top: 10px 
     67        +column(6, true) 
     68        display: inline-block 
    5369        +default-input 
    54         > option 
    55           padding: 3px 
     70        option 
     71          padding: 13px 
    5672          color: black 
    57       &.checkbox  
    58         > input[type=checkbox] 
    59           float: left 
    60           display: block 
    61           overflow: hidden 
    62           margin-left: 240px 
    63           margin-right: 10px 
    64           width: 40px 
    65         > label 
    66           width: 210px 
    67           text-align: left 
    68       > div.description 
     73      > div.description, > div.error 
     74        margin-top: 2px 
     75        +prepend(6) 
    6976        +column(6, true) 
    70       > div.error 
    71         clear: both 
    72         +prepend(6) 
    73         +column(12, true) 
    7477    > div.error 
    7578      background: darken(red, 30%) 
    76   > ul.buttons, > div > ul.buttons  
    77     +prepend(6) 
    78     > li  
    79       display: inline-block 
    80       margin-right: 10px 
    81       > input 
    82   > .submit, > div > .submit 
     79  div.submit 
     80    clear: left 
    8381    +prepend(6) 
    8482 
    8583form.login 
     84  +prepend(9) 
    8685  +column(6) 
    87   +prepend(8) 
    8886  margin: 20px 0 30px 0 
    89   legend 
    90     text-align: left 
    91     margin: 0 
    92     font-size: 15pt 
    9387  fieldset 
     88    border: none 
     89    legend 
     90      text-align: left 
     91      padding-bottom: 20px 
     92      margin: 0 
     93      font-size: 15pt 
     94    > div 
     95      display: block 
     96      margin-top: 5px 
     97      margin-bottom: 10px 
    9498    label 
    95       +column(6) 
     99      +span(6, true) 
     100      clear: left 
    96101      text-align: left 
    97102    input[type=text], 
    98103    input[type=password] 
     104      +span(6, true) 
     105      +default-input 
     106      margin-top: 3px 
    99107      padding: 4px 
    100108      clear: left 
     
    102110  > div.submit 
    103111      display: inline-block 
    104       padding: 0 10px 0 0 
     112      a.button, 
    105113      input[type=submit] 
     114        margin-right: 10px 
     115        margin-bottom: 5px 
     116        vertical-align: top 
     117        margin-right: 10px