Skip to content

Commit 3f1a12c

Browse files
authored
Merge pull request #8 from UB-Heidelberg/stable-3_1_2
Fix: load credentials to frontend
2 parents 1be3126 + f59ec67 commit 3f1a12c

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

DataciteExportPlugin.inc.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,10 @@ private function updateSettings( $request ) : void
182182
$this->updateSetting( $contextId, 'api', $userVars['api'] );
183183
$this->updateSetting( $contextId, 'daraMode', $userVars['daraMode'] );
184184
$this->updateSetting( $contextId, 'username', $userVars['username'] );
185-
$this->updateSetting( $contextId, 'password', $userVars['password'] );
186-
$this->updateSetting( $contextId, 'testMode', $userVars['testMode'] );
187-
$this->updateSetting( $contextId, 'testPrefix', $userVars['testPrefix'] );
188-
$this->updateSetting( $contextId, 'testRegistry', $userVars['testRegistry'] );
189-
$this->updateSetting( $contextId, 'testUrl', $userVars['testUrl'] );
185+
if( NULL !== $userVars['password'] && !empty( $userVars['password'] ) )
186+
{
187+
$this->updateSetting( $contextId, 'password', $userVars['password'] );
188+
}
190189
}
191190
}
192191

@@ -1223,7 +1222,6 @@ public function getPluginSettingsPrefix() : string
12231222
public function register( $category, $path, $mainContextId = NULL ) : bool
12241223
{
12251224

1226-
HookRegistry::register( 'PKPLocale::registerLocaleFile', array( &$this, 'addCustomLocale' ) );
12271225
HookRegistry::register( 'LoadComponentHandler', array( $this, 'setupGridHandler' ) );
12281226
HookRegistry::register(
12291227
'Templates::Management::Settings::website', array( $this, 'callbackShowWebsiteSettingsTabs' )

templates/index.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
{fbvFormSection}
5050
{fbvElement type="text" id="api" value=$api label="plugins.importexport.datacite.settings.form.url" maxlength="100" size=$fbvStyles.size.MEDIUM}
5151
{fbvElement type="text" id="username" value=$username label="plugins.importexport.datacite.settings.form.username" maxlength="50" size=$fbvStyles.size.MEDIUM}
52-
{fbvElement type="text" password="true" id="password" value=$password label="plugins.importexport.datacite.settings.form.password" maxLength="50" size=$fbvStyles.size.MEDIUM}
52+
{fbvElement type="text" password="true" id="password" value="" label="plugins.importexport.datacite.settings.form.password" maxLength="50" size=$fbvStyles.size.MEDIUM}
5353
<span class="instruct">{translate key="plugins.importexport.datacite.settings.form.password.description"}</span>
5454
<br/>
5555
{/fbvFormSection}

0 commit comments

Comments
 (0)