forked from baserproject/basercms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
260 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
plugins/baser-core/config/Migrations/20240326061629_UserPasswordModified.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
use Migrations\AbstractMigration; | ||
|
||
class UserPasswordModified extends AbstractMigration | ||
{ | ||
/** | ||
* Change Method. | ||
* | ||
* More information on this method is available here: | ||
* https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method | ||
* @return void | ||
*/ | ||
public function change(): void | ||
{ | ||
$table = $this->table('users'); | ||
$table->addColumn('password_modified', 'datetime', [ | ||
'after' => 'nickname', | ||
'null' => true, | ||
]); | ||
$table->update(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
plugins/bc-admin-third/templates/Admin/Users/edit_password.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<?php | ||
/** | ||
* baserCMS : Based Website Development Project <https://basercms.net> | ||
* Copyright (c) NPO baser foundation <https://baserfoundation.org/> | ||
* | ||
* @copyright Copyright (c) NPO baser foundation | ||
* @link https://basercms.net baserCMS Project | ||
* @since 5.0.0 | ||
* @license https://basercms.net/license/index.html MIT License | ||
*/ | ||
|
||
use BaserCore\View\BcAdminAppView; | ||
use BaserCore\Model\Entity\User; | ||
|
||
/** | ||
* Users Edit | ||
* @var BcAdminAppView $this | ||
* @var User $user | ||
*/ | ||
$this->BcAdmin->setTitle(__d('baser_core', 'パスワード編集')); | ||
?> | ||
|
||
<?= $this->BcAdminForm->create($user, ['novalidate' => true]) ?> | ||
|
||
<?php // 自動入力を防止する為のダミーフィールド ?> | ||
<input type="password" name="dummy-pass" autocomplete="off" style="top:-100px;left:-100px;position:fixed;"> | ||
<?php $this->BcAdminForm->unlockFields('dummy-pass') ?> | ||
|
||
<?php echo $this->BcFormTable->dispatchBefore() ?> | ||
|
||
<div class="section"> | ||
<table id="FormTable" class="form-table bca-form-table"> | ||
<tr> | ||
<th class="col-head bca-form-table__label"> | ||
<?php echo $this->BcAdminForm->label('password_1', __d('baser_core', 'パスワード')) ?> | ||
<?php if ($this->request->getParam('action') == 'add'): ?> | ||
<span class="bca-label" data-bca-label-type="required"><?php echo __d('baser_core', '必須') ?></span> | ||
<?php endif; ?> | ||
</th> | ||
<td class="col-input bca-form-table__input"> | ||
<?php if ($this->request->getParam('action') == 'edit'): ?><small> | ||
[<?php echo __d('baser_core', 'パスワードは変更する場合のみ入力してください') ?>]</small><br/><?php endif ?> | ||
<?php echo $this->BcAdminForm->control('password_1', ['type' => 'password', 'size' => 20, 'maxlength' => 255, 'autocomplete' => 'off']) ?> | ||
<?php echo $this->BcAdminForm->control('password_2', ['type' => 'password', 'size' => 20, 'maxlength' => 255, 'autocomplete' => 'off', 'placeholder' => __d('baser_core', 'もう一度入力')]) ?> | ||
<i class="bca-icon--question-circle bca-help"></i> | ||
<div class="bca-helptext"> | ||
<ul> | ||
<li> | ||
<?php if ($this->request->getParam('action') == 'edit'): ?> | ||
<?php echo __d('baser_core', 'パスワードの変更をする場合は、') ?> | ||
<?php endif; ?> | ||
<?php echo __d('baser_core', '確認のため2回入力してください。') ?></li> | ||
<li><?php echo __d('baser_core', '半角英数字(英字は大文字小文字を区別)とスペース、記号(._-:/()#,@[]+=&;{}!$*)のみで入力してください') ?></li> | ||
</ul> | ||
</div> | ||
<?php echo $this->BcAdminForm->error('password') ?> | ||
</td> | ||
</tr> | ||
|
||
<?php echo $this->BcAdminForm->dispatchAfterForm() ?> | ||
|
||
</table> | ||
</div> | ||
|
||
<?php echo $this->BcFormTable->dispatchAfter() ?> | ||
|
||
<div class="submit section bca-actions"> | ||
<div class="bca-actions__main"> | ||
<?= $this->BcAdminForm->button( | ||
__d('baser_core', '保存'), | ||
['div' => false, | ||
'class' => 'button bca-btn bca-actions__item', | ||
'data-bca-btn-type' => 'save', | ||
'data-bca-btn-size' => 'lg', | ||
'data-bca-btn-width' => 'lg', | ||
'id' => 'BtnSave'] | ||
) ?> | ||
</div> | ||
</div> | ||
|
||
<?= $this->BcAdminForm->end() ?> | ||
|
||
<?= $this->fetch('postLink') ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters