Project

General

Profile

GX-Bug #66420

Validierung überarbeiten (Gambio Installer)

Added by Timo Backhaus 3 months ago. Updated 3 months ago.

Status:
Gemeldet
Priority:
Normal
Assigned To:
-
Category:
Installer
Target version:
% Done:

0%

Estimated time:
Steps to reproduce:
Betroffene Versionen:
4.0.0.1
Release Notes Langtext:
Tags:
Fix
Story points-Velocity based estimate-

Description

Vorauswahl des Geschlechts definieren

src/gambio_installer/index.php

<input type="radio" value="m" name="GENDER" checked="checked" /> <?php echo LABEL_MALE; ?>

Längenprüfung der Straße auf 5 setzen (passend zur Backend Validierung)

src/gambio_installer/index.php

<div class="form-group">
                                <div class="row">
                                    <div class="col-xs-6">
                                        <input type="text" 
                                               class="input_field form-control input-lg"
                                               placeholder="<?php echo LABEL_STREET; ?>"
                                               name="STREET_ADRESS" 
                                               size="35" 
                                               value="" />
                                    </div>

                                    <span class="input_error col-xs-6"><?php echo ERROR_INPUT_MIN_LENGTH_5; ?></span>
                                </div>
                            </div>

src/gambio_installer/javascript/javascripts.js.php

if(!validate_input($('input[name="STREET_ADRESS"]').val(), 5))
    {
        $('input[name="STREET_ADRESS"]').removeClass('valid').addClass('invalid');
        $('input[name="STREET_ADRESS"]').closest('div.row').find('.input_error').show();
        t_valid = false;
    }
$('body').on('blur', 'input[name="STREET_ADRESS"]', function()
    {
        if(validate_input($(this).val(), 5))
        {
            $(this).removeClass('invalid').addClass('valid');
            $(this).closest('div.row').find('.input_error').hide();
        }
        else
        {
            $(this).removeClass('valid').addClass('invalid');
            $(this).closest('div.row').find('.input_error').show();
        }
    });

E-Mail Adressen von Leerzeichen befreien

src/gambio_installer/includes/create_account.php

$email_address = xtc_db_prepare_input(trim($_POST['EMAIL_ADRESS']));
$email_from = xtc_db_prepare_input(trim($_POST['EMAIL_ADRESS_FROM']));

Error Handling beim Speichern des Formulars

src/gambio_installer/includes/create_account.php

if ($error == false) {
...
}else{
        die('validation error');
    }

History

#1

Updated by Timo Backhaus 3 months ago

  • Description updated (diff)
#2

Updated by Timo Backhaus 3 months ago

  • Description updated (diff)
#3

Updated by Timo Backhaus 3 months ago

  • Description updated (diff)
#4

Updated by Timo Backhaus 3 months ago

  • Description updated (diff)

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 5 MB)