/
var
/
www
/
html
/
sugar13-old
/
modules
/
WorkFlowTriggerShells
/
Upload File
HOME
<!-- /* * Your installation or use of this SugarCRM file is subject to the applicable * terms available at * http://support.sugarcrm.com/Resources/Master_Subscription_Agreements/. * If you do not agree to all of the applicable terms or do not have the * authority to bind the entity as an authorized representative, then do not * install or use this SugarCRM file. * * Copyright (C) SugarCRM Inc. All rights reserved. */ --> <!-- BEGIN: main --> <script> function updatetriggerview(name, field_name){ var show_past = document.getElementById('show_past').checked; document.getElementById(name).src = 'index.php?module=WorkFlowTriggers&action=TriggerView&sugar_body_only=true&form=TriggerView&form_submit=false&record={ID}&base_module={BASE_MODULE}&workflow_type={WORKFLOW_TYPE}&show_past=' + show_past + '&field_name=' + document.getElementById(field_name).options[document.getElementById(field_name).selectedIndex].value; } function togglepast(){ if(document.getElementById('modify_past_div_value').value=="Yes"){ this.document.getElementById('modify_past_div').style.display='' }else{ this.document.getElementById('modify_past_div').style.display='none' } //end function togglepast } function get_trigger_info(){ var iframe_object = window.frames['triggeriframe'].document; if(document.EditView.show_past.checked==true){ document.EditView.past__field_type.value = iframe_object.getElementById('past__field_type').value; document.EditView.past__operator.value = iframe_object.getElementById('past__operator').value; if(document.EditView.past__operator.value=='in'){ parse_multi_array(iframe_object.getElementById('past__field_value_multi'), 'past__field_value'); } else { document.EditView.past__field_value.value = iframe_object.getElementById('past__field_value').value; } } document.EditView.future__field_type.value = iframe_object.getElementById('future__field_type').value; document.EditView.future__operator.value = iframe_object.getElementById('future__operator').value; if(iframe_object.getElementById('future__field_value')!=undefined){ if(document.EditView.future__operator.value=='in'){ parse_multi_array(iframe_object.getElementById('future__field_value_multi'), 'future__field_value'); } else { document.EditView.future__field_value.value = iframe_object.getElementById('future__field_value').value; } //end if future__field_value is even an object } if(iframe_object.getElementById('time_int')!=undefined){ document.EditView.time_int.value = iframe_object.getElementById('time_int').value; } document.EditView.submit(); //end function get_trigger_info } function parse_multi_array(temp_array, new_field){ //var new_field = new_field; var temp_array = temp_array; var new_value = ''; for (var i=0, l=temp_array.length;i<l;i++) { if (temp_array.options[i].selected){ if(new_value==''){ new_value = temp_array.options[i].value; } else { new_value +='^,^' + temp_array.options[i].value; } } } document.getElementById(new_field).value = new_value; //end function parse_multi_array } </script> <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr> <form name="EditView" method="POST" action="index.php"> {sugar_csrf_form_token} <input type="hidden" name="module" value="WorkFlowTriggerShells"> <input type="hidden" name="record" value="{ID}"> <input type="hidden" name="action"> <input type="hidden" name="parent_id" value="{PARENT_ID}"> <input type="hidden" name="return_module" value="{RETURN_MODULE}"> <input type="hidden" name="return_id" value="{RETURN_ID}"> <input type="hidden" name="return_action" value="{RETURN_ACTION}"> <td><input title="{APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="this.form.action.value='Save'; get_trigger_info();" type="button" name="button" value=" {APP.LBL_SAVE_BUTTON_LABEL} " > <input title="{APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value='{RETURN_ACTION}'; this.form.module.value='{RETURN_MODULE}'; this.form.record.value='{RETURN_ID}'" type="submit" name="button" value=" {APP.LBL_CANCEL_BUTTON_LABEL} "></td> <td align="right" nowrap><span class="required">{APP.LBL_REQUIRED_SYMBOL}</span> {APP.NTC_REQUIRED}</td> <td align='right'>{ADMIN_EDIT}</td> </tr> </table> <input type="hidden" id='modify_past_div_value' name="modify_past_div_value" value="{MODIFY_PAST_DIV}"> <input type="hidden" name="past__field_type" value=""> <input type="hidden" name="past__operator" value=""> <input type="hidden" id="past__field_value" name="past__field_value" value=""> <input type="hidden" name="future__field_type" value=""> <input type="hidden" name="future__operator" value=""> <input type="hidden" id="future__field_value" name="future__field_value" value=""> <input type="hidden" name="time_int" value=""> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="edit view"> <tr> <td> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="20%" scope="row"><slot>{BASE_MODULE} {MOD.LBL_FIELD} <span class="required">{APP.LBL_REQUIRED_SYMBOL}</span></slot></td> <td width="35%" ><slot><select id='field' name='field' tabindex='2' onchange="updatetriggerview('triggeriframe', 'field')";>{FIELD_SELECT}</select></slot></td> <td scope="row"><slot> </slot></td> <td ><slot> </slot></td> </tr><tr id='modify_past_div'> <td width="20%"scope="row"><slot>{MOD.LBL_SHOW_PAST}</slot></td> <td width="35%"><slot> <input id='show_past' name='show_past' class="checkbox" type="checkbox" tabindex='1' onclick="updatetriggerview('triggeriframe', 'field');" {SHOW_PAST} {SHOW_PAST_DISABLED}> </slot></td> <td scope="row"><slot> </slot></td> <td ><slot> </slot></td> </tr><tr> <td scope="row"><slot> </slot></td> <td ><slot> </slot></td> <td scope="row"><slot> </slot></td> <td ><slot> </slot></td> </tr> <tr height="300px"> <td colspan="4"> <iframe name='triggeriframe' id='triggeriframe' title='triggeriframe' frameborder="0" marginwidth="0" marginheight="0" width='100%' height='100%'> </iframe> </td> </tr> </table> </td></tr></table> </form> {JAVASCRIPT} <script> updatetriggerview('triggeriframe', 'field'); togglepast(); </script> <!-- END: main -->