2024-01-26 17:00:02 +01:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
|
|
|
|
* Copyright (C) DevCode s.r.l.
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
include_once __DIR__.'/../../core.php';
|
|
|
|
|
|
|
|
?><form action="" method="post" id="edit-form">
|
|
|
|
<input type="hidden" name="backto" value="record-edit">
|
|
|
|
<input type="hidden" name="op" value="update">
|
|
|
|
|
|
|
|
<!-- DATI -->
|
2024-05-16 18:02:50 +02:00
|
|
|
<div class="card card-primary">
|
2024-05-17 12:11:00 +02:00
|
|
|
<div class="card-header">
|
2024-05-16 18:02:50 +02:00
|
|
|
<h3 class="card-title"><?php echo tr('OAuth2'); ?></h3>
|
2024-01-26 17:00:02 +01:00
|
|
|
</div>
|
|
|
|
|
2024-05-16 18:02:50 +02:00
|
|
|
<div class="card-body">
|
2024-01-26 17:00:02 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-6">
|
|
|
|
{[ "type": "text", "label": "<?php echo tr('Nome'); ?>", "name": "nome", "value": "$nome$", "disabled": "1" ]}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
{[ "type": "checkbox", "label": "<?php echo tr('Abilita'); ?>", "name": "enabled", "value": "$enabled$" ]}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-4">
|
|
|
|
{[ "type": "text", "label": "<?php echo tr('Client ID'); ?>", "name": "client_id", "value": "$client_id$" ]}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-4">
|
|
|
|
{[ "type": "text", "label": "<?php echo tr('Client Secret'); ?>", "name": "client_secret", "value": "$client_secret$" ]}
|
|
|
|
</div>
|
|
|
|
<?php
|
2024-01-31 14:23:46 +01:00
|
|
|
$config = $record['class']::getConfigInputs();
|
|
|
|
foreach ($config as $name => $field) {
|
|
|
|
$field['name'] = 'config['.$name.']';
|
|
|
|
$field['value'] = $oauth2->config[$name];
|
2024-01-26 17:00:02 +01:00
|
|
|
|
2024-01-31 14:23:46 +01:00
|
|
|
echo '
|
2024-01-26 17:00:02 +01:00
|
|
|
<div class="col-md-4">
|
|
|
|
'.input($field).'
|
|
|
|
</div>';
|
2024-01-31 14:23:46 +01:00
|
|
|
}
|
2024-01-26 17:00:02 +01:00
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</form>
|