+ foreach ($groups as $group_name=>$m)
+ {
+ echo "<fieldset class=\"border p-1 col-sm-6\">\n";
+ echo "<legend class=\"w-auto\" style=\"font-size: 16px\">$group_name</legend>\n";
+ for ($i=0; ($mode = (isset($m[$i])) ? $m[$i] : NULL); $i++)
+ {
+ $group = get_chmode_group($mode);
+ if (!$group || $group == 1)
+ continue;
+ $modeinfo = IRCList::lookup($mode);
+ $checked = (strstr($modes,$mode)) ? "checked " : " ";
+
+ $disabled = "";
+ if (isset($modeinfo) && $modeinfo['requires'] == "Server")
+ $disabled = "disabled";
+
+ ?>
+ <div class="form-group row">
+ <div class="col-sm-5">
+ <input <?php echo $checked.$disabled; ?> type="checkbox" value='<?php echo $mode; ?>' name="newmodes[]">
+ <span data-toggle="tooltip" data-placement="top" title="<?php echo htmlspecialchars($modeinfo['description']); ?>"><?php echo htmlspecialchars($modeinfo['name'])." (<code>+$mode</code>)"; ?>
+ </div>
+ <div class="col-sm-2">
+ <?php
+
+ if ($group == 2 || $group == 3)
+ {
+ ?><input type="text" class="input-group-sm" name="paramed_modes[<?php echo $mode; ?>]"
+ id="<?php echo $mode; ?>" value="<?php echo ($checked)
+ ?
+ htmlspecialchars(
+ isset($paramed_modes[$mode])
+ ?
+ $paramed_modes[$mode]
+ :
+ ""
+ )
+ :
+ ""; ?>"><?php
+ }
+ ?>
+ </div>
+ </div>
+ <?php
+ }
+ echo "</fieldset>\n";
+ }
+ ?>