Enable full setup on the setup form

This commit is contained in:
2023-07-05 22:42:59 +10:00
parent 6f298d778f
commit c3d4c1fc31
8 changed files with 89 additions and 88 deletions

View File

@@ -79,7 +79,7 @@ use App\Classes\Protocol\Binkp;
<h3>Site Permissions</h3>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="hideaka" name="options[hideaka]" value="{{ Setup::O_HIDEAKA }}" @if(old('options.hideaka',$o->optionGet(Setup::O_HIDEAKA))) checked @endif>
<input class="form-check-input" type="checkbox" id="hideaka" name="options[hideaka]" value="{{ old('options.hideaka',$o->hideaka ?: Setup::O_HIDEAKA) }}" @if(old('options.hideaka',$o->optionGet(Setup::O_HIDEAKA,'options_options'))) checked @endif>
<label class="form-check-label" for="hideaka">Hide AKA to different Domains</label>
</div>
</div>
@@ -124,69 +124,62 @@ use App\Classes\Protocol\Binkp;
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="startbinkd" name="options[binkd]" value="{{ Setup::O_BINKP }}" @if(old('options.binkd',$o->optionGet(Setup::O_BINKP))) checked @endif>
<label class="form-check-label" for="startbinkd">Listen for BINKP connections</label>
<input class="form-check-input" type="checkbox" id="binkp_active" name="binkp_active" value="1" @if(old('binkp_active',$o->binkp_active)) checked @endif>
<label class="form-check-label" for="binkp_active">Listen for BINKP connections</label>
</div>
<div class="mt-1 form-check form-switch">
<input class="form-check-input" type="checkbox" id="opt_cht" name="binkp[cht]" value="{{ Binkp::F_CHAT }}" @if(old('binkp.cht',$o->optionGet(Binkp::F_CHAT,'binkp_options'))) checked @endif disabled>
<label class="form-check-label" for="opt_cht">Chat Mode <sup>not implemented</sup></label>
<input class="form-check-input" type="checkbox" id="binkp_chat" name="binkp[cht]" value="{{ Binkp::F_CHAT }}" @if(old('binkp.cht',$o->optionGet(Binkp::F_CHAT,'binkp_options'))) checked @endif disabled>
<label class="form-check-label" for="binkp_chat">Chat Mode <sup>not implemented</sup></label>
</div>
<div class="mt-1 form-check form-switch">
<input class="form-check-input" type="checkbox" id="opt_comp" name="binkp[comp]" value="{{ Binkp::F_COMP }}" @if(old('binkp.comp',$o->optionGet(Binkp::F_COMP,'binkp_options'))) checked @endif>
<label class="form-check-label" for="opt_comp">Compression Enabled <sup>*</sup></label>
<input class="form-check-input" type="checkbox" id="binkp_comp" name="binkp[comp]" value="{{ Binkp::F_COMP }}" @if(old('binkp.comp',$o->optionGet(Binkp::F_COMP,'binkp_options'))) checked @endif>
<label class="form-check-label" for="binkp_comp">Compression Enabled <sup>*</sup></label>
</div>
<div class="mt-1 form-check form-switch">
<input class="form-check-input" type="checkbox" id="opt_md" name="binkp[md]" value="{{ Binkp::F_MD }}" @if(old('binkp.md',$o->optionGet(Binkp::F_MD,'binkp_options'))) checked @endif>
<label class="form-check-label" for="opt_md">CRAM-MD5 Mode <sup>*</sup></label>
<input class="form-check-input" type="checkbox" id="binkp_md" name="binkp[md]" value="{{ Binkp::F_MD }}" @if(old('binkp.md',$o->optionGet(Binkp::F_MD,'binkp_options'))) checked @endif>
<label class="form-check-label" for="binkp_md">CRAM-MD5 Mode <sup>*</sup></label>
</div>
<!-- @todo Force turning off this toggle, if md5 is not selected -->
<div class="mt-1 form-check form-switch">
<input class="form-check-input" type="checkbox" id="opt_mdforce" name="binkp[mdforce]" value="{{ Binkp::F_MDFORCE }}" @if(old('binkp.mdforce',$o->optionGet(Binkp::F_MDFORCE,'binkp_options'))) checked @endif>
<label class="form-check-label" for="opt_mdforce">No Plaintext Passwords</label>
<input class="form-check-input" type="checkbox" id="binkp_mdforce" name="binkp[mdforce]" value="{{ Binkp::F_MDFORCE }}" @if(old('binkp.mdforce',$o->optionGet(Binkp::F_MDFORCE,'binkp_options'))) checked @endif>
<label class="form-check-label" for="binkp_mdforce">No Plaintext Passwords</label>
</div>
<div class="mt-1 form-check form-switch">
<input class="form-check-input" type="checkbox" id="opt_cr" name="binkp[cr]" value="{{ Binkp::F_CRYPT }}" @if(old('binkp.cr',$o->optionGet(Binkp::F_CRYPT,'binkp_options'))) checked @endif>
<label class="form-check-label" for="opt_cr">Crypt mode <sup>*</sup></label>
<input class="form-check-input" type="checkbox" id="binkp_crypt" name="binkp[cr]" value="{{ Binkp::F_CRYPT }}" @if(old('binkp.cr',$o->optionGet(Binkp::F_CRYPT,'binkp_options'))) checked @endif>
<label class="form-check-label" for="binkp_crypt">Crypt mode <sup>*</sup></label>
</div>
<div class="mt-1 form-check form-switch">
<input class="form-check-input" type="checkbox" id="opt_mb" name="binkp[mb]" value="{{ Binkp::F_MULTIBATCH }}" @if(old('binkp.mb',$o->optionGet(Binkp::F_MULTIBATCH,'binkp_options'))) checked @endif>
<label class="form-check-label" for="opt_mb">Multi-Batch mode <sup>*</sup></label>
<input class="form-check-input" type="checkbox" id="binkp_mb" name="binkp[mb]" value="{{ Binkp::F_MULTIBATCH }}" @if(old('binkp.mb',$o->optionGet(Binkp::F_MULTIBATCH,'binkp_options'))) checked @endif>
<label class="form-check-label" for="binkp_mb">Multi-Batch mode <sup>*</sup></label>
</div>
<div class="mt-1 form-check form-switch">
<input class="form-check-input" type="checkbox" id="opt_mpwd" name="binkp[mpwd]" value="{{ Binkp::F_MULTIPASS }}" @if(old('binkp.mpwd',$o->optionGet(Binkp::F_MULTIPASS,'binkp_options'))) checked @endif disabled>
<label class="form-check-label" for="opt_mpwd">Multi-Password Mode <sup>not implemented</sup></label>
<input class="form-check-input" type="checkbox" id="binkp_mpwd" name="binkp[mpwd]" value="{{ Binkp::F_MULTIPASS }}" @if(old('binkp.mpwd',$o->optionGet(Binkp::F_MULTIPASS,'binkp_options'))) checked @endif disabled>
<label class="form-check-label" for="binkp_mpwd">Multi-Password Mode <sup>not implemented</sup></label>
</div>
<div class="mt-1 form-check form-switch">
<input class="form-check-input" type="checkbox" id="opt_nd" name="binkp[nd]" value="{{ Binkp::F_NODUPE }}" @if(old('binkp.nd',$o->optionGet(Binkp::F_NODUPE,'binkp_options'))) checked @endif>
<label class="form-check-label" for="opt_nd">No Dupes Mode</label>
<input class="form-check-input" type="checkbox" id="binkp_nd" name="binkp[nd]" value="{{ Binkp::F_NODUPE }}" @if(old('binkp.nd',$o->optionGet(Binkp::F_NODUPE,'binkp_options'))) checked @endif>
<label class="form-check-label" for="binkp_nd">No Dupes Mode</label>
</div>
<div class="mt-1 form-check form-switch">
<input class="form-check-input" type="checkbox" id="opt_nda" name="binkp[nda]" value="{{ Binkp::F_NODUPEA }}" @if(old('binkp.nda',$o->optionGet(Binkp::F_NODUPEA,'binkp_options'))) checked @endif>
<label class="form-check-label" for="opt_nda">No Dupes Mode - Asymmetric</label>
<input class="form-check-input" type="checkbox" id="binkp_nda" name="binkp[nda]" value="{{ Binkp::F_NODUPEA }}" @if(old('binkp.nda',$o->optionGet(Binkp::F_NODUPEA,'binkp_options'))) checked @endif>
<label class="form-check-label" for="binkp_nda">No Dupes Mode - Asymmetric</label>
</div>
<div class="mt-1 form-check form-switch">
<input class="form-check-input" type="checkbox" id="opt_nr" name="binkp[nr]" value="{{ Binkp::F_NOREL }}" @if(old('binkp.nr',$o->optionGet(Binkp::F_NOREL,'binkp_options'))) checked @endif>
<label class="form-check-label" for="opt_nr">Non-Reliable Mode <sup>*</sup></label>
<input class="form-check-input" type="checkbox" id="binkp_nr" name="binkp[nr]" value="{{ Binkp::F_NOREL }}" @if(old('binkp.nr',$o->optionGet(Binkp::F_NOREL,'binkp_options'))) checked @endif>
<label class="form-check-label" for="binkp_nr">Non-Reliable Mode <sup>*</sup></label>
</div>
<p class="pt-3"><sup>*</sup> Recommended Defaults</p>
<!-- @todo What's this for again? -->
<table class="table monotable">
{{--
$this->binkp_options = ['m','d','r','b'];
--}}
</table>
</div>
</div>
</div>
@@ -216,7 +209,7 @@ use App\Classes\Protocol\Binkp;
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="startemsi" name="options[emsi]" value="{{ Setup::O_EMSI }}" @if(old('options.emsi',$o->optionGet(Setup::O_EMSI))) checked @endif>
<input class="form-check-input" type="checkbox" id="startemsi" name="emsi_active" value="1" @if(old('emsi_active',$o->emsi_active)) checked @endif>
<label class="form-check-label" for="startemsi">Listen for EMSI connections</label>
</div>
</div>
@@ -245,7 +238,7 @@ use App\Classes\Protocol\Binkp;
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="startdns" name="options[dns]" value="{{ Setup::O_DNS }}" @if(old('options.dns',$o->optionGet(Setup::O_DNS))) checked @endif>
<input class="form-check-input" type="checkbox" id="startdns" name="dns_active" value="1" @if(old('dns_active',$o->dns_active)) checked @endif>
<label class="form-check-label" for="startdns">Listen for DNS connections</label>
</div>
</div>
@@ -260,7 +253,7 @@ use App\Classes\Protocol\Binkp;
<div class="form-group row pt-0">
<div class="col-2">
<input class="form-control text-end" type="text" id="msgs_pkt" name="msgs_pkt" value="{{ old('msgs_pkt',$o->max_msgs_pkt) }}" disabled>
<input class="form-control text-end" type="text" id="msgs_pkt" name="msgs_pkt" value="{{ old('msgs_pkt',$o->msgs_pkt ?: Setup::MAX_MSGS_PKT) }}">
</div>
<div class="col-10">
<label class="col-form-label pt-2" for="msgs_pkt">Max Messages per Packet</label>