-
-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1017 from amosfolz/user-set-password
Set password manually when creating new user
- Loading branch information
Showing
7 changed files
with
143 additions
and
64 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
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
37 changes: 37 additions & 0 deletions
37
app/sprinkles/admin/templates/forms/partials/user-set-password.html.twig
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,37 @@ | ||
<!-- Prevent browsers from trying to autofill the password field. See http://stackoverflow.com/a/23234498/2970321 --> | ||
<input type="text" style="display:none"> | ||
<input type="password" style="display:none"> | ||
<div class="col-sm-12"> | ||
<div class="radio"> | ||
<label for="change_password_mode_link"> | ||
<input type="radio" name="change_password_mode" id="change_password_mode_link" value="link" checked> | ||
{{translate("USER.ADMIN.SEND_PASSWORD_LINK")}} | ||
</label> | ||
</div> | ||
</div> | ||
<div class="col-sm-12"> | ||
<div class="radio"> | ||
<label for="change_password_mode_manual"> | ||
<input type="radio" name="change_password_mode" id="change_password_mode_manual" value="manual"> | ||
{{translate("USER.ADMIN.SET_PASSWORD")}}: | ||
</label> | ||
</div> | ||
<div class="row controls-password"> | ||
<div class="col-sm-11 col-sm-offset-1"> | ||
<div class="form-group"> | ||
<label>{{translate('PASSWORD')}}</label> | ||
<div class="input-group"> | ||
<span class="input-group-addon"><i class="fas fa-key"></i></span> | ||
<input type="password" class="form-control" name="password" autocomplete="off" value="" placeholder="{{translate('PASSWORD.BETWEEN', {min: 12, max: 50})}}"> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<label>{{translate('PASSWORD.CONFIRM')}}</label> | ||
<div class="input-group"> | ||
<span class="input-group-addon"><i class="fas fa-key"></i></span> | ||
<input type="password" class="form-control" name="passwordc" autocomplete="off" value="" placeholder="{{translate('PASSWORD.CONFIRM')}}"> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
21 changes: 21 additions & 0 deletions
21
app/sprinkles/admin/templates/forms/user-set-password.html.twig
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,21 @@ | ||
<form class="js-form" method="PUT" action="{{site.uri.public}}/api/users/u/{{user.user_name}}"> | ||
{% include "forms/csrf.html.twig" %} | ||
<div class="js-form-alerts"> | ||
</div> | ||
<div class="row"> | ||
{% include "forms/partials/user-set-password.html.twig" %} | ||
</div> | ||
<br> | ||
<div class="row"> | ||
<div class="col-xs-8 col-sm-4"> | ||
<button type="submit" class="btn btn-block btn-lg btn-success">{{translate('SUBMIT')}}</button> | ||
</div> | ||
<div class="col-xs-4 col-sm-3 pull-right"> | ||
<button type="button" class="btn btn-block btn-lg btn-link" data-dismiss="modal">{{translate('CANCEL')}}</button> | ||
</div> | ||
</div> | ||
</form> | ||
<!-- Include validation rules --> | ||
<script> | ||
{% include "pages/partials/page.js.twig" %} | ||
</script> |
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