update skills and code based on official documentation

This commit is contained in:
2026-07-10 09:36:01 +02:00
parent 1daa5c7409
commit 8412a0ab41
2 changed files with 51 additions and 9 deletions
@@ -136,6 +136,8 @@ export default abstract class ElixFormsComponentAbstract extends Component<IElix
} = this.props;
const queryParams = new URLSearchParams(window.location.search);
const missingMandatoryParams = this.mandatoryFormFieldNames.filter(paramName => !queryParams.has(paramName));
const hasAuthenticationError = missingMandatoryParams.length > 0;
return (
<div className="container_12" id="pageBody">
@@ -180,16 +182,24 @@ export default abstract class ElixFormsComponentAbstract extends Component<IElix
{environmentMessage && <div>{environmentMessage}</div>}
{description && <div>{description}</div>}
{this.renderExtraContentPre()}
{hasAuthenticationError ? (
<FluentUI.MessageBar messageBarType={FluentUI.MessageBarType.error} isMultiline={false}>
Accesso non autorizzato. Parametri obbligatori mancanti ({missingMandatoryParams.join(', ')}).
</FluentUI.MessageBar>
) : (
<>
{this.renderExtraContentPre()}
<form action="https://procedure.unipr.it/rwe2/ComeBackToElixAndSave" method="post" acceptCharset="ISO-8859-1">
{this.createMandatoryFormFields(queryParams)}
{this.createAdditionalFormFields()}
{this.renderCustomFormFields()}
<input type="submit" value="Submit" />
</form>
<form action="https://procedure.unipr.it/rwe2/ComeBackToElixAndSave" method="post" acceptCharset="ISO-8859-1">
{this.createMandatoryFormFields(queryParams)}
{this.createAdditionalFormFields()}
{this.renderCustomFormFields()}
<input type="submit" value="Submit" />
</form>
{this.renderExtraContentPost()}
{this.renderExtraContentPost()}
</>
)}
</div>
</div>
</div>
@@ -365,7 +375,7 @@ export default abstract class ElixFormsComponentAbstract extends Component<IElix
private createHiddenInput(paramName: string): JSX.Element {
const textValue = QueryParamHelper.getDecodedTextFromQuery(paramName) ?? "";
return <><input type='text' id={paramName} name={paramName} defaultValue={textValue} /><br /></>;
return <input type="hidden" id={`${paramName}_hidden`} name={paramName} defaultValue={textValue} />;
}
private createNumberInput(paramName: string, label: string, required: boolean = false): JSX.Element {