added setting for matching algorithm mathes force accepting

This commit is contained in:
fred-fri 2012-05-04 14:40:53 +09:00
parent 153ff306b6
commit 9793d08c84
4 changed files with 23 additions and 1 deletions
resources/db_update_scripts
src/main/java/se/su/dsv/scipro

@ -0,0 +1,2 @@
ALTER TABLE `general_system_settings`
ADD matchAlgorithmMatchesAreForceAccepted bit(1) NOT NULL;

@ -38,6 +38,12 @@
<td><input name="7" type="checkbox" wicket:id="supervisorsCanAcceptDeclinePIs" /> <td><input name="7" type="checkbox" wicket:id="supervisorsCanAcceptDeclinePIs" />
</td> </td>
</tr> </tr>
<tr>
<td><label for="7">Matching algorithm matches are force accepted:</label>
</td>
<td><input name="7" type="checkbox" wicket:id="matchAlgorithmMatchesAreForceAccepted" />
</td>
</tr>
</table> </table>

@ -38,11 +38,14 @@ public class AdminGeneralSettingsPage extends AbstractAdminSettingsPage {
TextField<String> smtpServer = new RequiredTextField<String>("smtpServer"); TextField<String> smtpServer = new RequiredTextField<String>("smtpServer");
CheckBox mailNotifications = new CheckBox("mailNotifications"); CheckBox mailNotifications = new CheckBox("mailNotifications");
CheckBox supervisorsCanAcceptDeclinePIs = new CheckBox("supervisorsCanAcceptDeclinePIs"); CheckBox supervisorsCanAcceptDeclinePIs = new CheckBox("supervisorsCanAcceptDeclinePIs");
CheckBox matchAlgorithmMatchesAreForceAccepted = new CheckBox("matchAlgorithmMatchesAreForceAccepted");
add(mailFromName); add(mailFromName);
add(systemFromMail); add(systemFromMail);
add(smtpServer); add(smtpServer);
add(mailNotifications); add(mailNotifications);
add(supervisorsCanAcceptDeclinePIs); add(supervisorsCanAcceptDeclinePIs);
add(matchAlgorithmMatchesAreForceAccepted);
} }
@Override @Override

@ -62,7 +62,18 @@ public class GeneralSystemSettings extends DomainObject{
this.supervisorsCanAcceptDeclinePIs = supervisorsCanAcceptDeclinePIs; this.supervisorsCanAcceptDeclinePIs = supervisorsCanAcceptDeclinePIs;
} }
@Basic(optional=false) @Basic(optional=false)
private boolean matchAlgorithmMatchesAreForceAccepted = true;
public boolean isMatchAlgorithmMatchesAreForceAccepted() {
return matchAlgorithmMatchesAreForceAccepted;
}
public void setMatchAlgorithmMatchesAreForceAccepted(boolean matchAlgorithmMatchesAreForceAccepted) {
this.matchAlgorithmMatchesAreForceAccepted = matchAlgorithmMatchesAreForceAccepted;
}
@Basic(optional=false)
private boolean finalSeminarThesisMustBeAPDF = false; private boolean finalSeminarThesisMustBeAPDF = false;
@Basic(optional=false) @Basic(optional=false)