This commit is contained in:
MatteoPistorello 2022-06-15 18:06:28 +02:00
commit ed8c48c24b
3 changed files with 5 additions and 3 deletions

View File

@ -132,7 +132,7 @@ echo '
</div>
<div class="col-md-3 oauth2-config">
<a type="button" class="btn btn-success btn-block '.(empty($oauth2->class) || empty($oauth2->client_id) || empty($oauth2->client_secret) ? 'disabled' : '').'" style="margin-top: 25px" href="'.base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&op=oauth2">
<a type="button" class="btn btn-success btn-block '.(empty($oauth2->class) || empty($oauth2->client_id) || empty($oauth2->client_secret) ? 'disabled' : '').'" style="margin-top: 25px" href="'.base_url().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'&op=oauth2" target="_blank">
<i class="fa fa-refresh"></i> '.(empty($oauth2->access_token) ? tr('Completa configurazione') : tr('Ripeti configurazione')).'
</a>
</div>

View File

@ -33,7 +33,7 @@ echo '
{[ "type": "select", "label": "'.tr('Contratto').'", "name": "idcontratto", "value": "$id$", "ajax-source": "contratti", "disabled": "1" ]}
</div>
<div class="col-md-6">
{[ "type": "checkbox", "label": "'.tr('Predefinito').'", "name": "predefined", "value" : "$predefined$" ]}
{[ "type": "checkbox", "label": "'.tr('Predefinito').'", "disabled": "'.(intval($record['is_pianificabile'])? '0':'1').'", "name": "predefined", "value" : "$predefined$", "help": "'.tr('Il contratto predefinito, se lavorabile, verrà selezionato automaticamente in fase di apertura attività per il cliente').'" ]}
</div>
</div>
@ -44,3 +44,5 @@ echo '
</div>
</div>
</form>';

View File

@ -20,5 +20,5 @@
include_once __DIR__.'/../../core.php';
if (isset($id_record)) {
$record = $dbo->fetchOne('SELECT * FROM co_contratti WHERE id='.prepare($id_record));
$record = $dbo->fetchOne('SELECT *, (SELECT is_pianificabile FROM co_staticontratti WHERE id=idstato) AS is_pianificabile FROM co_contratti WHERE id='.prepare($id_record));
}