Skip to content

Commit

Permalink
Merge pull request #119 from flipside-org/feature-issue_fixing
Browse files Browse the repository at this point in the history
Feature issue fixing
  • Loading branch information
olafveerman committed Jun 11, 2014
2 parents 60689c3 + 8557b97 commit 394d9ef
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 2 additions & 0 deletions application/controllers/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ protected function _add_account() {
$this->form_validation->set_rules('user_new_password', 'Password', 'trim|required|min_length[8]');
$this->form_validation->set_rules('user_roles', 'Roles', 'callback__cb_check_roles');
$this->form_validation->set_rules('user_status', 'Status', 'callback__cb_check_status');
// To be picked up by the validation object needs a rule, even if empty.
$this->form_validation->set_rules('user_notify', 'Notify');

$this->form_validation->set_error_delimiters('<small class="error">', '</small>');

Expand Down
11 changes: 4 additions & 7 deletions application/views/users/user_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@
<?= form_label('Password <small>Required</small>', 'user_new_password'); ?>
<?php endif; ?>
<?= form_password('user_new_password', '', 'id="user_new_password"'); ?>
<?php if($action != 'add'): ?>
<p class="help-text">If you would like to change the password type a new one. Otherwise leave this blank.</p>
<?php endif; ?>
<p class="help-text">Hint: The password should be at least eight characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! &quot; ? $ % &circ; &amp; ).</p>
<?= form_error('user_new_password'); ?>
</div>
Expand Down Expand Up @@ -108,7 +110,7 @@
<?php foreach ($this->config->item('roles') as $key => $role_name): ?>
<?php $checked_role = isset($user) ? $user->has_role($key) : FALSE; ?>
<label class="inline-label">
<?= form_checkbox('user_roles[]', $key, set_value('user_roles', $checked_role)); ?> <?= $role_name; ?>
<?= form_checkbox('user_roles[]', $key, set_select('user_roles', $key, $checked_role)); ?> <?= $role_name; ?>
</label>
<?php endforeach; ?>
<?= form_error('user_roles'); ?>
Expand All @@ -127,7 +129,7 @@
<fieldset class="contained">
<div class="form-control">
<label class="inline-label">
<?= form_checkbox('user_notify', 'notify'); ?> Notify user about account creation.
<?= form_checkbox('user_notify', 'notify', set_checkbox('user_notify', 'notify', FALSE)); ?> Notify user about account creation.
</label>
<p class="help-text">If checked an email will be sent to the user with the login data.</p>
</div>
Expand All @@ -136,11 +138,6 @@
</div>
<?php endif; ?>






<?= form_button(array(
'type' => 'submit',
'name' => 'user_submit',
Expand Down
2 changes: 1 addition & 1 deletion src/styles/aw_enketo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6218,7 +6218,7 @@ legend ~ .option-wrapper > label .active {
}

.option-wrapper input[type=radio], .option-wrapper input[type=checkbox] {
background: url("../../images/checkradio.png") no-repeat;
background: url("../libs/enketo-core/images/checkradio.png") no-repeat;
cursor: pointer;
-webkit-appearance: none;
-moz-background-position-x: -9999px -9999px !important;
Expand Down

0 comments on commit 394d9ef

Please sign in to comment.