BUG 7167 Validation in the name of the process to create and modify processes.

This commit is contained in:
Hector Cortez
2011-10-12 16:22:50 -04:00
parent c8bafbdd63
commit d243736f73
2 changed files with 9 additions and 0 deletions

View File

@@ -430,6 +430,7 @@ function newProcess(){
fieldLabel: _('ID_TITLE'),
xtype:'textfield',
width: 260,
maskRe: /^(?!^(PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\..*)(\..+)?$)[^\x00-\x1f\\?*:\";|/]+$/i,
allowBlank: false
}, {
id: 'PRO_DESCRIPTION',

View File

@@ -63,6 +63,14 @@ var verifyProcessInformation = function(oForm) {
oAux.focus();
bContinue = false;
}
var regExp = /^(?!^(PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\..*)(\..+)?$)[^\x00-\x1f\\?*:\";|/]+$/;
if (oAux.value.search(regExp)==-1) {
alert('@G::LoadTranslation(ID_INVALID_PROCESS_NAME)');
oAux.focus();
bContinue = false;
}
if (bContinue) {
ajax_post(oForm.action, oForm, 'POST');
Pm.data.db.title.label = Pm.data.db.title.object.elements.label.innerHTML = getField('PRO_TITLE').value.escapeHTML();