Skip to content

Commit

Permalink
Added view builder to default auth views
Browse files Browse the repository at this point in the history
  • Loading branch information
mario-deluna committed Jul 12, 2014
1 parent 3809ef1 commit e33a91b
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 103 deletions.
4 changes: 2 additions & 2 deletions CCF/app/controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function action_sign_in()
// theme this allows us to have a diffrent sign_in for every theme.
// If the view does not exist in the theme it will load the view from
// the default view folder.
$this->view = $this->theme->view( 'auth/sign_in' );
$this->view = $this->theme->view( 'auth/sign_in.view' );

$this->view->last_identifier = CCIn::post( 'identifier' );

Expand Down Expand Up @@ -68,7 +68,7 @@ public function action_sign_up()
}

$this->theme->topic = __( ':action.topic' );
$this->view = $this->theme->view( 'auth/sign_up' );
$this->view = $this->theme->view( 'auth/sign_up.view' );

// create a new user object as data holder
$user = new User;
Expand Down
49 changes: 0 additions & 49 deletions CCF/app/views/auth/sign_in.php

This file was deleted.

48 changes: 48 additions & 0 deletions CCF/app/views/auth/sign_in.view.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{% use UI\Form; %}
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div class="row">
<div class="col-sm-offset-2 col-sm-10">
<h2>{{__( ':action.topic' )}}</h2>
</div>
</div>
<!-- sing in form -->
{{ Form::start( 'sign-in', array( 'method' => 'post', 'class' => 'form-horizontal' ) ) }}
<!-- identifier -->
<div class="form-group">
{{ Form::label( 'identifier', __( 'model/user.label.email' ) )->add_class( 'col-sm-2' ) }}
<div class="col-sm-10">
{{ Form::input( 'identifier', $last_identifier )
->placeholder( __( 'model/user.label.email' ) ) }}
</div>
</div>
<!-- password -->
<div class="form-group">
{{ Form::label( 'password', __( 'model/user.label.password' ) )->add_class( 'col-sm-2' ) }}
<div class="col-sm-10">
{{ Form::input( 'password', null, 'password' )
->placeholder( __( 'model/user.label.password' ) ) }}
</div>
</div>
<!-- remember me -->
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
{{ Form::checkbox( 'retain', __( 'model/user.label.retain' ), true ) }}
</div>
</div>
<!-- buttons -->
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary">{{__( ':action.topic' )}}</button>
</div>
</div>
{{ Form::end(); }}
</div>
</div>
50 changes: 0 additions & 50 deletions CCF/app/views/auth/sign_up.php

This file was deleted.

50 changes: 50 additions & 0 deletions CCF/app/views/auth/sign_up.view.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{% use UI\Form; %}
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div class="row">
<div class="col-sm-offset-2 col-sm-10">
<h2>{{__( ':action.topic' )}}</h2>
</div>
</div>
<!-- sing in form -->
{{ Form::start( 'sign-in', array( 'method' => 'post', 'class' => 'form-horizontal' ) ) }}
<!-- identifier -->
<div class="form-group">
{{ Form::label( 'email', __( 'model/user.label.email' ) )->add_class( 'col-sm-2' ); }}
<div class="col-sm-10">
{{ Form::input( 'email', $user->email, 'email' )
->placeholder( __( 'model/user.label.email' ) ); }}
</div>
</div>
<!-- password -->
<div class="form-group">
{{ Form::label( 'password', __( 'model/user.label.password' ) )->add_class( 'col-sm-2' ); }}
<div class="col-sm-10">
{{ Form::input( 'password', null, 'password' )
->placeholder( __( 'model/user.label.password' ) ); }}
</div>
</div>
<!-- password match -->
<div class="form-group">
{{ Form::label( 'password_match', __( 'model/user.label.password_match' ) )->add_class( 'col-sm-2' ); }}
<div class="col-sm-10">
{{ Form::input( 'password_match', null, 'password' )
->placeholder( __( 'model/user.label.password_match' ) ); }}
</div>
</div>
<!-- buttons -->
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary">{{__( ':action.submit' )}}</button>
</div>
</div>
{{ Form::end() }}
</div>
</div>
2 changes: 1 addition & 1 deletion CCF/app/views/welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
<br>
<strong>Environment: </strong><?php echo $environment; ?>

<hr>
<hr>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ClanCats Framework 2.0
[![Downloads](http://img.shields.io/packagist/dm/clancats/core.svg)](https://github.com/ClanCats/Framework)


ClanCats Framework, because your time is precious. HMVC PHP framework.
ClanCatsFramework, because your time is precious. HMVC PHP framework.

_This is the Application repository if you like to contribute take a look at the core repository:_ https://github.com/ClanCats/Core

Expand Down

0 comments on commit e33a91b

Please sign in to comment.