Customer portal : Finally translated form validation messages !

SVN:trunk[4071]
This commit is contained in:
Guillaume Lajarige
2016-05-12 10:47:38 +00:00
parent 4c9edf04dd
commit 1693f73742
19 changed files with 93 additions and 5 deletions

View File

@@ -0,0 +1,32 @@
<?php
// Copyright (C) 2010-2016 Combodo SARL
//
// This file is part of iTop.
//
// iTop is free software; you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// iTop is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with iTop. If not, see <http://www.gnu.org/licenses/>
namespace Combodo\iTop\Form\Field;
use \Combodo\iTop\Form\Field\TextField;
/**
* Description of PasswordField
*
* @author Guillaume Lajarige <guillaume.lajarige@combodo.com>
*/
class PasswordField extends TextField
{
}

View File

@@ -30,6 +30,6 @@ class IntegerValidator extends Validator
{
const VALIDATOR_NAME = 'integer';
const DEFAULT_REGEXP = '^[0-9]+$';
const DEFAULT_ERROR_MESSAGE = 'TOTR: MUST NOT BE AN INTEGER MESSAGE';
const DEFAULT_ERROR_MESSAGE = 'Core:Validator:MustBeInteger';
}

View File

@@ -32,6 +32,6 @@ class MandatoryValidator extends Validator
{
const VALIDATOR_NAME = 'mandatory';
const DEFAULT_REGEXP = '.*\S.*';
const DEFAULT_ERROR_MESSAGE = 'TOTR: MANDATORY MESSAGE';
const DEFAULT_ERROR_MESSAGE = 'Core:Validator:Mandatory';
}

View File

@@ -30,6 +30,6 @@ class NotEmptyExtKeyValidator extends Validator
{
const VALIDATOR_NAME = 'notemptyextkey';
const DEFAULT_REGEXP = '^[1-9]+$';
const DEFAULT_ERROR_MESSAGE = 'TOTR: MUST SELECT ONE';
const DEFAULT_ERROR_MESSAGE = 'Core:Validator:MustSelectOne';
}

View File

@@ -28,7 +28,7 @@ class Validator
{
const VALIDATOR_NAME = 'expression';
const DEFAULT_REGEXP = '';
const DEFAULT_ERROR_MESSAGE = 'TOTR: Core:Validator:Default';
const DEFAULT_ERROR_MESSAGE = 'Core:Validator:Default';
protected $sRegExp;
protected $sErrorMessage;