- Status changed to Needs work
over 1 year ago 5:53pm 19 May 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
+function drupalchat_app_settings() +{ + global $user; + + if (isset($_SESSION['token']) && !empty($_SESSION['token'])) { + $token = $_SESSION['token']; + } else { + $json = _drupalchat_get_auth(array()); + $token = $json['key']; + } + + $drupalchat_host = DRUPALCHAT_EXTERNAL_A_HOST; + $host = explode("/", $drupalchat_host); + $host_name = $host[2]; + + $dashboardUrl = "https://". DRUPALCHAT_EXTERNAL_CDN_HOST ."/apps/dashboard/#/settings/app?sessid=". $token ."&hostName=". $host_name ."&hostPort=". DRUPALCHAT_EXTERNAL_A_PORT; + $form = array(); + $form['drupalchat_app_dashboard'] = array( + '#type' => 'button', + '#attributes' => array('onClick' => 'window.open("'.$dashboardUrl.'","_blank")'), + '#value' => t('Click here to open App Dashboard'), + ); + + return $form; +}
Code must be formatted following the Drupal coding standards, for which the indentation is two spaces and the opening curly parenthesis must be in the same line containing the function declaration, among other things.
- Issue was unassigned.
- Status changed to Closed: won't fix
over 1 year ago 10:59am 31 July 2023 - Status changed to Needs work
over 1 year ago 10:59pm 31 July 2023 - First commit to issue fork.