Skip to content

Commit

Permalink
Fix OAuth2 Client form validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Dillon-Brown committed Apr 26, 2019
1 parent 92ff707 commit cb9dced
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/Smarty/plugins/function.sugar_button.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ function smarty_function_sugar_button($params, &$smarty)
$type = $params['id'];
$location = (empty($params['location'])) ? "" : "_".$params['location'];

$formName = $params['form_id'];

if (!is_array($type)) {
$module = $params['module'];
$view = $params['view'];
Expand Down Expand Up @@ -356,7 +358,7 @@ function smarty_function_sugar_button($params, &$smarty)

case "SAVE":
$view = ($_REQUEST['action'] == 'EditView') ? 'EditView' : (($view == 'EditView') ? 'EditView' : $view);
$output = '{if $bean->aclAccess("save")}<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" onclick="'.$js_form.' {if $isDuplicate}_form.return_id.value=\'\'; {/if}_form.action.value=\'Save\'; if(check_form(\'' . $view . '\'))SUGAR.ajaxUI.submitForm(_form);return false;" type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}" id="'.$type.$location.'">{/if} ';
$output = '{if $bean->aclAccess("save")}<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" onclick="'.$js_form.' {if $isDuplicate}_form.return_id.value=\'\'; {/if}_form.action.value=\'Save\'; if(check_form(\'' . $formName . '\'))SUGAR.ajaxUI.submitForm(_form);return false;" type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}" id="'.$type.$location.'">{/if} ';
break;

case "SUBPANELSAVE":
Expand Down

1 comment on commit cb9dced

@SuiteBot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on SuiteCRM. There might be relevant details there:

https://community.suitecrm.com/t/save-button-in-leads-edit-view-not-working/83317/6

Please sign in to comment.