Skip to content
GitLab
About GitLab
GitLab: the DevOps platform
Explore GitLab
Install GitLab
How GitLab compares
Get started
GitLab docs
GitLab Learn
Pricing
Talk to an expert
/
Help
What's new
2
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Projects
Groups
Snippets
Register
Sign in
Toggle navigation
Menu
Open sidebar
SondagesPro
TokenManagement
TokenUsersListAndManage
Commits
4d13adf9
Commit
4d13adf9
authored
Oct 05, 2022
by
Chenu Denis
Browse files
[feature] allow to update only tokens
parent
d70918d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
TokenUsersListAndManage.php
View file @
4d13adf9
...
...
@@ -5,7 +5,7 @@
* @author Denis Chenu <denis@sondages.pro>
* @copyright 2020-2022 Denis Chenu <http://www.sondages.pro>
* @license GPL v3
* @version 0.2
3.1
* @version 0.2
4.2
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
...
...
@@ -1125,6 +1125,7 @@ class TokenUsersListAndManage extends PluginBase
'settings'
=>
$this
->
translate
(
"Settings of Token management"
),
'attributes'
=>
$this
->
translate
(
"Attributes definition and settings of Token management."
),
'tokens'
=>
$this
->
translate
(
"Attributes definition, settings of Token management and participants table"
),
'onlytokens'
=>
$this
->
translate
(
"Only participants table."
),
),
);
$aSettings
[
$this
->
translate
(
'Childs token attribute update'
)][
'tokenAttributeSetChildrensAction'
]
=
array
(
...
...
@@ -1136,6 +1137,15 @@ class TokenUsersListAndManage extends PluginBase
.
'</button>'
.
'</div>'
);
//~ $aSettings[$this->translate('Childs token attribute update')]['tokenAttributeExporttChildrensAction'] = array(
//~ 'type' => 'info',
//~ 'content' => '<div class="col-md-6 col-md-offset-6">'
//~ . '<p class="text-warning"><strong>' . $this->translate("Warning") . '</strong> ' . $this->translate('This update child survey and can delete attribute information and token') . '</p>'
//~ . '<button type="submit" name="saveTokenUsersListAndManage" value="tokenAttributeSetChildrensAction" class="btn btn-default"><i class="fa fa-check-circle-o " aria-hidden="true"></i>'
//~ . $this->translate("Save and set attributes to child survey")
//~ . '</button>'
//~ . '</div>'
//~ );
}
}
/* Basic settings (on this surey) */
...
...
@@ -1515,24 +1525,26 @@ class TokenUsersListAndManage extends PluginBase
return
;
}
/* settings */
$this
->
set
(
"tokenAttributeGroup"
,
$this
->
get
(
'tokenAttributeGroup'
,
'Survey'
,
$surveyId
,
''
),
'Survey'
,
$childSurveyId
);
$this
->
set
(
"tokenAttributeGroupManager"
,
$this
->
get
(
'tokenAttributeGroupManager'
,
'Survey'
,
$surveyId
,
''
),
'Survey'
,
$childSurveyId
);
$this
->
set
(
"tokenAttributeRestricted"
,
$this
->
get
(
'tokenAttributeRestricted'
,
'Survey'
,
$surveyId
,
''
),
'Survey'
,
$childSurveyId
);
if
(
$action
!=
'onlytokens'
)
{
$this
->
set
(
"tokenAttributeGroup"
,
$this
->
get
(
'tokenAttributeGroup'
,
'Survey'
,
$surveyId
,
''
),
'Survey'
,
$childSurveyId
);
$this
->
set
(
"tokenAttributeGroupManager"
,
$this
->
get
(
'tokenAttributeGroupManager'
,
'Survey'
,
$surveyId
,
''
),
'Survey'
,
$childSurveyId
);
$this
->
set
(
"tokenAttributeRestricted"
,
$this
->
get
(
'tokenAttributeRestricted'
,
'Survey'
,
$surveyId
,
''
),
'Survey'
,
$childSurveyId
);
}
/* */
if
(
$action
==
'attributes'
||
$action
==
'tokens'
)
{
...
...
@@ -1567,7 +1579,7 @@ class TokenUsersListAndManage extends PluginBase
if
(
!
Survey
::
model
()
->
findByPk
(
$surveyId
)
->
hasTokensTable
)
{
return
;
}
if
(
$action
==
'tokens'
)
{
if
(
$action
==
'tokens'
||
$action
==
'onlytokens'
)
{
Token
::
model
(
$childSurveyId
)
->
deleteAll
();
$parentTable
=
"
{
{tokens_{$surveyId}}
}
"
;
$chieldTable
=
"
{
{tokens_{$childSurveyId}}
}
"
;
...
...
config.xml
View file @
4d13adf9
...
...
@@ -8,7 +8,7 @@
<author>
Denis Chenu
</author>
<authorUrl>
https://www.sondages.pro/
</authorUrl>
<supportUrl>
https://support.sondages.pro/
</supportUrl>
<version>
0.24.
0
</version>
<version>
0.24.
2
</version>
<license>
GNU Affero General Public License v3.0
</license>
<description>
<![CDATA[Token Users List And Manage.]]>
</description>
</metadata>
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment