Files
gerrit/polygerrit-ui/app/elements/settings/gr-cla-view/gr-cla-view.html
Kasper Nilsson 4313467582 Replace more CSS vars with constants
Swaps out various shades of red and black with --error-text-color and
--deemphasized-text-color, respectively.

Also removes some vestigial CSS that was never applied, and a hard-coded
check for a specific color in gr-autocomplete_test.

Change-Id: Ideee67300d8bbaa8e86fb1a2991492fa22a2ac43
2018-05-09 20:54:39 -07:00

109 lines
3.9 KiB
HTML

<!--
@license
Copyright (C) 2018 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<link rel="import" href="../../../behaviors/base-url-behavior/base-url-behavior.html">
<link rel="import" href="../../../bower_components/iron-input/iron-input.html">
<link rel="import" href="../../../bower_components/polymer/polymer.html">
<link rel="import" href="../../../styles/gr-form-styles.html">
<link rel="import" href="../../../styles/shared-styles.html">
<link rel="import" href="../../shared/gr-button/gr-button.html">
<link rel="import" href="../../shared/gr-rest-api-interface/gr-rest-api-interface.html">
<dom-module id="gr-cla-view">
<template>
<style include="shared-styles">
h1 {
margin-bottom: .6em;
}
h3 {
margin-bottom: .5em;
}
.agreementsUrl {
border: 0.1em solid #b0bdcc;
margin-bottom: 1.25em;
margin-left: 1.25em;
margin-right: 1.25em;
padding: 0.3em;
}
#claNewAgreementsLabel {
font-family: var(--font-family-bold);
}
#claNewAgreement {
display: none;
}
#claNewAgreement.show {
display: block;
}
.contributorAgreementButton {
font-family: var(--font-family-bold);
}
.alreadySubmittedText {
color: var(--error-text-color);
margin: 0 2em;
padding: .5em;
}
.alreadySubmittedText.hide,
.hideAgreementsTextBox {
display: none;
}
main {
margin: 2em auto;
max-width: 50em;
}
</style>
<style include="gr-form-styles"></style>
<main>
<h1>New Contributor Agreement</h1>
<h3>Select an agreement type:</h3>
<template is="dom-repeat" items="[[_serverConfig.auth.contributor_agreements]]">
<span class="contributorAgreementButton">
<input id$="claNewAgreementsInput[[item.name]]"
name="claNewAgreementsRadio"
type="radio"
data-name$="[[item.name]]"
data-url$="[[item.url]]"
on-tap="_handleShowAgreement"
disabled$="[[_disableAggreements(item, _groups, _signedAgreements)]]">
<label id="claNewAgreementsLabel">[[item.name]]</label>
</span>
<div class$="alreadySubmittedText [[_hideAggreements(item, _groups, _signedAgreements)]]">
Agreement already submitted.
</div>
<div class="agreementsUrl">
[[item.description]]
</div>
</template>
<div id="claNewAgreement" class$="[[_computeShowAgreementsClass(_showAgreements)]]">
<h3 class="smallHeading">Review the agreement:</h3>
<div id="agreementsUrl" class="agreementsUrl">
<a href$="[[_agreementsUrl]]" target="blank" rel="noopener">
Please review the agreement.</a>
</div>
<div class$="agreementsTextBox [[_computeHideAgreementClass(_agreementName, _serverConfig.auth.contributor_agreements)]]">
<h3 class="smallHeading">Complete the agreement:</h3>
<input id="input-agreements" is="iron-input" bind-value="{{_agreementsText}}" placeholder="Enter 'I agree' here" />
<gr-button on-tap="_handleSaveAgreements" disabled="[[_disableAgreementsText(_agreementsText)]]">
Submit
</gr-button>
</div>
</div>
</main>
<gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
</template>
<script src="gr-cla-view.js"></script>
</dom-module>