Commit 00c86d14 authored by ephoto_dam's avatar ephoto_dam

Ephoto Dam field support in progress

parent afbe6a2f
#field-ephoto-values .form-item {
.field--type-ephoto-dam-field .form-type-textfield {
float:left;
margin-right:5px;
}
.field--type-ephoto-dam-field .field-multiple-drag {
display:none;
}
.field--type-ephoto-dam-field .tabledrag-toggle-weight-wrapper {
display:none;
}
.ephoto-dam-field-import-button {
border-radius:2px !important;
margin:5px 0 0 0 !important;
padding-left:2.5em !important;
padding-right:1em !important;
background:#fff url(/modules/contrib/ephoto_dam/plugin/icon.png) 0.8em no-repeat !important;
display:block !important
}
......@@ -51,7 +51,7 @@ class EphotoDamFieldWidget extends WidgetBase {
'#attributes' => [
'class' => ['form-url'],
'onclick' => 'alert("Import!");return false',
'style' => 'border-radius:2px;margin:5px 0 0 0;padding-left:2.5em;padding-right:1em;background:0.8em url(/' . drupal_get_path('module', 'ephoto_dam') . '/plugin/icon.png) no-repeat'
'class' => ['ephoto-dam-field-import-button']
]
];
......@@ -63,25 +63,25 @@ class EphotoDamFieldWidget extends WidgetBase {
$element['version'] = [
'#type' => 'textfield',
'#title' => 'Version',
'#title' => $this->t('Version') . ' ' . $items[$delta]->getName(),
//'#title_display' => 'after',
'#default_value' => $default_version,
'#size' => 20,
'#maxlength' => 60,
'#attributes' => [
'class' => ['form-url ephoto-version-class'],
'class' => ['form-url', 'ephoto-dam-field-version-field'],
//'style' => 'float:left;margin-right:5px;margin-top:4px'
]
];
$element['value'] = [
'#type' => 'textfield',
'#title' => 'URL',
'#title' => $this->t('URL'),
'#default_value' => $default_value,
'#size' => 60,
'#maxlength' => 256,
'#attributes' => [
'class' => ['form-url ephoto-value-class'],
'class' => ['form-url', 'ephoto-dam-field-value-field'],
//'style' => 'margin-top:-5px'
]
];
......
Markdown is supported
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