~jfb-tempo-consulting/unifield-web/py3-int

« back to all changes in this revision

Viewing changes to addons/openerp/controllers/templates/index.mako

  • Committer: jf
  • Date: 2023-08-17 11:45:31 UTC
  • mfrom: (5008.1.49 unifield-web)
  • Revision ID: jfb@tempo-consulting.fr-20230817114531-jvmqc8nl6yezmhnn
[MERGE] UF30.0rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
313
313
        <div id="survey">
314
314
                <div id="survey_title">${_('Please fill your email address')}</div>
315
315
                 <div class="row">
316
 
                  <div class="column" style="width: 50%">Email: <input type="text" id="email" /></div>
 
316
                  <div class="column" style="width: 50%">Email: <input type="email" id="email" /></div>
317
317
                  <div class="column"><div class="survey_button" onclick="click_email_answer('goto')">${_('Save email')}</div></div>
318
318
                </div>
319
319
                 <div class="row">
335
335
            });
336
336
            function click_email_answer(answer) {
337
337
                if (answer=='goto') {
338
 
                    jQuery.post('/openerp/pref/save_email', {'email': jQuery('#email').val()});
 
338
                    email_field = jQuery('#email')
 
339
                    if (!email_field[0].checkValidity()) {
 
340
                        alert(_('Invalid Email address'));
 
341
                        return false;
 
342
                    }
 
343
                    jQuery.post('/openerp/pref/save_email', {'email': email_field.val()});
339
344
                } else if (answer=='later') {
340
345
                    jQuery.post('/openerp/pref/email_update_nb');
341
346
                } else if (answer=='never') {