OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Forms
Oliver Güntherf1f9743dfabc
diff --git a/frontend/src/global_styles/content/_contextual.lsg b/frontend/src/global_styles/content/_contextual.lsgdeleted file mode 100644index 1efcf271e5d..00000000000--- a/frontend/src/global_styles/content/_contextual.lsg+++ /dev/null@@ -1,10 +0,0 @@-# Contextual text info--Provide some additional information on some content to the left of this span--```-<p>- Some text here- <span class="contextual-info -small">(Some contextual information for the text)</span>-</div>-```diff --git a/frontend/src/global_styles/content/_forms.lsg b/frontend/src/global_styles/content/_forms.lsgdeleted file mode 100644index f0d1e6a05f2..00000000000--- a/frontend/src/global_styles/content/_forms.lsg+++ /dev/null@@ -1,1233 +0,0 @@-# Forms--## Forms: Standard style--```-<form class="form">- <div class="form--field -required">- <label class="form--label">Text:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field">- </div>- </div>- </div>-- <hr class="form--separator" />- <button class="button -highlight">Save</button>- <button class="button">Cancel</button>-</form>-```--## Forms: Bordered style--```-<form class="form -bordered">- <div class="form--field -required">- <label class="form--label">Text:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field">- </div>- </div>- </div>-- <hr class="form--separator" />- <button class="button -highlight">Save</button>- <button class="button">Cancel</button>-</form>-```--## Forms: Bordered compressed style (less padding)--```-<form class="form -bordered -compressed">- <div class="form--field -required">- <label class="form--label">Text:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field">- </div>- </div>- </div>-- <hr class="form--separator" />- <button class="button -highlight">Save</button>- <button class="button">Cancel</button>-</form>-```--## Forms: Bordered style - Danger zone--```-<form class="form danger-zone">- <section class="form--section">- <h3 class="form--section-title">- Delete account <em>[email protected]</em>- </h3>- <p>- Your account will be deleted from the system. Therefore, you will no longer be able to log in with your current credentials. If you choose to become a user of this application again, you can do so by using the means this application grants.- </p>- <p>- Of the data you created as much as possible will be deleted. Note however, that data like work packages and wiki entries can not be deleted without impeding the work of the other users. Such data is hence reassigned to an account called "Deleted user".- </p>- <p class="danger-zone--warning">- <span class="icon icon-error"></span>- <span>Deleting your account is an irreversible action.</span>- </p>- <p>- Enter your login <em class="danger-zone--expected-value">[email protected]</em> to verify the deletion.- </p>- <div class="danger-zone--verification">- <input type="text"></input>- <button class="button -highlight" disabled>- <i class="button--icon icon-delete"></i>- <span class="button--text">Delete</span>- </button>- <a class="button -with-icon icon-cancel">- Cancel- </a>- </div>- </section>-</form>-```--## Forms: Standard layout--```-@full-width--<form class="form">- <section class="form--section">- <div class="form--field -required">- <label class="form--label">Text:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field">- </div>- </div>- <div class="form--field-instructions">- Write anything you like.- </div>- </div>- <div class="form--field -required">- <label class="form--label">Email:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="email" class="form--text-field" placeholder="a valid email">- </div>- </div>- <div class="form--field-extra-actions">- <a href="#">Request new email</a>- </div>- </div>- <div class="form--field -required">- <label class="form--label">Number:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="number" class="form--text-field">- </div>- <a href="#" class="form--field-inline-action">- <span class="">Add 5</span>- </a>- </div>- <div class="form--field-instructions">- Any number from 1 to 10!- </div>- </div>- <div class="form--field -required">- <label class="form--label">Long text:</label>- <div class="form--field-container">- <div class="form--text-area-container">- <textarea class="form--text-area">El resto della concluían sayo de velarte, calzas de velludo para las fiestas, con sus pantuflos de lo mesmo, y los días de entresemana se honraba con su vellorí de lo más fino.</textarea>- </div>- </div>- <div class="form--field-instructions">- Write more about anything.- </div>- </div>- <div class="form--field -required -no-label">- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field">- </div>- </div>- <div class="form--field-instructions">- This field has no label, which means you really can write what you like.- </div>- </div>- <div class="form--field -required -full-width">- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field">- </div>- </div>- <div class="form--field-instructions">- This field also has no label, but takes up the full width.- </div>- </div>- </section>-</form>-```--## Forms: Standard layout, wide labels--```-@full-width--<form class="form -wide-labels">- <section class="form--section">- <div class="form--field -required">- <label class="form--label">Text:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field">- </div>- </div>- </div>- <div class="form--field">- <label class="form--label">Email:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="email" class="form--text-field" placeholder="a valid email">- </div>- </div>- <div class="form--field-instructions">- Your personal email address.- </div>- </div>- <div class="form--field -required">- <label class="form--label">Amount:</label>- <div class="form--field-container">- <div class="form--field-affix">- <strong>€</strong>- </div>- <div class="form--text-field-container">- <input type="number" class="form--text-field">- </div>- <div class="form--field-affix">- per item- </div>- </div>- <div class="form--field-instructions">- The more, the better- </div>- </div>- <div class="form--field">- <label class="form--label">Telephone:</label>- <div class="form--field-container">- <div class="form--field-affix icon-context icon-phone">- </div>- <div class="form--text-field-container">- <input type="tel" class="form--text-field">- </div>- </div>- </div>- <div class="form--field -required">- <label class="form--label">Long text:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <textarea class="form--text-area">El resto della concluían sayo de velarte, calzas de velludo para las fiestas, con sus pantuflos de lo mesmo, y los días de entresemana se honraba con su vellorí de lo más fino.</textarea>- </div>- </div>- <div class="form--field-instructions">- Write more about anything.- </div>- </div>- <div class="form--field -required -no-label">- <div class="form--field-container">- <label class="form--label-with-check-box">- <div class="form--check-box-container">- <input type="checkbox" class="form--check-box">- </div>- Option 1- </label>- <label class="form--label-with-check-box">- <div class="form--check-box-container">- <input type="checkbox" class="form--check-box">- </div>- Option 2- </label>- </div>- <div class="form--field-instructions">- Selecting these option might be considered a dangerous operation.- </div>- </div>- </section>-</form>-```--## Forms: Multiple fields per row--```-@full-width--<form class="form">- <fieldset class="form--fieldset">- <legend class="form--fieldset-legend">Wichtige Daten</legend>- <div class="form--field -required">- <label class="form--label">Lieblingsstädte:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field" value="Leipzig">- </div>- <div class="form--text-field-container">- <input type="text" class="form--text-field" placeholder="Berlin">- </div>- <div class="form--text-field-container">- <input type="text" class="form--text-field" placeholder="Zürich">- </div>- <div class="form--text-field-container">- <input type="text" class="form--text-field" placeholder="Paris">- </div>- <div class="form--text-field-container">- <input type="text" class="form--text-field" placeholder="Rom">- </div>- </div>- </div>- <div class="form--field -required">- <label class="form--label">Geburtsdatum:</label>- <div class="form--field-container">- <div class="form--select-container">- <select class="form--select">- <option>01</option><option>02</option><option>03</option>- </select>- </div>- <div class="form--select-container">- <select class="form--select">- <option>Januar</option>- <option selected>Februar</option>- <option>März</option>- <option>April</option>- <option>Mai</option>- <option>Juni</option>- <option>Juli</option>- <option>August</option>- <option>September</option>- <option>Oktober</option>- <option>November</option>- <option>Dezember</option>- </select>- </div>- <div class="form--text-field-container">- <input type="number" class="form--text-field" placeholder="1984">- </div>- </div>- <div class="form--field-instructions">- One never lies about one's age.- </div>- </div>- <div class="form--field">- <label class="form--label">Benzinverbrauch:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="number" class="form--text-field" value="9">- </div>- <div class="form--field-affix">Liter</div>- <div class="form--field-affix">pro</div>- <div class="form--select-container">- <select class="form--select">- <option selected>km</option>- <option>Meile</option>- </select>- </div>- <div class="form--field-affix">auf</div>- <div class="form--select-container">- <select class="form--select">- <option selected>der Autobahn</option>- <option>der Stadt</option>- </select>- </div>- </div>- </div>- <div class="form--grouping" role="group" aria-labelledby="form-grouping-label">- <div id="form-grouping-label" class="form--grouping-label">Colors:</div>- <div class="form--grouping-row">- <div class="form--field">- <label class="form--label">Most favorite first:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field" placeholder="Green">- </div>- </div>- </div>- <div class="form--field">- <label class="form--label">Most favorite second:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field" placeholder="Blue">- </div>- </div>- </div>- </div>- <div class="form--grouping-row">- <div class="form--field">- <label class="form--label">Least favorite first:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field" placeholder="Magenta">- </div>- </div>- </div>- <div class="form--field">- <label class="form--label">Least favorite second:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field" placeholder="Orange">- </div>- </div>- </div>- </div>- </div>- </fieldset>-</form>-```--## Forms: Vertical layout--```-@full-width--<form class="form -vertical">- <section class="form--section">- <div class="grid-block">- <div class="form--field -required">- <label class="form--label">Text:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field">- </div>- </div>- <div class="form--field-instructions">- Write anything you like.- </div>- </div>- <div class="form--field">- <label class="form--label">Email:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="email" class="form--text-field" placeholder="a valid email">- </div>- </div>- <div class="form--field-extra-actions">- <a href="#">Request new email</a>- </div>- </div>- <div class="form--field -required">- <label class="form--label">Number:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="number" class="form--text-field">- </div>- <div class="form--field-affix">- unit- </div>- </div>- <div class="form--field-instructions">- Any number from 1 to 10!- </div>- </div>- </div>- <div class="grid-block">- <div class="form--field -required">- <label class="form--label">Long text:</label>- <div class="form--field-container">- <div class="form--text-area-container">- <textarea class="form--text-area">El resto della concluían sayo de velarte, calzas de velludo para las fiestas, con sus pantuflos de lo mesmo, y los días de entresemana se honraba con su vellorí de lo más fino.</textarea>- </div>- </div>- <div class="form--field-instructions">- Write more about anything.- </div>- </div>- </div>- </section>-</form>-```--## Forms: Sections and fieldsets--### standard--```-<form class="form -bordered">- <section class="form--section">- <div class="form--field -required">- <label class="form--label">Text:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field">- </div>- </div>- </div>- </section>- <section class="form--section">- <h3 class="form--section-title">Advanced information</h3>- <div class="form--field -required">- <label class="form--label">More text:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field">- </div>- </div>- </div>- </section>- <fieldset class="form--fieldset">- <legend class="form--fieldset-legend">- Even more advanced information- </legend>- <div class="form--field -required">- <label class="form--label">Even more text:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field">- </div>- </div>- </div>- </fieldset>-</form>-```--### with controls--```-<form class="form -bordered">- <fieldset class="form--fieldset">- <legend class="form--fieldset-legend">- Various information- </legend>- <div class="form--toolbar">- <span class="form--toolbar-item">- (<a href="#">Check all</a> | <a href="#">Uncheck all</a>)- </span>- </div>- <div class="form--field -wide-label">- <label class="form--label">Multiple choices:</label>- <div class="form--field-container -vertical">- <label class="form--label-with-check-box">- <div class="form--check-box-container">- <input type="checkbox" class="form--check-box">- </div>- Apple- </label>- <label class="form--label-with-check-box">- <div class="form--check-box-container">- <input type="checkbox" class="form--check-box">- </div>- Grapefruit- </label>- </div>- </div>- </fieldset>-</form>-```--### collapsible--```-<form class="form -bordered">- <fieldset class="form--fieldset -collapsible -collapsed">- <legend class="form--fieldset-legend">- <a href="#">Less important information</a>- </legend>- <div class="form--field -required" style="display:none">- <label class="form--label">Field:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field">- </div>- </div>- </div>- </fieldset>- <fieldset class="form--fieldset -collapsible">- <legend class="form--fieldset-legend">- <a href="#">More important information</a>- </legend>- <div class="form--field -required">- <label class="form--label">Field:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field">- </div>- </div>- </div>- </fieldset>-</form>-```--## Forms: Column layout--```-@full-width--<form class="form">- <div class="grid-block">- <div class="form--column">- <div class="form--field -required">- <label class="form--label">Text:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field">- </div>- </div>- <div class="form--field-instructions">- Write anything you like.- </div>- </div>- <div class="form--field">- <label class="form--label">Email:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="email" class="form--text-field" placeholder="a valid email">- </div>- </div>- <div class="form--field-extra-actions">- <a href="#">Request new email</a>- </div>- </div>- <div class="form--field -required">- <label class="form--label">Number:</label>- <div class="form--field-container">- <div class="form--text-field-container">- <input type="number" class="form--text-field">- </div>- <a href="#" class="form--field-inline-action">- <span class="">Add 5</span>- </a>- </div>- <div class="form--field-instructions">- Any number from 1 to 10!- </div>- </div>- </div>- <div class="form--column">- <div class="form--field -required">- <label class="form--label">Long text:</label>- <div class="form--field-container">- <div class="form--text-area-container">- <textarea class="form--text-area">El resto della concluían sayo de velarte, calzas de velludo para las fiestas, con sus pantuflos de lo mesmo, y los días de entresemana se honraba con su vellorí de lo más fino.</textarea>- </div>- </div>- <div class="form--field-instructions">- Write more about anything.- </div>- </div>- <div class="form--field -required -no-label">- <div class="form--field-container">- <div class="form--text-field-container">- <input type="text" class="form--text-field">- </div>- </div>- <div class="form--field-instructions">- This field has no label, which means you really can write what you like.- </div>- </div>- </div>- </div>-</form>-```--## Forms: Width categories--The modifier classes **-middle**, **-wide**, ... can be applied to the form-[input type]-container to limit the width of the element. Please note, that this only limits the max-width of the element. The fields will become slimmer if less space is available. Also note, that the max-width is specified as an absolute value. Without a modifier, the form field will take the full width available.--```-@full-width--<form class="form">- <section class="form--section">- <h3 class="form--section-title">Input type "text-field"</h3>- <div class="form--field -required">- <label class="form--label">Tiny:</label>- <div class="form--field-container">- <div class="form--text-field-container -tiny">- <input type="text" class="form--text-field">- </div>- </div>- </div>- <div class="form--field -required">- <label class="form--label">XSlim:</label>- <div class="form--field-container">- <div class="form--text-field-container -xslim">- <input type="text" class="form--text-field">- </div>- </div>- </div>- <div class="form--field -required">- <label class="form--label">Slim:</label>- <div class="form--field-container">- <div class="form--text-field-container -slim">- <input type="text" class="form--text-field">- </div>- </div>- </div>- <div class="form--field -required">- <label class="form--label">Middle:</label>- <div class="form--field-container">- <div class="form--text-field-container -middle">- <input type="text" class="form--text-field">- </div>- </div>- </div>- <div class="form--field">- <label class="form--label">Wide:</label>- <div class="form--field-container">- <div class="form--text-field-container -wide">- <input type="text" class="form--text-field">- </div>- </div>- </div>- <div class="form--field">- <label class="form--label">XWide:</label>- <div class="form--field-container">- <div class="form--text-field-container -xwide">- <input type="text" class="form--text-field">- </div>- </div>- </div>- <div class="form--field">- <label class="form--label">XXWide:</label>- <div class="form--field-container">- <div class="form--text-field-container -xxwide">- <input type="text" class="form--text-field">- </div>- </div>- </div>- </section>--- <section class="form--section">- <h3 class="form--section-title">Input type "text-area"</h3>- <div class="form--field -required">- <label class="form--label">Tiny:</label>- <div class="form--field-container">- <div class="form--text-area-container -tiny">- <textarea type="text-area" class="form--text-area"></textarea>- </div>- </div>- </div>- <div class="form--field -required">- <label class="form--label">XSlim:</label>- <div class="form--field-container">- <div class="form--text-area-container -xslim">- <textarea type="text-area" class="form--text-area"></textarea>- </div>- </div>- </div>- <div class="form--field -required">- <label class="form--label">Slim:</label>- <div class="form--field-container">- <div class="form--text-area-container -slim">- <textarea type="text-area" class="form--text-area"></textarea>- </div>- </div>- </div>- <div class="form--field -required">- <label class="form--label">Middle:</label>- <div class="form--field-container">- <div class="form--text-area-container -middle">- <textarea type="text-area" class="form--text-area"></textarea>- </div>- </div>- </div>- <div class="form--field">- <label class="form--label">Wide:</label>- <div class="form--field-container">- <div class="form--text-area-container -wide">- <textarea type="text-area" class="form--text-area"></textarea>- </div>- </div>- </div>- <div class="form--field">- <label class="form--label">XWide:</label>- <div class="form--field-container">- <div class="form--text-area-container -xwide">- <textarea type="text-area" class="form--text-area"></textarea>- </div>- </div>- </div>- <div class="form--field">- <label class="form--label">XXWide:</label>- <div class="form--field-container">- <div class="form--text-area-container -xxwide">- <textarea type="text-area" class="form--text-area"></textarea>- </div>- </div>- </div>- </section>--- <section class="form--section">- <h3 class="form--section-title">Input type "select"</h3>- <div class="form--field -required">- <label class="form--label">Tiny:</label>- <div class="form--field-container">- <div class="form--select-container -tiny">- <select class="form--select">- <option>1</option>- <option>2</option>- <option>3</option>- </select>- </div>- </div>- </div>- <div class="form--field -required">- <label class="form--label">XSlim:</label>- <div class="form--field-container">- <div class="form--select-container -xslim">- <select class="form--select">- <option>one</option>- <option>two</option>- <option>three</option>- </select>- </div>- </div>- </div>- <div class="form--field -required">- <label class="form--label">Slim:</label>- <div class="form--field-container">- <div class="form--select-container -slim">- <select class="form--select">- <option>one</option>- <option>two</option>- <option>three</option>- </select>- </div>- </div>- </div>- <div class="form--field -required">- <label class="form--label">Middle:</label>- <div class="form--field-container">- <div class="form--select-container -middle">- <select class="form--select">- <option>one</option>- <option>two</option>- <option>three</option>- </select>- </div>- </div>- </div>- <div class="form--field -required">- <label class="form--label">Wide:</label>- <div class="form--field-container">- <div class="form--select-container -wide">- <select class="form--select">- <option>one</option>- <option>two</option>- <option>three</option>- </select>- </div>- </div>- </div>- <div class="form--field -required">- <label class="form--label">XWide:</label>- <div class="form--field-container">- <div class="form--select-container -xwide">- <select class="form--select">- <option>one</option>- <option>two</option>- <option>three</option>- </select>- </div>- </div>- </div>- <div class="form--field -required">- <label class="form--label">XXWide:</label>- <div class="form--field-container">- <div class="form--select-container -xxwide">- <select class="form--select">- <option>one</option>- <option>two</option>- <option>three</option>- </select>- </div>- </div>- </div>- </section>-</form>-```--# Forms: Attachment fieldsets--```-<fieldset id="attachments" class="form--fieldset -collapsible">- <legend class="form--fieldset-legend" title="Show/Hide attachments" >- <a href="#">Files<span class="fieldset-toggle-state-label hidden-for-sighted">expanded</span></a>- </legend>- <div style="">- <div>- <div class="grid-block" id="attachment_template">- <div class="form--field">- <div class="attachment_field form--field-container -vertical -shrink">- <div class="form--file-container">- <input class="attachment_choose_file" name="attachments[1][file]" size="15" type="file"> </div>- </div>- </div>- <div class="form--field">- <label class="form-label">- Description- </label>- <div class="form--text-field-container">- <input name="attachments[1][description]" size="38" type="text" value="">- </div>- </div>- </div>- <div class="grid-block" id="">- <div class="form--field">- <div class="attachment_field form--field-container -vertical -shrink">- <div class="form--file-container">- <input class="attachment_choose_file" name="attachments[2][file]" size="15" type="file"> </div>- </div>- </div>- <div class="form--field">- <label class="form-label">- Description- </label>- <div class="form--text-field-container">- <input name="attachments[2][description]" size="38" type="text" value="">- </div>- </div>- </div></div>- <span class="add-another-file">- <a href="#">Add another file</a>- (Maximum size: 5 MB)- </span>- </div>-</fieldset>-```--# Forms: Text fields--## Default text fields--### Standalone--```-<label>Text:<input type="text" class="form--text-field"></label>-<label>Email:<input type="email" class="form--text-field" placeholder="a valid email"></label>-<label>Number:<input type="number" class="form--text-field"></label>-```--## Text field sizes--```-<label>Tiny:<input type="text" class="form--text-field -tiny" value="a tiny value"></label>--<label>Small:<input type="text" class="form--text-field -slim" value="a small value"></label>--<label>Large:<input type="text" class="form--text-field -large" value="a large value"></label>-```--## Plain text fields--_with no classes applied (uses default Foundation form styling)_--```-<label>Text:<input type="text"></label>-<label>Email:<input type="email" placeholder="a valid email"></label>-<label>Number:<input type="number"></label>-```--# Forms: Text areas--## Default text areas--### Standalone--```-<textarea class="form--text-area">-Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.-</textarea>-```--## Plain text areas--_with no classes applied (uses default Foundation form styling)_--```-<textarea>-Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.-</textarea>-```--# Forms: Checkboxes--## Default checkboxes--### Standalone--```-<label class="form--label-with-check-box -required">- <div class="form--check-box-container">- <input type="checkbox" class="form--check-box">- </div>- Pera-</label>-<label class="form--label-with-check-box -required">- <div class="form--check-box-container">- <input type="checkbox" class="form--check-box">- </div>- Maracujá-</label>-<label class="form--label-with-check-box">- <div class="form--check-box-container">- <input type="checkbox" class="form--check-box">- </div>- Abacaxi-</label>-```--### Within a form--```-<form class="form">- <div class="form--field">- <label class="form--label" for="checkbox_example_choice2">Eat fruit:</label>- <div class="form--field-container">- <div class="form--check-box-container">- <input type="checkbox" class="form--check-box" id="checkbox_example_choice2">- </div>- </div>- </div>-</form>-```--### Multiple, within a form--```-<form class="form">- <div class="form--field">- <label class="form--label">Multiple choices:</label>- <div class="form--field-container -vertical">- <label class="form--label-with-check-box">- <div class="form--check-box-container">- <input type="checkbox" class="form--check-box">- </div>- Apple- </label>- <label class="form--label-with-check-box">- <div class="form--check-box-container">- <input type="checkbox" class="form--check-box">- </div>- Grapefruit- </label>- <label class="form--label-with-check-box">- <div class="form--check-box-container">- <input type="checkbox" class="form--check-box">- </div>- Banana- </label>- </div>- </div>-</form>-```--# Forms: Radio buttons--## Within a form, multiple--```-<form class="form">- <div class="form--field">- <label class="form--label" for="radio_button_example_choice1">Foo</label>- <div class="form--field-container">- <div class="form--radio-button-container">- <input type="radio" class="form--radio-button" id="radio_button_example_choice1" value="foo" name="choice">- </div>- </div>- </div>- <div class="form--field">- <label class="form--label" for="radio_button_example_choice2">Bar</label>- <div class="form--field-container">- <div class="form--radio-button-container">- <input type="radio" class="form--radio-button" id="radio_button_example_choice2" value="bar" name="choice">- </div>- </div>- </div>-</form>-```--# Forms: Select--## Default selects--### Standalone--```-<select class="form--select">- <option>one</option>- <option>two</option>- <option>three</option>-</select>-```--```-<select class="form--select" multiple>- <option>one</option>- <option>two</option>- <option>three</option>-</select>-```--```-<select class="form--select">- <optgroup label="group one">- <option>one dot one</option>- </optgroup>- <optgroup label="group two">- <option>two dot one</option>- <option>two dot two</option>- </optgroup>-</select>-```--### Within a form--```-<form class="form">- <div class="form--field">- <label class="form--label">Oranges:</label>- <div class="form--field-container">- <div class="form--select-container">- <select class="form--select">- <option>one</option>- <option>two</option>- <option>three</option>- </select>- </div>- </div>- <div class="form--field-instructions">- Oranges are rich in Vitamin C. Eat more than two!- </div>- </div>- <div class="form--field">- <label class="form--label">Apples:</label>- <div class="form--field-container">- <div class="form--select-container">- <select class="form--select" multiple>- <option>one</option>- <option>two</option>- <option>three</option>- </select>- </div>- </div>- </div>-</form>-```--## Select Sizes--```-<select class="form--select -tiny">- <option>one</option>- <option>two</option>- <option>three</option>-</select>--<select class="form--select -small">- <option>one</option>- <option>two</option>- <option>three</option>-</select>--<select class="form--select -large">- <option>one</option>- <option>two</option>- <option>three</option>-</select>-```--## Narrow select--_By default, a `form--select` will take the full width of its container element.-In most cases it is recommended to apply a width to the container element, but-in certain circumstances the `-narrow` variant may be preferable._--```-<select class="form--select -narrow">- <option>one</option>- <option>two</option>- <option>three</option>-</select>--<select class="form--select -small -narrow">- <option>one</option>- <option>two</option>- <option>three</option>-</select>-```--## Plain selects--_with no classes applied (uses default Foundation form styling)_--```-<select>- <option>one</option>- <option>two</option>- <option>three</option>-</select>-```--# Forms: Checkbox Matrices--```-<table class="form--matrix">- <thead>- <tr class="form--matrix-header-row">- <th class="form--matrix-header-cell">Attribute name</th>- <th class="form--matrix-header-cell">User access</th>- <th class="form--matrix-header-cell">Admin access</th>- </tr>- </thead>- <tbody>- <tr class="form--matrix-row">- <td class="form--matrix-cell">- Project- </td>- <td class="form--matrix-checkbox-cell">- <span class="form--check-box-container"><input class="form--check-box" id="attributes_project" name="settings[attributes][]" type="checkbox" value="project"></span>- </td>- <td class="form--matrix-checkbox-cell">- <span class="form--check-box-container"><input class="form--check-box" id="admin_attributes_project" name="settings[admin_attributes][]" type="checkbox" value="project"></span>- </td>- </tr>- <tr class="form--matrix-row">- <td class="form--matrix-cell">- Type- </td>- <td class="form--matrix-checkbox-cell">- <span class="form--check-box-container"><input checked="checked" class="form--check-box" id="attributes_type" name="settings[attributes][]" type="checkbox" value="type"></span>- </td>- <td class="form--matrix-checkbox-cell">- <span class="form--check-box-container"><input class="form--check-box" id="admin_attributes_type" name="settings[admin_attributes][]" type="checkbox" value="type"></span>- </td>- </tr>- <tr class="form--matrix-row">- <td class="form--matrix-cell">- Parent- </td>- <td class="form--matrix-checkbox-cell">- <span class="form--check-box-container"><input class="form--check-box" id="attributes_parent" name="settings[attributes][]" type="checkbox" value="parent"></span>- </td>- <td class="form--matrix-checkbox-cell">- <span class="form--check-box-container"><input class="form--check-box" id="admin_attributes_parent" name="settings[admin_attributes][]" type="checkbox" value="parent"></span>- </td>- </tr>- </tbody>-</table>-```--# Forms: Inline buttons--```-<div class="form--field">- <div class="form--field-container">- <div class="form--field-inline-buttons-container">- <button class="form--field-inline-button button -highlight">Highlight</button>- <button class="form--field-inline-button button -highlight-inverted">Alternative 1</button>- <button class="form--field-inline-button button -highlight-inverted">Alternative 2</button>- </div>- </div>-</div>-```diff --git a/spec/components/previews/contextual_info_text_preview.rb b/spec/components/previews/contextual_info_text_preview.rbnew file mode 100644index 00000000000..a34ec242306--- /dev/null+++ b/spec/components/previews/contextual_info_text_preview.rb@@ -0,0 +1,4 @@+# @logical_path OpenProject+class ContextualInfoTextPreview < Lookbook::Preview+ def default; end+enddiff --git a/spec/components/previews/contextual_info_text_preview/default.html.erb b/spec/components/previews/contextual_info_text_preview/default.html.erbnew file mode 100644index 00000000000..afbcd45291e--- /dev/null+++ b/spec/components/previews/contextual_info_text_preview/default.html.erb@@ -0,0 +1,4 @@+<p>+ Some text here+ <span class="contextual-info -small">(Some contextual information for the text)</span>+</p>diff --git a/spec/components/previews/danger_zone_preview.rb b/spec/components/previews/danger_zone_preview.rbnew file mode 100644index 00000000000..945cdb481e2--- /dev/null+++ b/spec/components/previews/danger_zone_preview.rb@@ -0,0 +1,8 @@+# @logical_path OpenProject+class FormsPreview < Lookbook::Preview+ def default; end++ def bordered; end++ def compressed; end+enddiff --git a/spec/components/previews/danger_zone_preview/default.html.erb b/spec/components/previews/danger_zone_preview/default.html.erbnew file mode 100644index 00000000000..9970042f875--- /dev/null+++ b/spec/components/previews/danger_zone_preview/default.html.erb@@ -0,0 +1,100 @@+<section class="widget-boxes -flex">++ <!-- Widget box with arrows: Single-line -->+ <div class="widget-box">+ <h3 class="widget-box--header">+ <div class="widget-box--header-title title-container">+ <h2 class="editable-toolbar-title--fixed">Widget Box</h2>+ </div>+ </h3>+ <p class="widget-box--additional-info">This widget box can be used to display content belonging to one subject.</p>+ <ul class="widget-box--arrow-links">+ <li>+ <a>Go to Link 1</a>+ </li>+ <li>+ <a>Go to link 2</a>+ </li>+ </ul>+ </div>++ <!-- Widget box with arrows: Multiline -->+ <div class="widget-box">+ <h3 class="widget-box--header">+ <div class="widget-box--header-title title-container">+ <h2 class="editable-toolbar-title--fixed">Widget Box 2</h2>+ </div>+ </h3>+ <ul class="widget-box--arrow-links">+ <li class="-widget-box--arrow-multiline">+ <div>+ <img class="avatar-mini" title="OpenProject Admin" src="https://via.placeholder.com/128" alt="Avatar">+ <a href="">Demo project</a>:+ <a href="">Important news</a>+ <br>+ <p class="widget-box--additional-info">Added by+ <a title="User OpenProject Admin" href="">OpenProject Admin</a>+ <time title="10/31/2018 09:15 AM" class="timestamp">3 months</time> ago+ </p>+ </div>+ </li>+ <li class="-widget-box--arrow-multiline">+ <div>+ <img class="avatar-mini" title="OpenProject Admin" src="https://via.placeholder.com/128" alt="Avatar">+ <a href="">Demo project</a>:+ <a href="">Great news !!!</a>+ <br>+ <p class="widget-box--additional-info">Added by+ <a title="User OpenProject Admin" href="">OpenProject Admin</a>+ <time title="08/14/2018 11:04 AM" class="timestamp">5 months</time> ago+ </p>+ </div>+ </li>+ </ul>+ </div>++ <!-- Widget box with button -->+ <div class="widget-box">+ <h3 class="widget-box--header">+ <div class="widget-box--header-title title-container">+ <h2 class="editable-toolbar-title--fixed">Widget Box 3</h2>+ </div>+ </h3>+ <div class="overview">+ <p>+ Lorem ipsum dolor sit amet, his ei propriae suscipit.+ Sit in atqui accumsan ponderum, eum ut luptatum lobortis, has ei tota illud detraxit.+ </p>+ </div>+ <div class="widget-box--buttons">+ <a class="button -highlight" href="">+ <span class="spot-icon spot-icon_edit"></span>+ <span>Edit</span>+ </a>+ </div>+ </div>++ <!-- Widget box with enumeration and multiple buttons -->+ <div class="widget-box">+ <h3 class="widget-box--header">+ <div class="widget-box--header-title title-container">+ <h2 class="editable-toolbar-title--fixed">Widget Box 4</h2>+ </div>+ </h3>+ <ul class="widget-box--enumeration">+ <li>Enum1</li>+ <li>Enum2</li>+ <li>Enum3</li>+ </ul>+ <div class="widget-box--buttons">+ <a class="button -alt-highlight" title="Add" href="">+ <span class="spot-icon spot-icon_add"></span>+ <span>Add</span>+ </a>+ <a class="button -highlight-inverted" title="View all" href="">+ <span class="button--text">View all</span>+ </a>+ </div>+ </div>++</section>diff --git a/spec/components/previews/forms_preview.rb b/spec/components/previews/forms_preview.rbnew file mode 100644index 00000000000..d67e6c2947c--- /dev/null+++ b/spec/components/previews/forms_preview.rb@@ -0,0 +1,24 @@+# @logical_path OpenProject+class FormsPreview < Lookbook::Preview+ def default; end++ def bordered; end++ def bordered_compressed; end++ def collapsible; end++ def controls; end++ def field_types; end++ def field_widths; end++ def multiple_fields_per_row; end++ def sections_and_fieldsets; end++ def vertical_layout; end++ def wide_labels; end+enddiff --git a/spec/components/previews/forms_preview/bordered.html.erb b/spec/components/previews/forms_preview/bordered.html.erbnew file mode 100644index 00000000000..fa68960d91f--- /dev/null+++ b/spec/components/previews/forms_preview/bordered.html.erb@@ -0,0 +1,14 @@+<form class="form -bordered">+ <div class="form--field -required">+ <label class="form--label">Text:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="text" class="form--text-field">+ </div>+ </div>+ </div>++ <hr class="form--separator" />+ <button class="button -highlight">Save</button>+ <button class="button">Cancel</button>+</form>diff --git a/spec/components/previews/forms_preview/bordered_compressed.html.erb b/spec/components/previews/forms_preview/bordered_compressed.html.erbnew file mode 100644index 00000000000..389f61e263f--- /dev/null+++ b/spec/components/previews/forms_preview/bordered_compressed.html.erb@@ -0,0 +1,14 @@+<form class="form -bordered -compressed">+ <div class="form--field -required">+ <label class="form--label">Text:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="text" class="form--text-field">+ </div>+ </div>+ </div>++ <hr class="form--separator" />+ <button class="button -highlight">Save</button>+ <button class="button">Cancel</button>+</form>diff --git a/spec/components/previews/forms_preview/collapsible.html.erb b/spec/components/previews/forms_preview/collapsible.html.erbnew file mode 100644index 00000000000..daea2e386bb--- /dev/null+++ b/spec/components/previews/forms_preview/collapsible.html.erb@@ -0,0 +1,28 @@+<form class="form -bordered">+ <fieldset class="form--fieldset -collapsible -collapsed">+ <legend class="form--fieldset-legend">+ <a href="#">Less important information</a>+ </legend>+ <div class="form--field -required" style="display:none">+ <label class="form--label">Field:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="text" class="form--text-field">+ </div>+ </div>+ </div>+ </fieldset>+ <fieldset class="form--fieldset -collapsible">+ <legend class="form--fieldset-legend">+ <a href="#">More important information</a>+ </legend>+ <div class="form--field -required">+ <label class="form--label">Field:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="text" class="form--text-field">+ </div>+ </div>+ </div>+ </fieldset>+</form>diff --git a/spec/components/previews/forms_preview/controls.html.erb b/spec/components/previews/forms_preview/controls.html.erbnew file mode 100644index 00000000000..7495a2e44e5--- /dev/null+++ b/spec/components/previews/forms_preview/controls.html.erb@@ -0,0 +1,29 @@+<form class="form -bordered">+ <fieldset class="form--fieldset">+ <legend class="form--fieldset-legend">+ Various information+ </legend>+ <div class="form--toolbar">+ <span class="form--toolbar-item">+ (<a href="#">Check all</a> | <a href="#">Uncheck all</a>)+ </span>+ </div>+ <div class="form--field -wide-label">+ <label class="form--label">Multiple choices:</label>+ <div class="form--field-container -vertical">+ <label class="form--label-with-check-box">+ <div class="form--check-box-container">+ <input type="checkbox" class="form--check-box">+ </div>+ Apple+ </label>+ <label class="form--label-with-check-box">+ <div class="form--check-box-container">+ <input type="checkbox" class="form--check-box">+ </div>+ Grapefruit+ </label>+ </div>+ </div>+ </fieldset>+</form>diff --git a/spec/components/previews/forms_preview/default.html.erb b/spec/components/previews/forms_preview/default.html.erbnew file mode 100644index 00000000000..01fe4cea577--- /dev/null+++ b/spec/components/previews/forms_preview/default.html.erb@@ -0,0 +1,71 @@+<form class="form">+ <section class="form--section">+ <div class="form--field -required">+ <label class="form--label">Text:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="text" class="form--text-field">+ </div>+ </div>+ <div class="form--field-instructions">+ Write anything you like.+ </div>+ </div>+ <div class="form--field -required">+ <label class="form--label">Email:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="email" class="form--text-field" placeholder="a valid email">+ </div>+ </div>+ <div class="form--field-extra-actions">+ <a href="#">Request new email</a>+ </div>+ </div>+ <div class="form--field -required">+ <label class="form--label">Number:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="number" class="form--text-field">+ </div>+ <a href="#" class="form--field-inline-action">+ <span class="">Add 5</span>+ </a>+ </div>+ <div class="form--field-instructions">+ Any number from 1 to 10!+ </div>+ </div>+ <div class="form--field -required">+ <label class="form--label">Long text:</label>+ <div class="form--field-container">+ <div class="form--text-area-container">+ <textarea class="form--text-area">El resto della concluían sayo de velarte, calzas de velludo para las fiestas, con sus pantuflos de lo mesmo, y los días de entresemana se honraba con su vellorí de lo más fino.</textarea>+ </div>+ </div>+ <div class="form--field-instructions">+ Write more about anything.+ </div>+ </div>+ <div class="form--field -required -no-label">+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="text" class="form--text-field">+ </div>+ </div>+ <div class="form--field-instructions">+ This field has no label, which means you really can write what you like.+ </div>+ </div>+ <div class="form--field -required -full-width">+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="text" class="form--text-field">+ </div>+ </div>+ <div class="form--field-instructions">+ This field also has no label, but takes up the full width.+ </div>+ </div>+ </section>+</form>diff --git a/spec/components/previews/forms_preview/field_types.html.erb b/spec/components/previews/forms_preview/field_types.html.erbnew file mode 100644index 00000000000..7ed22a8c0d3--- /dev/null+++ b/spec/components/previews/forms_preview/field_types.html.erb@@ -0,0 +1,249 @@+<section class="form--section">+ <h3 class="form--section-title">Text fields</h3>++ <label>Text:<input type="text" class="form--text-field"></label>+ <label>Email:<input type="email" class="form--text-field" placeholder="a valid email"></label>+ <label>Number:<input type="number" class="form--text-field"></label>+</section>++<section class="form--section">+ <h3 class="form--section-title">Text areas</h3>++ <textarea class="form--text-area">+Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.+ </textarea>++</section>+++<section class="form--section">+ <h3 class="form--section-title">Checkboxes</h3>++ <label class="form--label-with-check-box -required">+ <div class="form--check-box-container">+ <input type="checkbox" class="form--check-box">+ </div>+ Pera+ </label>+ <label class="form--label-with-check-box -required">+ <div class="form--check-box-container">+ <input type="checkbox" class="form--check-box">+ </div>+ Maracujá+ </label>+ <label class="form--label-with-check-box">+ <div class="form--check-box-container">+ <input type="checkbox" class="form--check-box">+ </div>+ Abacaxi+ </label>+++ <form class="form">+ <div class="form--field">+ <label class="form--label" for="checkbox_example_choice2">Eat fruit:</label>+ <div class="form--field-container">+ <div class="form--check-box-container">+ <input type="checkbox" class="form--check-box" id="checkbox_example_choice2">+ </div>+ </div>+ </div>+ </form>+++ <form class="form">+ <div class="form--field">+ <label class="form--label">Multiple choices:</label>+ <div class="form--field-container -vertical">+ <label class="form--label-with-check-box">+ <div class="form--check-box-container">+ <input type="checkbox" class="form--check-box">+ </div>+ Apple+ </label>+ <label class="form--label-with-check-box">+ <div class="form--check-box-container">+ <input type="checkbox" class="form--check-box">+ </div>+ Grapefruit+ </label>+ <label class="form--label-with-check-box">+ <div class="form--check-box-container">+ <input type="checkbox" class="form--check-box">+ </div>+ Banana+ </label>+ </div>+ </div>+ </form>+</section>+++<section class="form--section">+ <h3 class="form--section-title">Radio buttons</h3>+ <form class="form">+ <div class="form--field">+ <label class="form--label" for="radio_button_example_choice1">Foo</label>+ <div class="form--field-container">+ <div class="form--radio-button-container">+ <input type="radio" class="form--radio-button" id="radio_button_example_choice1" value="foo" name="choice">+ </div>+ </div>+ </div>+ <div class="form--field">+ <label class="form--label" for="radio_button_example_choice2">Bar</label>+ <div class="form--field-container">+ <div class="form--radio-button-container">+ <input type="radio" class="form--radio-button" id="radio_button_example_choice2" value="bar" name="choice">+ </div>+ </div>+ </div>+ </form>+</section>++<section class="form--section">+ <h3 class="form--section-title">Select fields</h3>++ <select class="form--select">+ <option>one</option>+ <option>two</option>+ <option>three</option>+ </select>+++ <select class="form--select" multiple>+ <option>one</option>+ <option>two</option>+ <option>three</option>+ </select>+++ <select class="form--select">+ <optgroup label="group one">+ <option>one dot one</option>+ </optgroup>+ <optgroup label="group two">+ <option>two dot one</option>+ <option>two dot two</option>+ </optgroup>+ </select>+++ <form class="form">+ <div class="form--field">+ <label class="form--label">Oranges:</label>+ <div class="form--field-container">+ <div class="form--select-container">+ <select class="form--select">+ <option>one</option>+ <option>two</option>+ <option>three</option>+ </select>+ </div>+ </div>+ <div class="form--field-instructions">+ Oranges are rich in Vitamin C. Eat more than two!+ </div>+ </div>+ <div class="form--field">+ <label class="form--label">Apples:</label>+ <div class="form--field-container">+ <div class="form--select-container">+ <select class="form--select" multiple>+ <option>one</option>+ <option>two</option>+ <option>three</option>+ </select>+ </div>+ </div>+ </div>+ </form>+</section>+++<section class="form--section">+ <h3 class="form--section-title">Narrow select</h3>++ <p>By default, a `form--select` will take the full width of its container element.+ In most cases it is recommended to apply a width to the container element, but+ in certain circumstances the `-narrow` variant may be preferable.</p>+++ <select class="form--select -narrow">+ <option>one</option>+ <option>two</option>+ <option>three</option>+ </select>++ <select class="form--select -small -narrow">+ <option>one</option>+ <option>two</option>+ <option>three</option>+ </select>++</section>++++<section class="form--section">+ <h3 class="form--section-title">Checkbox matrices</h3>+ <table class="form--matrix">+ <thead>+ <tr class="form--matrix-header-row">+ <th class="form--matrix-header-cell">Attribute name</th>+ <th class="form--matrix-header-cell">User access</th>+ <th class="form--matrix-header-cell">Admin access</th>+ </tr>+ </thead>+ <tbody>+ <tr class="form--matrix-row">+ <td class="form--matrix-cell">+ Project+ </td>+ <td class="form--matrix-checkbox-cell">+ <span class="form--check-box-container"><input class="form--check-box" id="attributes_project" name="settings[attributes][]" type="checkbox" value="project"></span>+ </td>+ <td class="form--matrix-checkbox-cell">+ <span class="form--check-box-container"><input class="form--check-box" id="admin_attributes_project" name="settings[admin_attributes][]" type="checkbox" value="project"></span>+ </td>+ </tr>+ <tr class="form--matrix-row">+ <td class="form--matrix-cell">+ Type+ </td>+ <td class="form--matrix-checkbox-cell">+ <span class="form--check-box-container"><input checked="checked" class="form--check-box" id="attributes_type" name="settings[attributes][]" type="checkbox" value="type"></span>+ </td>+ <td class="form--matrix-checkbox-cell">+ <span class="form--check-box-container"><input class="form--check-box" id="admin_attributes_type" name="settings[admin_attributes][]" type="checkbox" value="type"></span>+ </td>+ </tr>+ <tr class="form--matrix-row">+ <td class="form--matrix-cell">+ Parent+ </td>+ <td class="form--matrix-checkbox-cell">+ <span class="form--check-box-container"><input class="form--check-box" id="attributes_parent" name="settings[attributes][]" type="checkbox" value="parent"></span>+ </td>+ <td class="form--matrix-checkbox-cell">+ <span class="form--check-box-container"><input class="form--check-box" id="admin_attributes_parent" name="settings[admin_attributes][]" type="checkbox" value="parent"></span>+ </td>+ </tr>+ </tbody>+ </table>+</section>+++<section class="form--section">+ <h3 class="form--section-title">Inline buttons</h3>++ <div class="form--field">+ <div class="form--field-container">+ <div class="form--field-inline-buttons-container">+ <button class="form--field-inline-button button -highlight">Highlight</button>+ <button class="form--field-inline-button button -highlight-inverted">Alternative 1</button>+ <button class="form--field-inline-button button -highlight-inverted">Alternative 2</button>+ </div>+ </div>+ </div>+</section>diff --git a/spec/components/previews/forms_preview/field_widths.html.erb b/spec/components/previews/forms_preview/field_widths.html.erbnew file mode 100644index 00000000000..466031dfbbd--- /dev/null+++ b/spec/components/previews/forms_preview/field_widths.html.erb@@ -0,0 +1,211 @@+<form class="form">+ <section class="form--section">+ <h3 class="form--section-title">Input type "text-field"</h3>+ <div class="form--field -required">+ <label class="form--label">Tiny:</label>+ <div class="form--field-container">+ <div class="form--text-field-container -tiny">+ <input type="text" class="form--text-field">+ </div>+ </div>+ </div>+ <div class="form--field -required">+ <label class="form--label">XSlim:</label>+ <div class="form--field-container">+ <div class="form--text-field-container -xslim">+ <input type="text" class="form--text-field">+ </div>+ </div>+ </div>+ <div class="form--field -required">+ <label class="form--label">Slim:</label>+ <div class="form--field-container">+ <div class="form--text-field-container -slim">+ <input type="text" class="form--text-field">+ </div>+ </div>+ </div>+ <div class="form--field -required">+ <label class="form--label">Middle:</label>+ <div class="form--field-container">+ <div class="form--text-field-container -middle">+ <input type="text" class="form--text-field">+ </div>+ </div>+ </div>+ <div class="form--field">+ <label class="form--label">Wide:</label>+ <div class="form--field-container">+ <div class="form--text-field-container -wide">+ <input type="text" class="form--text-field">+ </div>+ </div>+ </div>+ <div class="form--field">+ <label class="form--label">XWide:</label>+ <div class="form--field-container">+ <div class="form--text-field-container -xwide">+ <input type="text" class="form--text-field">+ </div>+ </div>+ </div>+ <div class="form--field">+ <label class="form--label">XXWide:</label>+ <div class="form--field-container">+ <div class="form--text-field-container -xxwide">+ <input type="text" class="form--text-field">+ </div>+ </div>+ </div>+ </section>+++ <section class="form--section">+ <h3 class="form--section-title">Input type "text-area"</h3>+ <div class="form--field -required">+ <label class="form--label">Tiny:</label>+ <div class="form--field-container">+ <div class="form--text-area-container -tiny">+ <textarea type="text-area" class="form--text-area"></textarea>+ </div>+ </div>+ </div>+ <div class="form--field -required">+ <label class="form--label">XSlim:</label>+ <div class="form--field-container">+ <div class="form--text-area-container -xslim">+ <textarea type="text-area" class="form--text-area"></textarea>+ </div>+ </div>+ </div>+ <div class="form--field -required">+ <label class="form--label">Slim:</label>+ <div class="form--field-container">+ <div class="form--text-area-container -slim">+ <textarea type="text-area" class="form--text-area"></textarea>+ </div>+ </div>+ </div>+ <div class="form--field -required">+ <label class="form--label">Middle:</label>+ <div class="form--field-container">+ <div class="form--text-area-container -middle">+ <textarea type="text-area" class="form--text-area"></textarea>+ </div>+ </div>+ </div>+ <div class="form--field">+ <label class="form--label">Wide:</label>+ <div class="form--field-container">+ <div class="form--text-area-container -wide">+ <textarea type="text-area" class="form--text-area"></textarea>+ </div>+ </div>+ </div>+ <div class="form--field">+ <label class="form--label">XWide:</label>+ <div class="form--field-container">+ <div class="form--text-area-container -xwide">+ <textarea type="text-area" class="form--text-area"></textarea>+ </div>+ </div>+ </div>+ <div class="form--field">+ <label class="form--label">XXWide:</label>+ <div class="form--field-container">+ <div class="form--text-area-container -xxwide">+ <textarea type="text-area" class="form--text-area"></textarea>+ </div>+ </div>+ </div>+ </section>+++ <section class="form--section">+ <h3 class="form--section-title">Input type "select"</h3>+ <div class="form--field -required">+ <label class="form--label">Tiny:</label>+ <div class="form--field-container">+ <div class="form--select-container -tiny">+ <select class="form--select">+ <option>1</option>+ <option>2</option>+ <option>3</option>+ </select>+ </div>+ </div>+ </div>+ <div class="form--field -required">+ <label class="form--label">XSlim:</label>+ <div class="form--field-container">+ <div class="form--select-container -xslim">+ <select class="form--select">+ <option>one</option>+ <option>two</option>+ <option>three</option>+ </select>+ </div>+ </div>+ </div>+ <div class="form--field -required">+ <label class="form--label">Slim:</label>+ <div class="form--field-container">+ <div class="form--select-container -slim">+ <select class="form--select">+ <option>one</option>+ <option>two</option>+ <option>three</option>+ </select>+ </div>+ </div>+ </div>+ <div class="form--field -required">+ <label class="form--label">Middle:</label>+ <div class="form--field-container">+ <div class="form--select-container -middle">+ <select class="form--select">+ <option>one</option>+ <option>two</option>+ <option>three</option>+ </select>+ </div>+ </div>+ </div>+ <div class="form--field -required">+ <label class="form--label">Wide:</label>+ <div class="form--field-container">+ <div class="form--select-container -wide">+ <select class="form--select">+ <option>one</option>+ <option>two</option>+ <option>three</option>+ </select>+ </div>+ </div>+ </div>+ <div class="form--field -required">+ <label class="form--label">XWide:</label>+ <div class="form--field-container">+ <div class="form--select-container -xwide">+ <select class="form--select">+ <option>one</option>+ <option>two</option>+ <option>three</option>+ </select>+ </div>+ </div>+ </div>+ <div class="form--field -required">+ <label class="form--label">XXWide:</label>+ <div class="form--field-container">+ <div class="form--select-container -xxwide">+ <select class="form--select">+ <option>one</option>+ <option>two</option>+ <option>three</option>+ </select>+ </div>+ </div>+ </div>+ </section>+</form>diff --git a/spec/components/previews/forms_preview/multiple_fields_per_row.html.erb b/spec/components/previews/forms_preview/multiple_fields_per_row.html.erbnew file mode 100644index 00000000000..de05d3f4ca5--- /dev/null+++ b/spec/components/previews/forms_preview/multiple_fields_per_row.html.erb@@ -0,0 +1,119 @@+<form class="form">+ <fieldset class="form--fieldset">+ <legend class="form--fieldset-legend">Wichtige Daten</legend>+ <div class="form--field -required">+ <label class="form--label">Lieblingsstädte:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="text" class="form--text-field" value="Leipzig">+ </div>+ <div class="form--text-field-container">+ <input type="text" class="form--text-field" placeholder="Berlin">+ </div>+ <div class="form--text-field-container">+ <input type="text" class="form--text-field" placeholder="Zürich">+ </div>+ <div class="form--text-field-container">+ <input type="text" class="form--text-field" placeholder="Paris">+ </div>+ <div class="form--text-field-container">+ <input type="text" class="form--text-field" placeholder="Rom">+ </div>+ </div>+ </div>+ <div class="form--field -required">+ <label class="form--label">Geburtsdatum:</label>+ <div class="form--field-container">+ <div class="form--select-container">+ <select class="form--select">+ <option>01</option><option>02</option><option>03</option>+ </select>+ </div>+ <div class="form--select-container">+ <select class="form--select">+ <option>Januar</option>+ <option selected>Februar</option>+ <option>März</option>+ <option>April</option>+ <option>Mai</option>+ <option>Juni</option>+ <option>Juli</option>+ <option>August</option>+ <option>September</option>+ <option>Oktober</option>+ <option>November</option>+ <option>Dezember</option>+ </select>+ </div>+ <div class="form--text-field-container">+ <input type="number" class="form--text-field" placeholder="1984">+ </div>+ </div>+ <div class="form--field-instructions">+ One never lies about one's age.+ </div>+ </div>+ <div class="form--field">+ <label class="form--label">Benzinverbrauch:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="number" class="form--text-field" value="9">+ </div>+ <div class="form--field-affix">Liter</div>+ <div class="form--field-affix">pro</div>+ <div class="form--select-container">+ <select class="form--select">+ <option selected>km</option>+ <option>Meile</option>+ </select>+ </div>+ <div class="form--field-affix">auf</div>+ <div class="form--select-container">+ <select class="form--select">+ <option selected>der Autobahn</option>+ <option>der Stadt</option>+ </select>+ </div>+ </div>+ </div>+ <div class="form--grouping" role="group" aria-labelledby="form-grouping-label">+ <div id="form-grouping-label" class="form--grouping-label">Colors:</div>+ <div class="form--grouping-row">+ <div class="form--field">+ <label class="form--label">Most favorite first:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="text" class="form--text-field" placeholder="Green">+ </div>+ </div>+ </div>+ <div class="form--field">+ <label class="form--label">Most favorite second:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="text" class="form--text-field" placeholder="Blue">+ </div>+ </div>+ </div>+ </div>+ <div class="form--grouping-row">+ <div class="form--field">+ <label class="form--label">Least favorite first:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="text" class="form--text-field" placeholder="Magenta">+ </div>+ </div>+ </div>+ <div class="form--field">+ <label class="form--label">Least favorite second:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="text" class="form--text-field" placeholder="Orange">+ </div>+ </div>+ </div>+ </div>+ </div>+ </fieldset>+</form>diff --git a/spec/components/previews/forms_preview/sections_and_fieldsets.html.erb b/spec/components/previews/forms_preview/sections_and_fieldsets.html.erbnew file mode 100644index 00000000000..941ab75846b--- /dev/null+++ b/spec/components/previews/forms_preview/sections_and_fieldsets.html.erb@@ -0,0 +1,36 @@+<form class="form -bordered">+ <section class="form--section">+ <div class="form--field -required">+ <label class="form--label">Text:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="text" class="form--text-field">+ </div>+ </div>+ </div>+ </section>+ <section class="form--section">+ <h3 class="form--section-title">Advanced information</h3>+ <div class="form--field -required">+ <label class="form--label">More text:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="text" class="form--text-field">+ </div>+ </div>+ </div>+ </section>+ <fieldset class="form--fieldset">+ <legend class="form--fieldset-legend">+ Even more advanced information+ </legend>+ <div class="form--field -required">+ <label class="form--label">Even more text:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="text" class="form--text-field">+ </div>+ </div>+ </div>+ </fieldset>+</form>diff --git a/spec/components/previews/forms_preview/vertical_layout.html.erb b/spec/components/previews/forms_preview/vertical_layout.html.erbnew file mode 100644index 00000000000..9870e0d5f41--- /dev/null+++ b/spec/components/previews/forms_preview/vertical_layout.html.erb@@ -0,0 +1,55 @@+<form class="form -vertical">+ <section class="form--section">+ <div class="grid-block">+ <div class="form--field -required">+ <label class="form--label">Text:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="text" class="form--text-field">+ </div>+ </div>+ <div class="form--field-instructions">+ Write anything you like.+ </div>+ </div>+ <div class="form--field">+ <label class="form--label">Email:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="email" class="form--text-field" placeholder="a valid email">+ </div>+ </div>+ <div class="form--field-extra-actions">+ <a href="#">Request new email</a>+ </div>+ </div>+ <div class="form--field -required">+ <label class="form--label">Number:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="number" class="form--text-field">+ </div>+ <div class="form--field-affix">+ unit+ </div>+ </div>+ <div class="form--field-instructions">+ Any number from 1 to 10!+ </div>+ </div>+ </div>+ <div class="grid-block">+ <div class="form--field -required">+ <label class="form--label">Long text:</label>+ <div class="form--field-container">+ <div class="form--text-area-container">+ <textarea class="form--text-area">El resto della concluían sayo de velarte, calzas de velludo para las fiestas, con sus pantuflos de lo mesmo, y los días de entresemana se honraba con su vellorí de lo más fino.</textarea>+ </div>+ </div>+ <div class="form--field-instructions">+ Write more about anything.+ </div>+ </div>+ </div>+ </section>+</form>diff --git a/spec/components/previews/forms_preview/wide_labels.html.erb b/spec/components/previews/forms_preview/wide_labels.html.erbnew file mode 100644index 00000000000..30293f58a6c--- /dev/null+++ b/spec/components/previews/forms_preview/wide_labels.html.erb@@ -0,0 +1,80 @@+<form class="form -wide-labels">+ <section class="form--section">+ <div class="form--field -required">+ <label class="form--label">Text:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="text" class="form--text-field">+ </div>+ </div>+ </div>+ <div class="form--field">+ <label class="form--label">Email:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <input type="email" class="form--text-field" placeholder="a valid email">+ </div>+ </div>+ <div class="form--field-instructions">+ Your personal email address.+ </div>+ </div>+ <div class="form--field -required">+ <label class="form--label">Amount:</label>+ <div class="form--field-container">+ <div class="form--field-affix">+ <strong>€</strong>+ </div>+ <div class="form--text-field-container">+ <input type="number" class="form--text-field">+ </div>+ <div class="form--field-affix">+ per item+ </div>+ </div>+ <div class="form--field-instructions">+ The more, the better+ </div>+ </div>+ <div class="form--field">+ <label class="form--label">Telephone:</label>+ <div class="form--field-container">+ <div class="form--field-affix icon-context icon-phone">+ </div>+ <div class="form--text-field-container">+ <input type="tel" class="form--text-field">+ </div>+ </div>+ </div>+ <div class="form--field -required">+ <label class="form--label">Long text:</label>+ <div class="form--field-container">+ <div class="form--text-field-container">+ <textarea class="form--text-area">El resto della concluían sayo de velarte, calzas de velludo para las fiestas, con sus pantuflos de lo mesmo, y los días de entresemana se honraba con su vellorí de lo más fino.</textarea>+ </div>+ </div>+ <div class="form--field-instructions">+ Write more about anything.+ </div>+ </div>+ <div class="form--field -required -no-label">+ <div class="form--field-container">+ <label class="form--label-with-check-box">+ <div class="form--check-box-container">+ <input type="checkbox" class="form--check-box">+ </div>+ Option 1+ </label>+ <label class="form--label-with-check-box">+ <div class="form--check-box-container">+ <input type="checkbox" class="form--check-box">+ </div>+ Option 2+ </label>+ </div>+ <div class="form--field-instructions">+ Selecting these option might be considered a dangerous operation.+ </div>+ </div>+ </section>+</form>diff --git a/spec/components/previews/widget_component_preview/default.html.erb b/spec/components/previews/widget_component_preview/default.html.erbindex 9970042f875..47089ba6af5 100644--- a/spec/components/previews/widget_component_preview/default.html.erb+++ b/spec/components/previews/widget_component_preview/default.html.erb@@ -1,100 +1,30 @@-<section class="widget-boxes -flex">-- <!-- Widget box with arrows: Single-line -->- <div class="widget-box">- <h3 class="widget-box--header">- <div class="widget-box--header-title title-container">- <h2 class="editable-toolbar-title--fixed">Widget Box</h2>- </div>+<form class="form danger-zone">+ <section class="form--section">+ <h3 class="form--section-title">+ Delete account <em>[email protected]</em></h3>- <p class="widget-box--additional-info">This widget box can be used to display content belonging to one subject.</p>- <ul class="widget-box--arrow-links">- <li>- <a>Go to Link 1</a>- </li>- <li>- <a>Go to link 2</a>- </li>- </ul>- </div>-- <!-- Widget box with arrows: Multiline -->- <div class="widget-box">- <h3 class="widget-box--header">- <div class="widget-box--header-title title-container">- <h2 class="editable-toolbar-title--fixed">Widget Box 2</h2>- </div>- </h3>- <ul class="widget-box--arrow-links">- <li class="-widget-box--arrow-multiline">- <div>- <img class="avatar-mini" title="OpenProject Admin" src="https://via.placeholder.com/128" alt="Avatar">- <a href="">Demo project</a>:- <a href="">Important news</a>- <br>- <p class="widget-box--additional-info">Added by- <a title="User OpenProject Admin" href="">OpenProject Admin</a>- <time title="10/31/2018 09:15 AM" class="timestamp">3 months</time> ago- </p>- </div>- </li>- <li class="-widget-box--arrow-multiline">- <div>- <img class="avatar-mini" title="OpenProject Admin" src="https://via.placeholder.com/128" alt="Avatar">- <a href="">Demo project</a>:- <a href="">Great news !!!</a>- <br>- <p class="widget-box--additional-info">Added by- <a title="User OpenProject Admin" href="">OpenProject Admin</a>- <time title="08/14/2018 11:04 AM" class="timestamp">5 months</time> ago- </p>- </div>- </li>- </ul>- </div>-- <!-- Widget box with button -->- <div class="widget-box">- <h3 class="widget-box--header">- <div class="widget-box--header-title title-container">- <h2 class="editable-toolbar-title--fixed">Widget Box 3</h2>- </div>- </h3>- <div class="overview">- <p>- Lorem ipsum dolor sit amet, his ei propriae suscipit.- Sit in atqui accumsan ponderum, eum ut luptatum lobortis, has ei tota illud detraxit.- </p>- </div>- <div class="widget-box--buttons">- <a class="button -highlight" href="">- <span class="spot-icon spot-icon_edit"></span>- <span>Edit</span>- </a>- </div>- </div>-- <!-- Widget box with enumeration and multiple buttons -->- <div class="widget-box">- <h3 class="widget-box--header">- <div class="widget-box--header-title title-container">- <h2 class="editable-toolbar-title--fixed">Widget Box 4</h2>- </div>- </h3>- <ul class="widget-box--enumeration">- <li>Enum1</li>- <li>Enum2</li>- <li>Enum3</li>- </ul>- <div class="widget-box--buttons">- <a class="button -alt-highlight" title="Add" href="">- <span class="spot-icon spot-icon_add"></span>- <span>Add</span>- </a>- <a class="button -highlight-inverted" title="View all" href="">- <span class="button--text">View all</span>+ <p>+ Your account will be deleted from the system. Therefore, you will no longer be able to log in with your current credentials. If you choose to become a user of this application again, you can do so by using the means this application grants.+ </p>+ <p>+ Of the data you created as much as possible will be deleted. Note however, that data like work packages and wiki entries can not be deleted without impeding the work of the other users. Such data is hence reassigned to an account called "Deleted user".+ </p>+ <p class="danger-zone--warning">+ <span class="icon icon-error"></span>+ <span>Deleting your account is an irreversible action.</span>+ </p>+ <p>+ Enter your login <em class="danger-zone--expected-value">[email protected]</em> to verify the deletion.+ </p>+ <div class="danger-zone--verification">+ <input type="text"></input>+ <button class="button -highlight" disabled>+ <i class="button--icon icon-delete"></i>+ <span class="button--text">Delete</span>+ </button>+ <a class="button -with-icon icon-cancel">+ Cancel</a></div>- </div>--</section>+ </section>+</form>