- updates;
This commit is contained in:
@@ -35,12 +35,12 @@ const ElementSetting = ({ setting, changeFn, updateDataFn, bandoStatus }) => {
|
||||
text: __('Testo formattato', 'gepafin'),
|
||||
table_columns: '',
|
||||
criteria_table_columns: '',
|
||||
variable: __('Variable (only letters and "_")', 'gepafin'),
|
||||
formula: __('Auto calculation formula', 'gepafin')
|
||||
variable: __('Variabile (lettere, cifre e "_"; il primo carattere deve essere una lettera!)', 'gepafin'),
|
||||
formula: __('Formula di calcolo automatico', 'gepafin')
|
||||
}
|
||||
|
||||
const settingDescription = {
|
||||
formula: __('Create formula using previously declared variables. Use these math operators: <code>+</code>, <code>-</code>, <code>*</code>, <code>/</code>. Example of formula: <code>{entrate}+{assicurazione}</code>.', 'gepafin')
|
||||
formula: __('Crea una formula usando variabili dichiarate in precedenza. Utilizza questi operatori matematici: <code>+</code>, <code>-</code>, <code>*</code>, <code>/</code>. Esempio: <code>{entrate}+{assicurazione}</code>.', 'gepafin')
|
||||
}
|
||||
|
||||
const renderHeader = () => {
|
||||
|
||||
@@ -8,7 +8,7 @@ const ElementSettingChips = ({ restrictedValues = [], changeFn, value = [] }) =>
|
||||
const [lastTyped, setLastTyped] = useState([])
|
||||
|
||||
const isValidValue = (newVal) => {
|
||||
const validationRegex = /^[a-zA-Z_]+$/;
|
||||
const validationRegex = /^[a-zA-Z][a-zA-Z0-9_]*$/;
|
||||
return validationRegex.test(newVal);
|
||||
};
|
||||
|
||||
|
||||
@@ -237,7 +237,7 @@ const BuilderElementSettings = ({ closeSettingsFn, bandoStatus }) => {
|
||||
{settings
|
||||
&& settings
|
||||
.filter(o => ['variable', 'formula'].includes(o.name)).length > 0
|
||||
? <TabPanel header={__('Calculation', 'gepafin')}>
|
||||
? <TabPanel header={__('Calcolo', 'gepafin')}>
|
||||
{settings
|
||||
? settings
|
||||
.filter(o => ['variable', 'formula'].includes(o.name))
|
||||
@@ -251,7 +251,10 @@ const BuilderElementSettings = ({ closeSettingsFn, bandoStatus }) => {
|
||||
</TabPanel> : null}
|
||||
</TabView>
|
||||
|
||||
<Button label={__('Salva', 'gepafin')} onClick={saveSettings}/>
|
||||
<div style={{display: 'flex', gap: '0.5rem'}}>
|
||||
<Button label={__('Annulla', 'gepafin')} onClick={closeSettingsFn} severity="danger"/>
|
||||
<Button label={__('Salva', 'gepafin')} onClick={saveSettings}/>
|
||||
</div>
|
||||
</div>
|
||||
: null
|
||||
)
|
||||
|
||||
@@ -56,7 +56,7 @@ const FormBuilder = ({ bandoStatus }) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Sidebar visible={!isEmpty(activeElement)} onHide={closeSettings} className="formBuilder__elementSettings">
|
||||
<Sidebar visible={!isEmpty(activeElement)} onHide={closeSettings} dismissable={false} className="formBuilder__elementSettings">
|
||||
<h2>{__('Impostazioni del campo modulo', 'gepafin')}</h2>
|
||||
{!isEmpty(activeElement) ? <BuilderElementSettings closeSettingsFn={closeSettings} bandoStatus={bandoStatus}/> : null}
|
||||
</Sidebar>
|
||||
|
||||
Reference in New Issue
Block a user