Skip to content

Commit

Permalink
More fixes for #165 - added username field
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Jun 15, 2015
1 parent f25b90e commit f42540f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 15 deletions.
2 changes: 1 addition & 1 deletion app/config/version.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
return array (
'app_version' => 'v1.2.7-master',
'hash_version' => 'v1.2.7-master-46-gd0189fb',
'hash_version' => 'v1.2.7-master-50-gfdef266',
);
29 changes: 22 additions & 7 deletions app/views/backend/users/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,34 @@
</div>
</div>


<!-- Username -->
<div class="form-group {{ $errors->has('username') ? 'has-error' : '' }}">
<label class="col-md-3 control-label" for="username">@lang('admin/users/table.username') <i class='fa fa-asterisk'></i></label>
<div class="col-md-7">
<input class="form-control" type="text" name="username" id="username" value="{{{ Input::old('username', $user->username) }}}" {{ ((Config::get('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }}>
@if (Config::get('app.lock_passwords') && ($user->id))
<p class="help-block">@lang('admin/users/table.lock_passwords')</p>
@endif

{{ $errors->first('username', '<br><span class="alert-msg">:message</span>') }}
</div>
</div>

<!-- Email -->
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
<label class="col-md-3 control-label" for="email">@lang('admin/users/table.email') <i class='fa fa-asterisk'></i></label>
<label class="col-md-3 control-label" for="email">@lang('admin/users/table.email') </label>
<div class="col-md-7">
<input class="form-control" type="text" name="email" id="email" value="{{{ Input::old('email', $user->email) }}}" {{ ((Config::get('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }}>
@if (Config::get('app.lock_passwords') && ($user->id))
@if (Config::get('app.lock_passwords') && ($user->id))
<p class="help-block">@lang('admin/users/table.lock_passwords')</p>
@endif

{{ $errors->first('email', '<br><span class="alert-msg">:message</span>') }}
</div>
</div>


<!-- Employee Number -->
<div class="form-group {{ $errors->has('employee_num') ? 'has-error' : '' }}">
<label class="col-md-3 control-label" for="employee_num">@lang('admin/users/table.employee_num')</label>
Expand Down Expand Up @@ -152,7 +167,7 @@
</label>
<div class="col-md-5">
<input type="password" name="password_confirm" id="password_confirm" class="form-control" value="" {{ ((Config::get('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }}>
@if (Config::get('app.lock_passwords') && ($user->id))
@if (Config::get('app.lock_passwords') && ($user->id))
<p class="help-block">@lang('admin/users/table.lock_passwords')</p>
@endif
{{ $errors->first('password_confirm', '<br><span class="alert-msg">:message</span>') }}
Expand Down Expand Up @@ -193,7 +208,7 @@
</div>
</div>
</div>

<!-- Notes -->
<div class="form-group {{ $errors->has('notes') ? ' has-error' : '' }}">
<label for="notes" class="col-md-3 control-label">@lang('admin/users/table.notes')</label>
Expand Down Expand Up @@ -226,7 +241,7 @@
</div>
</div>
</div>

<!-- Email user -->
@if (!$user->id)
<div class="form-group">
Expand All @@ -249,8 +264,8 @@
<div class="row form-wrapper">
<div class="col-md-12 column">
<br><br>
@if (Config::get('app.lock_passwords') && ($user->id))

@if (Config::get('app.lock_passwords') && ($user->id))
<p class="help-block">@lang('admin/users/table.lock_passwords')</p>
@endif

Expand Down
14 changes: 7 additions & 7 deletions app/views/backend/users/import.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
@endif

<p>
Upload a CSV file with one or more users. Passwords will be auto-generated. The CSV should have the <strong>first</strong> fields as: <strong>firstName,lastName,email</strong>. Any additional fields to the right of those fields will be ignored.
Upload a CSV file with one or more users. Passwords will be auto-generated. The CSV should have the <strong>first</strong> fields as: <strong>firstName,lastName,username,email</strong>. Any additional fields to the right of those fields will be ignored. Email is optional, however users will not be able to recover their passwords or receive EULAs if you do not provide an email address.
</p>

<div class="form-group {{ $errors->first('user_import_csv', 'has-error') }}">
Expand All @@ -47,7 +47,7 @@
<input type="file" name="user_import_csv" id="user_import_csv">
</div>
</div>

<!-- Has Headers -->
<div class="form-group">
<div class="col-sm-2 ">
Expand All @@ -56,17 +56,17 @@
{{ Form::checkbox('has_headers', '1', Input::old('has_headers')) }} This CSV has a header row
</div>
</div>


<!-- Email user -->
<div class="form-group">
<div class="col-sm-2 ">
</div>
<div class="col-sm-5">
{{ Form::checkbox('email_user', '1', Input::old('email_user')) }} Email these users their credentials?
{{ Form::checkbox('email_user', '1', Input::old('email_user')) }} Email these users their credentials? (Only possible where email address is included with user data.)
</div>
</div>

<!-- Activate -->
<div class="form-group">
<div class="col-sm-2 ">
Expand All @@ -76,7 +76,7 @@
</div>
</div>



</div>
</div>
Expand Down Expand Up @@ -108,4 +108,4 @@
});
</script>
@stop
@stop

0 comments on commit f42540f

Please sign in to comment.