Skip to content

Commit

Permalink
Fix special formfields in command forms
Browse files Browse the repository at this point in the history
  • Loading branch information
dvlpp committed Mar 15, 2016
1 parent 2293df9 commit eea2e95
Show file tree
Hide file tree
Showing 5 changed files with 739 additions and 9 deletions.
6 changes: 3 additions & 3 deletions resources/assets/js/sharp.commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ $(window).load(function () {

// Form init
$modal.find('form').prop("action", url);
$form.find(".validation-error").remove();
$form.find(".has-error").removeClass("has-error");
$form[0].reset();
$modal.find(".validation-error").remove();
$modal.find(".has-error").removeClass("has-error");
$modal.find('form')[0].reset();

// Show modal form
$modal.show();
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/sharp.form.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions resources/assets/sharp.ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -12588,9 +12588,9 @@ function hidePageOverlay() {

// Form init
$modal.find('form').prop("action", url);
$form.find(".validation-error").remove();
$form.find(".has-error").removeClass("has-error");
$form[0].reset();
$modal.find(".validation-error").remove();
$modal.find(".has-error").removeClass("has-error");
$modal.find('form')[0].reset();

// Show modal form
$modal.show();
Expand Down
732 changes: 730 additions & 2 deletions resources/assets/sharp.ui.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions resources/views/cms/entitiesList.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@
@section("scripts")
@parent

<script src="/sharp/sharp.form.min.js?v={{ $sharpVersion }}"></script>

@foreach(get_command_forms($entity) as $command)
@include("sharp::cms.partials.list.commandForm", ["command"=>$command])
@endforeach
Expand Down

0 comments on commit eea2e95

Please sign in to comment.