2014-09-15, 04:26 PM
I'm working on a custom theme which uses bootstrap, and when I bootstrapped the reputation dialog the "submit" button no longer closes. I was wondering if there was a genius who might have an idea on how to get this to work? Before when I posted support threads in the themes section no one ever responded. So I am being mean and posting it here.
I tried adding the following code to the submit button, but then it closes without submitting the reputation.
This is what the dialog code looks like. As you can see, I am basically just bootstrapping the default theme. There are no major changes other than switching it over to to use bootstrap components.
I tried adding the following code to the submit button, but then it closes without submitting the reputation.
data-dismiss="modal"
This is what the dialog code looks like. As you can see, I am basically just bootstrapping the default theme. There are no major changes other than switching it over to to use bootstrap components.
<div class="modal fade" role="dialog">
<div class="modal-dialog modal_{$pid}">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" rel="closeModal" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title"><strong>{$vote_title}</strong></h4>
<br />
{$post_rep_info}
</div>
<div class="modal-body">
<table class="table" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="trow1" style="padding: 20px">
<form action="reputation.php" method="post" class="reputation_{$user['uid']}_{$mybb->input['pid']}" onsubmit="javascript: return MyBB.submitReputation({$user['uid']}, {$mybb->input['pid']});">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<input type="hidden" name="action" value="do_add" />
<input type="hidden" name="uid" value="{$user['uid']}" />
<input type="hidden" name="pid" value="{$mybb->input['pid']}" />
<input type="hidden" name="rid" value="{$rid}" />
<input type="hidden" name="nomodal" value="1" />
<select name="reputation" id="reputation">
{$positive_power}
{$neutral_power}
{$negative_power}
</select>
<br /><br />
<span class="smalltext">{$lang->user_comments}</span>
<br />
<input type="text" class="textbox" name="comments" size="35" maxlength="250" value="{$comments}" style="width: 95%" />
<br /><br />
<div style="text-align: center;">
<input type="submit" class="button" value="{$vote_button}"/>
{$delete_button}
</div>
</form>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>