Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('div').html(""); //limpa a div
- $('div').dialog({
- resizable: false,
- height: 'auto',
- width: 400,
- modal: true,
- title: 'Criar Ticket?',
- buttons: {
- "Confirmar": function () {
- $(this).dialog("close");
- obs = prompt('Inserir alguma observação no ticket?');
- $('<input/>').attr('type', 'hidden')
- .attr('name', "obs")
- .attr('value', obs)
- .appendTo('#form');
- $("#form").submit();
- },
- "Cancelar": function () {
- $(this).dialog("close");
- console.log('cancelado');
- }
- }
- });
- <form action="#" id="form" method="post" accept-charset="utf-8">
- <div></div>
- <button id="ticket" name="obs" type="button" style="
- border-top-color: transparent;
- border-right-color: transparent;
- border-bottom-color: transparent;
- border-left-color: transparent;
- background-color: transparent;
- cursor: pointer;" title="Criar Ticket no Redmine"><img src="https://cdn3.iconfinder.com/data/icons/fatcow/32x32/ruby_add.png" style="height: 32px" alt=""></button>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement