Added a Sales Sheet page along with other changes.

This commit is contained in:
Wynne Crisman
2017-05-09 13:51:26 -07:00
parent 184ce1133f
commit e1b0b19589
39 changed files with 3581 additions and 5610 deletions

View File

@@ -32,6 +32,11 @@
* validate(fn) - Forces validation to occur and takes an optional callback which will be passed a flag (boolean) indicating the success of the validation (isValid).
* reset() - Resets the form's validation status. Clears all error information, without turning validation off.
* update() - Updates the collection of fields that require validation. Call this after making changes to the form, including initializing any form elements that may generate HTML (such as Select2).
*
* Notes:
* To handle decimal values "0.05", you need to add `step='0.01'` or similar to the input field.
* To get the validator to validate a field, you must add `required` to the property list: `<input type='text' required/>`
* I have modified this to not require a form-group or form-input classed container. If one is found, then the container will be used to mark for errors and success, otherwise the field element will be marked instead. Example: `<div class='form-group'><input type='text' required/></div>`
*/
+function ($) {
@@ -372,8 +377,11 @@
$block.empty().append(errors);
//Add the 'has-error' and 'has-danger' classes to the grouping.
$group.addClass('has-error has-danger');
if($group.length > 0)
//Add the 'has-error' and 'has-danger' classes to the grouping.
$group.addClass('has-error has-danger');
else
$el.addClass('has-error has-danger');
//If this is a select2 control then look for the child of a sibling that has the .select2-selection class and use it instead.
if($el.hasClass('select2-hidden-accessible')) {
@@ -395,7 +403,11 @@
var $feedback = $group.find('.form-control-feedback');
$block.html($block.data('bs.validator.originalContent'));
$group.removeClass('has-error has-danger has-success');
if($group.length > 0)
$group.removeClass('has-error has-danger has-success');
else
$el.removeClass('has-error has-danger has-success');
//Clean the sibling controls for select2.
$el.parent().find('.select2 .select2-selection').removeClass('has-error has-danger has-success');