New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding pages fixed #1591
Merged
Merged
adding pages fixed #1591
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
76d08a7
Modal added
rafalkowalski f7830d4
models pages added
rafalkowalski 7a212c3
migrations added
rafalkowalski c09a057
adding pages fixed
rafalkowalski e98418c
Edit page added
rafalkowalski 38f0d10
Deleting event fixed
rafalkowalski 5ccb3c7
Merge remote-tracking branch 'upstream/development' into dev
rafalkowalski c98f3ff
migrations fixed
rafalkowalski File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
open_event/templates/gentelella/admin/super_admin/pages/_create_page_modal.html
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,66 @@ | ||
<div class="modal fade" id="importModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | ||
<div class="modal-dialog" role="document"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | ||
<h4 class="modal-title" id="myModalLabel">Page Details</h4> | ||
</div> | ||
<div class="modal-body"> | ||
<form class="admin-form form-horizontal"> | ||
<div class="item form-group"> | ||
<label>TITLE</label> | ||
<input type="text" class="form-control col-md-7 col-xs-12"/> | ||
</div> | ||
<div class="item form-group"> | ||
<label>URL</label> | ||
<input type="text" class="form-control col-md-7 col-xs-12"/> | ||
</div> | ||
<div class="item form-group"> | ||
<label>DESCRIPTION</label> | ||
<textarea type="text" class="form-control col-md-7 col-xs-12"> </textarea> | ||
</div> | ||
<div class="item form-group"> | ||
<label>PLACE</label> | ||
<select type="text" class="form-control col-md-7 col-xs-12"> | ||
<option>Use Open Event</option> | ||
<option>Footer Menu</option> | ||
</select> | ||
</div> | ||
|
||
</form> | ||
<br> | ||
<span id="import_status"></span> | ||
<span id="import_error" class="red"></span> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-primary" id="btnImportEvent" onclick="importEventZip();">Create Page</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<script> | ||
|
||
function importEventZip(){ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This function can be removed |
||
var data = new FormData(); | ||
|
||
jQuery.ajax({ | ||
url: '/api/v2/events/import/json', | ||
data: data, | ||
cache: false, | ||
contentType: false, | ||
processData: false, | ||
type: 'POST', | ||
success: function(data){ | ||
console.log(data); | ||
// redirect to created event | ||
document.location = '/events/' + data['id']; | ||
}, | ||
error: function(x){ | ||
obj = JSON.parse(x.responseText); | ||
console.log(obj); | ||
$('#import_error').text(obj['message']); | ||
} | ||
}); | ||
} | ||
|
||
</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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove
onclick="importEventZip();"