Skip to content

Instantly share code, notes, and snippets.

@simonj
Last active September 15, 2015 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonj/e2d7012d371760add4eb to your computer and use it in GitHub Desktop.
Save simonj/e2d7012d371760add4eb to your computer and use it in GitHub Desktop.
/*
* This component adds domains to the DB
*/
module.exports = {
methods: {
/**
* Add domain to the DB
*/
createDomain: function() {
console.log('added');
}
}
};
<!-- This is included in my main file -->
<div class="modal" id="addDomain" tabindex="-1" role="dialog" aria-labelledby="addDomain"
aria-hidden="true">
<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">&times;</span>
<span class="sr-only">Close</span>
</button>
<h4 class="modal-title" id="myModalLabel">Add domain</h4>
</div>
<div class="modal-body">
<form>
<meta id="token" name="token" value="{{ csrf_token() }}">
<fieldset class="form-group">
<label for="name">Name</label>
<input type="text" class="form-control" name="name" id="name" placeholder="Name for the site">
</fieldset>
<fieldset class="form-group">
<label for="domain">Domain (url)</label>
<input type="text" class="form-control" name="domain" id="domain" placeholder="http://">
</fieldset>
<fieldset class="form-group">
<label for="description">Small description</label>
<input type="text" class="form-control" name="description" id="description" placeholder="Small description of the site">
</fieldset>
</form>
</div><!-- modal-body -->
<div class="modal-footer">
<button type="button" class="btn btn-danger-outline" data-dismiss="modal">Close</button>
<button v-on="click:createDomain()" type="button" class="btn btn-success-outline">Add domain</button>
</div><!-- modal-footer -->
</div><!-- modal-content -->
</div><!-- modal-dialog -->
</div><!-- modal -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment