Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkFormIsCorrect() {
- if (!$('div.has-error').length > 0) {
- return displayAlertify('confirm',
- 'Confirme todos os dados antes de submeter');
- }
- return false;
- }
- function displayAlertify(message) {
- /* escopo anterior */
- alertify.confirm(message, function(e) {
- /* novo escopo */
- if (e) {
- /* retorna para onde foi chamado */
- return true;
- } else
- /* retorna para onde foi chamado */
- return false;
- });
- }
- function checkFormIsCorrect() {
- if ($('div.has-error').length <= 0) {
- displayAlertify('confirm', 'Confirme todos os dados antes de submeter');
- }
- /* break */
- return false;
- }
- function displayAlertify(message) {
- alertify.confirm(message, function(e) {
- /* submete o formulário */
- if (e) $('form')[0].submit();
- });
- }
- function checkFormIsCorrect() {
- if (!$('div.has-error').length > 0) {
- displayAlertify('confirm',
- 'Confirme todos os dados antes de submeter');
- }
- return false;
- }
- function displayAlertify(type, message) {
- alertify.confirm(message, function(e) {
- if (e) $('form')[0].submit();
- e.preventDefault();
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement