mirror of
https://github.com/fspc/Yellow-Bike-Database.git
synced 2026-10-15 03:46:07 -04:00
Improves start_shop, gets contacts ready for processing.
1) Slight improvements in UI with start_shop .. the date. 2) Adds deferred promise for contact.js.
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
||||
$(function(){
|
||||
|
||||
"use strict";
|
||||
|
||||
// sensible defaults
|
||||
$("#shop_date").mask("0000-00-00", {placeholder: "yyyy-mm-dd" });
|
||||
|
||||
|
||||
// error handler for shops with a popup dialog
|
||||
function error_handler(input,error_span,error,error_text,event) {
|
||||
var trans_error = 0;
|
||||
if ( input == error ) {
|
||||
if ( !error_span.is(":visible") ) {
|
||||
error_span.show();
|
||||
}
|
||||
error_span.html(error_text);
|
||||
trans_error = 1;
|
||||
} else {
|
||||
trans_error = 0;
|
||||
error_span.hide();
|
||||
}
|
||||
|
||||
if (trans_error) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
return trans_error;
|
||||
|
||||
} // end error_handling function
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user