Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Wpct ERP Forms
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
codeccoop
WordPress
plugins
Wpct ERP Forms
Commits
e795e032
Commit
e795e032
authored
8 months ago
by
Lucas García
Browse files
Options
Downloads
Patches
Plain Diff
feat: password input render and rpc multi model setting
parent
718a21cf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
includes/class-settings.php
+11
-5
11 additions, 5 deletions
includes/class-settings.php
with
11 additions
and
5 deletions
includes/class-settings.php
+
11
−
5
View file @
e795e032
...
...
@@ -80,15 +80,13 @@ class Settings extends BaseSettings
'database'
=>
[
'type'
=>
'string'
,
],
'model'
=>
[
'type'
=>
'string'
,
],
'forms'
=>
[
'type'
=>
'array'
,
'items'
=>
[
'type'
=>
'object'
,
'properties'
=>
[
'form_id'
=>
[
'type'
=>
'string'
],
'model'
=>
[
'type'
=>
'string'
],
'ref'
=>
[
'type'
=>
'string'
],
],
],
...
...
@@ -99,10 +97,10 @@ class Settings extends BaseSettings
'user'
=>
'admin'
,
'password'
=>
'admin'
,
'database'
=>
'default'
,
'model'
=>
'crm.lead'
,
'forms'
=>
[
[
'form_id'
=>
0
,
'model'
=>
'crm.lead'
,
'ref'
=>
null
,
],
],
...
...
@@ -114,7 +112,9 @@ class Settings extends BaseSettings
{
if
(
preg_match
(
'/^forms.*form_id$/'
,
$field
))
{
return
$this
->
render_forms_dropdown
(
$setting
,
$field
,
$value
);
}
}
elseif
(
preg_match
(
'/password$/'
,
$field
))
{
return
$this
->
password_input_render
(
$setting
,
$field
,
$value
);
}
return
parent
::
input_render
(
$setting
,
$field
,
$value
);
}
...
...
@@ -129,4 +129,10 @@ class Settings extends BaseSettings
},
$forms
));
return
"<select name='
{
$setting_name
}
[
{
$field
}
]'>"
.
implode
(
''
,
$options
)
.
'</select>'
;
}
private
function
password_input_render
(
$setting
,
$field
,
$value
)
{
$setting_name
=
$this
->
setting_name
(
$setting
);
return
"<input type='password' name='
{
$setting_name
}
[
{
$field
}
]' value='
{
$value
}
' />"
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment