@extends('theme::template_login')

@section('title')
  <title>{{ inject('setting')->translate('shop', 'login') }}</title>
@stop

@section('content')
  <div class="login-title">{{ inject('setting')->translate('shop', 'login') }}</div>
  <form class="form-horizontal" method="POST" action="{{ url('member/login') }}">
    {{ csrf_field() }}
    <div class="form-group input-outer {{ $errors->has('username') ? ' has-error' : '' }}">
      <div class="input-txt">
        <i class="iconfont icon-yonghu"><img src="{{ themePath('images/username_icon.png') }}"></i>
        <input type="text" class="text login-input-placeholder" name="username" value="{{ old('username') }}" autocomplete="off" placeholder="{{ inject('setting')->translate('shop', 'username') }}">
      </div>
      @if ($errors->has('username'))
        <span class="help-block">
          <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
          <strong>{{ $errors->first('username') }}</strong>
        </span>
      @endif
    </div>

    <div class="form-group input-outer {{ $errors->has('password') ? ' has-error' : '' }}">
      <div class="input-txt">
        <i class="iconfont icon-yonghu"><img src="{{ themePath('images/pass_icon.png') }}"></i>
        <input type="password" class="text login-input-placeholder" name="password" value="{{ old('password') }}" autocomplete="off" placeholder="{{ inject('setting')->translate('shop', 'password') }}">
      </div>
      @if ($errors->has('password'))
        <span class="help-block">
          <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
          <strong>{{ $errors->first('password') }}</strong>
        </span>
      @endif
    </div>

    <button class="btn btn-block btn-login" type="submit">{{ inject('setting')->translate('shop', 'login') }}</button>

    <div class="form-group login-links">
      <a class="btn btn-link" href="{{ url('member/password/reset') }}">{{ inject('setting')->translate('shop', 'forget_password') }}</a> |
      <a class="btn btn-link" href="{{ url('member/register') }}">{{ inject('setting')->translate('shop', 'register') }}</a> |
      <a class="btn btn-link" href="{{ url('/') }}">{{ inject('setting')->translate('shop', 'home') }}</a>
    </div>
  </form>
@stop