mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 13:46:44 -04:00
Removed unneeded first round ordering setting.
This commit is contained in:
@@ -5,7 +5,6 @@ CREATE TABLE event_settings (
|
||||
code VARCHAR(16),
|
||||
displaybackgroundcolor VARCHAR(16),
|
||||
numelimalliances int,
|
||||
selectionround1order VARCHAR(1),
|
||||
selectionround2order VARCHAR(1),
|
||||
selectionround3order VARCHAR(1)
|
||||
);
|
||||
|
||||
@@ -11,7 +11,6 @@ type EventSettings struct {
|
||||
Code string
|
||||
DisplayBackgroundColor string
|
||||
NumElimAlliances int
|
||||
SelectionRound1Order string
|
||||
SelectionRound2Order string
|
||||
SelectionRound3Order string
|
||||
}
|
||||
@@ -27,7 +26,6 @@ func (database *Database) GetEventSettings() (*EventSettings, error) {
|
||||
eventSettings.Code = "UE"
|
||||
eventSettings.DisplayBackgroundColor = "#00ff00"
|
||||
eventSettings.NumElimAlliances = 8
|
||||
eventSettings.SelectionRound1Order = "F"
|
||||
eventSettings.SelectionRound2Order = "L"
|
||||
eventSettings.SelectionRound3Order = ""
|
||||
err = database.eventSettingsMap.Insert(eventSettings)
|
||||
|
||||
@@ -17,13 +17,12 @@ func TestEventSettingsReadWrite(t *testing.T) {
|
||||
|
||||
eventSettings, err := db.GetEventSettings()
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, EventSettings{0, "Untitled Event", "UE", "#00ff00", 8, "F", "L", ""}, *eventSettings)
|
||||
assert.Equal(t, EventSettings{0, "Untitled Event", "UE", "#00ff00", 8, "L", ""}, *eventSettings)
|
||||
|
||||
eventSettings.Name = "Chezy Champs"
|
||||
eventSettings.Code = "cc"
|
||||
eventSettings.DisplayBackgroundColor = "#ff00ff"
|
||||
eventSettings.NumElimAlliances = 6
|
||||
eventSettings.SelectionRound1Order = "F"
|
||||
eventSettings.SelectionRound2Order = "F"
|
||||
eventSettings.SelectionRound3Order = "L"
|
||||
err = db.SaveEventSettings(eventSettings)
|
||||
|
||||
@@ -39,7 +39,6 @@ func SettingsPostHandler(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
eventSettings.NumElimAlliances = numAlliances
|
||||
eventSettings.SelectionRound1Order = r.PostFormValue("selectionRound1Order")
|
||||
eventSettings.SelectionRound2Order = r.PostFormValue("selectionRound2Order")
|
||||
eventSettings.SelectionRound3Order = r.PostFormValue("selectionRound3Order")
|
||||
err := db.SaveEventSettings(eventSettings)
|
||||
|
||||
@@ -40,25 +40,6 @@
|
||||
<input type="text" class="form-control" name="numElimAlliances" value="{{.NumElimAlliances}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-5 control-label">Round 1 Selection Order</label>
|
||||
<div class="col-lg-7">
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="selectionRound1Order" value="F"
|
||||
{{if eq .SelectionRound1Order "F"}}checked{{end}}>
|
||||
First to Last
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="selectionRound1Order" value="L"
|
||||
{{if eq .SelectionRound1Order "L"}}checked{{end}}>
|
||||
Last to First
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-5 control-label">Round 2 Selection Order</label>
|
||||
<div class="col-lg-7">
|
||||
|
||||
Reference in New Issue
Block a user