BUG 10322 No es posible combinar Select con Self service SOLVED
- The validation was incorrect with this combination - Fix validation for this combination
This commit is contained in:
@@ -144,7 +144,7 @@
|
|||||||
{if $PROCESS.ERROR eq '' && $PROCESS.ROU_TYPE neq 'SELECT' && ! $PROCESS.ROU_FINISH_FLAG }
|
{if $PROCESS.ERROR eq '' && $PROCESS.ROU_TYPE neq 'SELECT' && ! $PROCESS.ROU_FINISH_FLAG }
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" align="center">
|
<td colspan="2" align="center">
|
||||||
<input type="button" class='module_app_button___gray' name="btnContinue_{$id}" id="btnContinue" value="{$CONTINUE}" {$PROCESS.DISABLED} onclick="return clickButton(this);">
|
<input type="button" class='module_app_button___gray' name="btnContinue_{$id}" id="btnContinue" value="{$CONTINUE}" {$PROCESS.DISABLED} onclick="return clickButton(this);">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -177,13 +177,13 @@
|
|||||||
var rouType = '{$PROCESS.ROU_TYPE}';
|
var rouType = '{$PROCESS.ROU_TYPE}';
|
||||||
var userHidden = '{$data.NEXT_TASK.USR_HIDDEN_FIELD}';
|
var userHidden = '{$data.NEXT_TASK.USR_HIDDEN_FIELD}';
|
||||||
{literal}
|
{literal}
|
||||||
|
|
||||||
// option select
|
// option select
|
||||||
var optionSelect = "";
|
var optionSelect = "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name clickButton
|
* @name clickButton
|
||||||
* @description verify the option select in button
|
* @description verify the option select in button
|
||||||
* @access public
|
* @access public
|
||||||
* @param obj [object: button, submit]
|
* @param obj [object: button, submit]
|
||||||
* @return boolean
|
* @return boolean
|
||||||
@@ -210,7 +210,7 @@
|
|||||||
*/
|
*/
|
||||||
var disabledButton = function() {
|
var disabledButton = function() {
|
||||||
var submitsForm = document.getElementsByTagName("input");
|
var submitsForm = document.getElementsByTagName("input");
|
||||||
|
|
||||||
for (var i = 0 ; i <= submitsForm.length ; i++) {
|
for (var i = 0 ; i <= submitsForm.length ; i++) {
|
||||||
if (typeof(submitsForm[i]) != 'undefined' && submitsForm[i].type == 'button') {
|
if (typeof(submitsForm[i]) != 'undefined' && submitsForm[i].type == 'button') {
|
||||||
submitsForm[i].disabled = true;
|
submitsForm[i].disabled = true;
|
||||||
@@ -229,7 +229,7 @@
|
|||||||
*/
|
*/
|
||||||
var enabledButton = function() {
|
var enabledButton = function() {
|
||||||
var submitsForm = document.getElementsByTagName("input");
|
var submitsForm = document.getElementsByTagName("input");
|
||||||
|
|
||||||
for (var i = 0 ; i <= submitsForm.length ; i++) {
|
for (var i = 0 ; i <= submitsForm.length ; i++) {
|
||||||
if (typeof(submitsForm[i]) != 'undefined' && submitsForm[i].type == 'button') {
|
if (typeof(submitsForm[i]) != 'undefined' && submitsForm[i].type == 'button') {
|
||||||
submitsForm[i].disabled = false;
|
submitsForm[i].disabled = false;
|
||||||
@@ -252,14 +252,14 @@
|
|||||||
|
|
||||||
// verify type of derivation
|
// verify type of derivation
|
||||||
if (rouType == 'PARALLEL' || rouType == 'PARALLEL-BY-EVALUATION') {
|
if (rouType == 'PARALLEL' || rouType == 'PARALLEL-BY-EVALUATION') {
|
||||||
// verify all value select
|
// verify all value select
|
||||||
var selectsForm = document.getElementsByTagName("select");
|
var selectsForm = document.getElementsByTagName("select");
|
||||||
for (var i = 0 ; i <= selectsForm.length ; i++) {
|
for (var i = 0 ; i <= selectsForm.length ; i++) {
|
||||||
if (typeof(selectsForm[i]) != 'undefined') {
|
if (typeof(selectsForm[i]) != 'undefined') {
|
||||||
var vtext = new input(selectsForm[i]);
|
var vtext = new input(selectsForm[i]);
|
||||||
if (selectsForm[i].value == '') {
|
if (selectsForm[i].value == '') {
|
||||||
flagSelect = true;
|
flagSelect = true;
|
||||||
vtext.failed();
|
vtext.failed();
|
||||||
} else {
|
} else {
|
||||||
vtext.passed();
|
vtext.passed();
|
||||||
}
|
}
|
||||||
@@ -273,12 +273,15 @@
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var selectId = "form[TASKS]["+optionSelect+"][USR_UID]";
|
var selectId = "form[TASKS]["+optionSelect+"][USR_UID]";
|
||||||
|
|
||||||
if (typeof(document.getElementById(selectId)) != 'undefined' && document.getElementById(selectId) != null && userHidden == '') {
|
if (typeof(document.getElementById(selectId)) != 'undefined' && document.getElementById(selectId) != null && userHidden == '') {
|
||||||
var vtext = new input(document.getElementById(selectId));
|
var vtext = new input(document.getElementById(selectId));
|
||||||
|
|
||||||
// verify value select the option select
|
// verify value select the option select
|
||||||
if (document.getElementById(selectId).value == '') {
|
if (document.getElementById(selectId).value == '' &&
|
||||||
|
document.getElementById("form[TASKS]["+optionSelect+"][TAS_ASSIGN_TYPE]").value != 'SELF_SERVICE' &&
|
||||||
|
document.getElementById("form[TASKS]["+optionSelect+"][TAS_ASSIGN_TYPE]").value != 'SELF_SERVICE_EVALUATE'
|
||||||
|
) {
|
||||||
enabledButton();
|
enabledButton();
|
||||||
vtext.failed();
|
vtext.failed();
|
||||||
alert(G_STRINGS.ID_ASSIGN_CASE_TO_USER);
|
alert(G_STRINGS.ID_ASSIGN_CASE_TO_USER);
|
||||||
@@ -288,7 +291,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
{/literal}
|
{/literal}
|
||||||
setNestedProperty(this, Array('disabled'), 'true');
|
setNestedProperty(this, Array('disabled'), 'true');
|
||||||
|
|||||||
Reference in New Issue
Block a user