2015-07-13 01:57:15 +02:00
|
|
|
<link rel='import' href='../../bower_components/polymer/polymer.html'>
|
|
|
|
<link rel='import' href='../../bower_components/paper-button/paper-button.html'>
|
|
|
|
|
|
|
|
<link rel='import' href='../components/loading-box.html'>
|
|
|
|
|
|
|
|
<dom-module id='more-info-configurator'>
|
2016-03-28 09:11:52 +02:00
|
|
|
<style is="custom-style" include="iron-flex"></style>
|
2015-07-13 01:57:15 +02:00
|
|
|
<style>
|
|
|
|
p {
|
|
|
|
margin: 8px 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
p > img {
|
|
|
|
max-width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
p.center {
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
p.error {
|
|
|
|
color: #C62828;
|
|
|
|
}
|
|
|
|
|
|
|
|
p.submit {
|
|
|
|
text-align: center;
|
|
|
|
height: 41px;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<template>
|
|
|
|
<div class='layout vertical'>
|
|
|
|
<template is='dom-if' if='[[isConfigurable]]'>
|
|
|
|
|
2016-05-13 08:30:08 +02:00
|
|
|
<p hidden$='[[!stateObj.attributes.description]]'>[[stateObj.attributes.description]]
|
|
|
|
<a hidden$='[[!stateObj.attributes.link_url]]' href='[[stateObj.attributes.link_url]]' target='_blank'>[[stateObj.attributes.link_name]]</a>
|
|
|
|
</p>
|
2015-07-13 01:57:15 +02:00
|
|
|
|
|
|
|
<p class='error' hidden$='[[!stateObj.attributes.errors]]'>[[stateObj.attributes.errors]]</p>
|
|
|
|
|
|
|
|
<p class='center' hidden$='[[!stateObj.attributes.description_image]]'>
|
|
|
|
<img src='[[stateObj.attributes.description_image]]' />
|
|
|
|
</p>
|
|
|
|
|
2015-10-25 11:37:23 +01:00
|
|
|
<template is='dom-repeat' items='[[stateObj.attributes.fields]]'>
|
|
|
|
<paper-input-container id='paper-input-fields-{{item.id}}'>
|
|
|
|
<label>{{item.name}}</label>
|
|
|
|
<input is="iron-input" type="{{item.type}}" id='{{item.id}}' on-change="fieldChanged"/>
|
|
|
|
</paper-input-container>
|
|
|
|
</template>
|
|
|
|
|
2015-07-13 01:57:15 +02:00
|
|
|
<p class='submit'>
|
2016-01-13 09:31:38 +01:00
|
|
|
<paper-button raised on-tap='submitClicked'
|
2015-07-13 01:57:15 +02:00
|
|
|
hidden$='[[isConfiguring]]'>[[submitCaption]]</paper-button>
|
|
|
|
|
|
|
|
<loading-box hidden$='[[!isConfiguring]]'>Configuring</loading-box>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</dom-module>
|