Verified Commit 7bf20013 authored by Ole Martin Ruud's avatar Ole Martin Ruud
Browse files

Minor changes

parent e0e9260e
......@@ -14,7 +14,7 @@ log = "0.4.8"
fern = "0.5.8"
unhtml = { version = "0.7.2", features = ["derive"] }
serde = { version = "1.0.99", features = ["derive"] }
directories = "2.0.2"
serde_json = "1.0.40"
directories = "2.0.2"
chrono = "0.4.8"
derive_builder = "0.7.2"
......@@ -301,6 +301,8 @@ impl App {
struct Receipt {
#[html(selector = "h3", attr = "inner")]
title: String,
#[html(selector = "section", attr = "inner")]
message: String,
info!("Parsing room order receipt");
......@@ -311,10 +313,10 @@ impl App {
info!("Recived receipt:\n{:#?}", receipt);
if receipt.title.contains("Bekreftelse") {
if receipt.title.contains("Bekreftelse") && !receipt.message.contains("allerede bestilt") {
} else {
Err("Did not get confirmation of room order".into())
Err(format!("Unable to verify room order: {}", receipt.message).into())
......@@ -124,7 +124,7 @@ fn run() -> Result<()> {
let client = Client::builder().cookie_store(true).build()?;
let project_dirs = directories::ProjectDirs::from("", "", env!("CARGO_PKG_NAME"));
if project_dirs.is_none() {
warn!("Unable to crate project directories");
warn!("Unable to create project directories");
let mut app = App {
<!DOCTYPE html>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>TP: Rombestilling</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link type="image/x-icon" href="" rel="shortcut icon"/>
<link type="image/x-icon" href="" rel="icon"/>
<!--[if lt IE 9]>
<link rel="stylesheet" href=""/><![endif]-->
<!--[if IE 9 ]>
<link rel="stylesheet" href=""/><![endif]-->
<!--[if IE 10 ]>
<link rel="stylesheet" href=""/><![endif]-->
<!--[if !IE ]><!-->
<link rel="stylesheet" href=""/><!--<![endif]-->
<!--[if lt IE 9]>
<script src=""></script>
<link rel="stylesheet" href="">
<link rel="stylesheet" href="css/rb.css?v=56.1"/>
<body class="inst_NTNU env_PROD">
<div class="page-head" >
<div class="grid pad-x--small">
<section id="header-logo">
<figure class="tp-logo">
<a href="" title="TP - Forside">
<img alt="logo" src="">
<h1 class="gray"><a href="./">Rombestilling</a></h1>
<section id="head-login">
<strong title="NTNU">NTNU</strong>
<li><a href="">Undervisning</a></li>
<li><a href="">Eksamen</a></li>
<li><a href="">Rombestilling</a></li>
<li><a href="">Administrasjon</a></li>
<li><a href="">Timeplaner</a></li>
<li><a href="">Rapporter</a></li>
<li><a href="">Preferanser</a></li>
<li><a href="" target="_blank">Brukerveiledninger</a></li>
<li><a href="" target="_blank">Om TP</a></li>
<label for="choose_lang">Språk / language
<ul id="languageChooser" class="">
<li class="selected"><a onClick="setLanguage('no');">Norsk</a></li>
<li ><a onclick="setLanguage('en');">English</a></li>
<li id="user-fullname">
<span id="head-login-user-fullname">Ole Martin Ødevald Ruud</span>
<span><a id="head-login-logout" href="">Logg&nbsp;ut</a></span>
<div class="page-content" >
<div class="tabs">
<section class="open">
<a href="./">Ny bestilling</a>
<section class=""">
<a href="./?mybookings=true">Vis mine bestillinger</a>
<form id="origform" name="origform" method="post" action="?" class="tabbed">
<div class="grid">
<section class="col-10--md col-8--lg">
<div class="whiteback">
Navn: Woot woot<br>
Id: 19h-STUDENT-OMORUUD-12</div>
<strong>Dato(er) og tid:</strong><br>
<span class="text--muted">Mandag</span><br>
02.09.2019, 08:00-09:00<br>
<span title="502K110"><a target="_blank" href="../timeplan/?type=room&id=502K110">Kobolt: K110</a>
<br /></span></div>
<input class="button button--primary" type="button" value="Ny bestilling" onClick="location = './'" name="x" />
<input class="button button--primary" type="submit" value="Ny bestilling med samme kriterier" name="back" />
<iframe frameborder="0" id="timeplaner" scrolling="no" src="mail.php?"
style="vertical-align: top;"></iframe>
<input type="hidden" name="start" value="08:00"/>
<input type="hidden" name="size" value=""/>
<input type="hidden" name="roomtype" value=""/>
<input type="hidden" name="duration" value="01:00"/>
<input type="hidden" name="area" value=""/>
<input type="hidden" name="building" value=""/>
<input type="hidden" name="preset_day" value="MON"/>
<input type="hidden" name="preset_date" value="2019-09-02"/>
<hr />
<div class="grid pad-x">
<div id="rombesttekst"></div>
<footer class="page-footer" >
<hr class="bottom"/>
<div class="grid pad-x">
<section class="col-3--lg ">
<figure class="uio-sickle">
<img src="" alt="Seglet" style="max-height: 75px;">
<section class="col-3--lg ">
<section class="col-3--lg ">
E-post: <span id="tp-email"></span>
<section class="col-3--lg ">
<h4>Ansvarlig for denne tjenesten</h4>
<a id="tp-responsible" href="">Avdeling for studieadministrasjon</a>
<a href="" style="margin-top: 1em; display: block;">Bruk av informasjonskapsler/cookies</a>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment