MyBB Community Forums

Full Version: Reputation fetching wrong template.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It seems that it doesn't matters if we are adding a reputation from a modal, if an error pops up the core will fetch the reputation_add_error_nomal template to show the modal error.

The issue is within the "reputation_add" template:
<div class="modal">
	<div style="overflow-y: auto; max-height: 400px;" class="modal_{$user['uid']}_{$mybb->input['pid']}">
      <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
	<tr>
		<td class="trow1" style="padding: 20px">
			<strong>{$vote_title}</strong><br />{$post_rep_info}<br />
          <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>

From the first line it is self explanatory that it is a modal, yet nomodal is passed with a value of 1.
The "nomodal" is correct. The new page is loaded from within a modal and is inserted into the modal div already, therefore we don't need a new modal and the template without the modal is loaded. Rejecting this.