Added standard fields, login/reset display improvements

This commit is contained in:
Deon George
2016-08-18 12:34:53 +10:00
parent a7616960f0
commit 2b48dde8f7
14 changed files with 155 additions and 182 deletions

35
views/field/account.php Normal file
View File

@@ -0,0 +1,35 @@
<!-- field = field name -->
<!-- text = field text -->
<!-- value = array of values -->
<!-- name = account name -->
<!-- ajaxurl = ajax URL -->
<div class="form-group">
<label for="<?php echo $data['field']; ?>_label" class="col-md-2 control-label"><?php echo $data['text']; ?></label>
<div class="input-group col-md-4">
<input type="text" id="<?php echo $data['field']; ?>_label" value="<?php echo $data['name']; ?>" class="form-control" autocomplete="off" placeholder="<?php echo $data['text']; ?>">
<span class="input-group-addon"><i class="fa fa-refresh" name="account_lookup"></i></span>
</div>
<input type="hidden" name="<?php echo $data['field']; ?>" value="<?php echo $data['value']; ?>">
</div>
<?php
Script::factory()
->type('stdin')
->data('
$(document).ready(function() {
$("input[id=account_id_label]").typeahead({
minLength: 2,
source: function (query,process) {
search("'.$data['ajaxurl'].'",query,process,"account_lookup");
},
matcher: function () { return true; },
updater: function (item) {
$("input[name=account_id]").val(users[item]).trigger("change");
return item;
},
});
});');
?>